Skip to content

Commit ea5ee21

Browse files
doehyunbaekljharb
authored andcommitted
Editorial: more assertions for module AOs (#3165)
This makes clear arguments passed to ResolveExport and GetImportedModule is not null.
1 parent e27d5fa commit ea5ee21

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

spec.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27895,6 +27895,7 @@ <h1>
2789527895
1. Assert: _e_.[[ExportName]] is not *null*.
2789627896
1. Append _e_.[[ExportName]] to _exportedNames_.
2789727897
1. For each ExportEntry Record _e_ of _module_.[[StarExportEntries]], do
27898+
1. Assert: _e_.[[ModuleRequest]] is not *null*.
2789827899
1. Let _requestedModule_ be GetImportedModule(_module_, _e_.[[ModuleRequest]]).
2789927900
1. Let _starNames_ be _requestedModule_.GetExportedNames(_exportStarSet_).
2790027901
1. For each element _n_ of _starNames_, do
@@ -27940,6 +27941,7 @@ <h1>
2794027941
1. Return ResolvedBinding Record { [[Module]]: _module_, [[BindingName]]: _e_.[[LocalName]] }.
2794127942
1. For each ExportEntry Record _e_ of _module_.[[IndirectExportEntries]], do
2794227943
1. If SameValue(_exportName_, _e_.[[ExportName]]) is *true*, then
27944+
1. Assert: _e_.[[ModuleRequest]] is not *null*.
2794327945
1. Let _importedModule_ be GetImportedModule(_module_, _e_.[[ModuleRequest]]).
2794427946
1. If _e_.[[ImportName]] is ~all~, then
2794527947
1. Assert: _module_ does not provide the direct binding for this export.
@@ -27953,6 +27955,7 @@ <h1>
2795327955
1. NOTE: A `default` export cannot be provided by an `export * from "mod"` declaration.
2795427956
1. Let _starResolution_ be *null*.
2795527957
1. For each ExportEntry Record _e_ of _module_.[[StarExportEntries]], do
27958+
1. Assert: _e_.[[ModuleRequest]] is not *null*.
2795627959
1. Let _importedModule_ be GetImportedModule(_module_, _e_.[[ModuleRequest]]).
2795727960
1. Let _resolution_ be _importedModule_.ResolveExport(_exportName_, _resolveSet_).
2795827961
1. If _resolution_ is ~ambiguous~, return ~ambiguous~.
@@ -27978,6 +27981,7 @@ <h1>InitializeEnvironment ( ): either a normal completion containing ~unused~ or
2797827981

2797927982
<emu-alg>
2798027983
1. For each ExportEntry Record _e_ of _module_.[[IndirectExportEntries]], do
27984+
1. Assert: _e_.[[ExportName]] is not *null*.
2798127985
1. Let _resolution_ be _module_.ResolveExport(_e_.[[ExportName]]).
2798227986
1. If _resolution_ is either *null* or ~ambiguous~, throw a *SyntaxError* exception.
2798327987
1. Assert: _resolution_ is a ResolvedBinding Record.

0 commit comments

Comments
 (0)