Skip to content

Commit 3deb789

Browse files
guybedfordbakkot
andauthored
Set return type to Uint8Array (#22)
Resolves #21. --------- Co-authored-by: Kevin Gibbons <[email protected]>
1 parent 24c9c8d commit 3deb789

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

spec.emu

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ contributors: Steven, Guy Bedford
6060
<li><p><ins>If _moduleRequest_.[[Attributes]] has an entry _entry_ such that _entry_.[[Key]] is *"type"*, then</ins></p></li>
6161
<ol>
6262
<li><p><ins>Let _type_ be _entry_.[[Value]].</ins></p></li>
63-
<li><p><ins>If _type_ is *"json"*, the host environment must perform FinishLoadingImportedModule(_referrer_, _moduleRequest_, _payload_, _result_), where _result_ is either the Completion Record returned by an invokation of ParseJSONModule or a throw completion.</ins></p></li>
64-
<li><p><ins>If _type_ is *"bytes"*, the host environment must perform FinishLoadingImportedModule(_referrer_, _moduleRequest_, _payload_, _result_), where _result_ is either the Completion Record returned by an invokation of CreateBytesModule or a throw completion.</ins></p></li>
63+
<li><p><ins>If _type_ is *"json"*, the host environment must perform FinishLoadingImportedModule(_referrer_, _moduleRequest_, _payload_, _result_), where _result_ is either the Completion Record returned by an invocation of ParseJSONModule or a throw completion.</ins></p></li>
64+
<li><p><ins>If _type_ is *"bytes"*, the host environment must perform FinishLoadingImportedModule(_referrer_, _moduleRequest_, _payload_, _result_), where _result_ is either the Completion Record returned by an invocation of CreateBytesModule or a throw completion.</ins></p></li>
6565
</ol>
6666
<li>
6767
The operation must treat _payload_ as an opaque value to be passed through to FinishLoadingImportedModule.
@@ -125,7 +125,8 @@ contributors: Steven, Guy Bedford
125125

126126
<emu-alg>
127127
1. Assert: IsImmutableBuffer(_arrayBuffer_) is *true*.
128-
1. Return CreateDefaultExportSyntheticModule(_arrayBuffer_).
128+
1. Let _uint8Array_ be ! Construct(%Uint8Array%, « _arrayBuffer_ »).
129+
1. Return CreateDefaultExportSyntheticModule(_uint8Array_).
129130
</emu-alg>
130131
</emu-clause>
131132
</emu-clause>

0 commit comments

Comments
 (0)