Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /wasm/jsapi/esm-integration/v128-tdz.tentative.any.js - WPT Dashboard Interop Dashboard
- /wasm/jsapi/esm-integration/v128-tdz.tentative.any.html - WPT Dashboard Interop Dashboard
- /wasm/jsapi/esm-integration/v128-tdz.tentative.any.shadowrealm-in-dedicatedworker.html - WPT Dashboard Interop Dashboard
- /wasm/jsapi/esm-integration/v128-tdz.tentative.any.shadowrealm-in-shadowrealm.html - WPT Dashboard Interop Dashboard
- /wasm/jsapi/esm-integration/v128-tdz.tentative.any.shadowrealm-in-sharedworker.html - WPT Dashboard Interop Dashboard
- /wasm/jsapi/esm-integration/v128-tdz.tentative.any.shadowrealm-in-window.html - WPT Dashboard Interop Dashboard
- /wasm/jsapi/esm-integration/v128-tdz.tentative.any.worker.html - WPT Dashboard Interop Dashboard
- /wasm/jsapi/esm-integration/v128-tdz.tentative.https.any.shadowrealm-in-audioworklet.html - WPT Dashboard Interop Dashboard
- /wasm/jsapi/esm-integration/v128-tdz.tentative.https.any.shadowrealm-in-serviceworker.html - WPT Dashboard Interop Dashboard
// META: global=window,dedicatedworker,jsshell,shadowrealm
promise_test(async () => {
const exporterModule = await import("./resources/mutable-global-export.wasm");
const reexporterModule = await import(
"./resources/mutable-global-reexport.wasm"
);
assert_throws_js(ReferenceError, () => exporterModule.v128Export);
assert_throws_js(ReferenceError, () => reexporterModule.reexportedV128Export);
}, "v128 global exports should cause TDZ errors");