From c5fa224cc7159d3a75c23c5e0ba4473535be16fe Mon Sep 17 00:00:00 2001 From: Guy Bedford Date: Mon, 8 Sep 2025 11:34:32 -0700 Subject: [PATCH 1/3] set return type to Uint8Array --- spec.emu | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/spec.emu b/spec.emu index 3acbc58..2dd14f3 100644 --- a/spec.emu +++ b/spec.emu @@ -60,8 +60,8 @@ contributors: Steven, Guy Bedford
  • If _moduleRequest_.[[Attributes]] has an entry _entry_ such that _entry_.[[Key]] is *"type"*, then

    1. Let _type_ be _entry_.[[Value]].

    2. -
    3. 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.

    4. -
    5. If _type_ is *"buffer"*, the host environment must perform FinishLoadingImportedModule(_referrer_, _moduleRequest_, _payload_, _result_), where _result_ is either the Completion Record returned by an invokation of CreateBufferModule or a throw completion.

    6. +
    7. 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.

    8. +
    9. If _type_ is *"buffer"*, the host environment must perform FinishLoadingImportedModule(_referrer_, _moduleRequest_, _payload_, _result_), where _result_ is either the Completion Record returned by an invocation of CreateBufferModule or a throw completion.

  • The operation must treat _payload_ as an opaque value to be passed through to FinishLoadingImportedModule. @@ -115,7 +115,7 @@ contributors: Steven, Guy Bedford CreateBufferModule ( _arrayBuffer_: an immutable ArrayBuffer or a SharedArrayBuffer - ): a Synthetic Module Record + ): either a normal completion containing a Synthetic Module Record or an abrupt completion
    @@ -125,7 +125,8 @@ contributors: Steven, Guy Bedford 1. Assert: IsImmutableBuffer(_arrayBuffer_) is *true*. - 1. Return CreateDefaultExportSyntheticModule(_arrayBuffer_). + 1. Let _uint8Array_ be ? Construct(%Uint8Array%, « _arrayBuffer_ »). + 1. Return CreateDefaultExportSyntheticModule(_uint8Array_). From 9996fc16f090feb7b2d6c729d2e956621d8bbbbb Mon Sep 17 00:00:00 2001 From: Guy Bedford Date: Tue, 9 Sep 2025 19:18:30 -0700 Subject: [PATCH 2/3] Update spec.emu Co-authored-by: Kevin Gibbons --- spec.emu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec.emu b/spec.emu index 2dd14f3..9a94aa8 100644 --- a/spec.emu +++ b/spec.emu @@ -125,7 +125,7 @@ contributors: Steven, Guy Bedford 1. Assert: IsImmutableBuffer(_arrayBuffer_) is *true*. - 1. Let _uint8Array_ be ? Construct(%Uint8Array%, « _arrayBuffer_ »). + 1. Let _uint8Array_ be ! Construct(%Uint8Array%, « _arrayBuffer_ »). 1. Return CreateDefaultExportSyntheticModule(_uint8Array_). From 27c9af09db543ad461b5aa3450cf1467173bd5ae Mon Sep 17 00:00:00 2001 From: Guy Bedford Date: Tue, 9 Sep 2025 19:20:01 -0700 Subject: [PATCH 3/3] remove completion --- spec.emu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec.emu b/spec.emu index dc5a165..a07030a 100644 --- a/spec.emu +++ b/spec.emu @@ -115,7 +115,7 @@ contributors: Steven, Guy Bedford CreateBytesModule ( _arrayBuffer_: an immutable ArrayBuffer or a SharedArrayBuffer - ): either a normal completion containing a Synthetic Module Record or an abrupt completion + ): a Synthetic Module Record