commit 22ab64ea6d4b2a1682f7672ea5ff7e8ebfd20170
parent 9871e911c5c15561b192123269e8d68fce40750e
Author: Daniel Minor <dminor@mozilla.com>
Date: Fri, 12 Dec 2025 14:12:34 +0000
Bug 1994828 - Add ModuleType::JavaScriptOrWasm to reflect specification change; r=allstarschh,dom-worker-reviewers,asuth
This was renamed to "javascript-or-wasm" in the specification, in
this pull request: https://github.com/whatwg/html/pull/10380/.
This patch adds a temporary JavaScriptOrWasm module type that is an
alias of JavaScript. Code that has been updated to handle wasm modules
will use the new type, other code will continue to use JavaScript. Once
everything has been updated, we can just rename JavaScript to
JavaScriptOrWasm.
Differential Revision: https://phabricator.services.mozilla.com/D270146
Diffstat:
1 file changed, 8 insertions(+), 0 deletions(-)
diff --git a/js/public/Modules.h b/js/public/Modules.h
@@ -45,6 +45,14 @@ enum class ModuleType : uint32_t {
CSS,
Bytes,
+ // The specification has renamed the "javascript" module type to
+ // "javascript-or-wasm". For now, we'll add JavaScriptOrWasm as
+ // an alias of JavaScript. Code that's been updated to handle
+ // wasm modules will use JavaScriptOrWasm, other code will continue
+ // to use JavaScript. Once everything has been updated to use
+ // JavaScriptOrWasm, we'll can just rename JavaScript to JavaScriptOrWasm.
+ JavaScriptOrWasm = JavaScript,
+
Limit = Bytes,
};