Skip to content

Commit bf93c9b

Browse files
committed
throw on exports, instead of hiding
1 parent 910997a commit bf93c9b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

document/js-api/index.bs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1409,6 +1409,9 @@ To <dfn export>parse a WebAssembly module</dfn> given a <a>byte sequence</a> |by
14091409
1. Note: The following step only applies when integrating with the JS String Builtins proposal.
14101410
1. If [=Find a builtin=] with (|moduleName|, |name|, |type|) and builtins |module|.\[[BuiltinSets]] is not null, then [=iteration/continue=].
14111411
1. [=set/Append=] |moduleName| to |requestedModules|.
1412+
1. For each (|name|, <var ignore>type</var>) in [=module_exports=](|module|.\[[Module]])
1413+
1. If |name| starts with the prefix "wasm:" or "wasm-js:",
1414+
1. Throw a {{LinkError}} exception.
14121415
1. Let |moduleRecord| be {
14131416
<!-- WebAssembly Module Records -->
14141417
\[[Instance]]: ~empty~,
@@ -1444,8 +1447,7 @@ The <dfn>export name list</dfn> of a WebAssembly Module Record |record| is defin
14441447
1. Let |module| be |record|'s \[[ModuleSource]] internal slot.
14451448
1. Let |exports| be an empty [=list=].
14461449
1. For each (|name|, <var ignore>type</var>) in [=module_exports=](|module|.\[[Module]])
1447-
1. If |name| does not start with the prefix "wasm:" or "wasm-js:",
1448-
1. [=list/Append=] |name| to the end of |exports|.
1450+
1. [=list/Append=] |name| to the end of |exports|.
14491451
1. Return |exports|.
14501452

14511453
</div>

0 commit comments

Comments
 (0)