Changeset 271993 in webkit


Ignore:
Timestamp:
Jan 27, 2021 5:31:34 PM (18 months ago)
Author:
ysuzuki@apple.com
Message:

WebAssembly: add support for stream APIs
https://bugs.webkit.org/show_bug.cgi?id=173105

Reviewed by Keith Miller.

.:

  • Source/cmake/OptionsFTW.cmake:
  • Source/cmake/WebKitFeatures.cmake:

JSTests:

  • wasm/stress/resources/tsf.wasm: Added.
  • wasm/stress/wasm-streaming-compiler-compile.js: Added.

(shouldBe):
(slice):
(async main):
(main.catch):

  • wasm/stress/wasm-streaming-compiler-instantiate.js: Added.

(shouldBe):
(slice):
(async main.):
(async main):
(main.catch):

LayoutTests/imported/w3c:

  • web-platform-tests/wasm/wasm_stream_compile_test-expected.txt:
  • web-platform-tests/wasm/wasm_stream_compile_test.html:
  • web-platform-tests/wasm/wasm_stream_instantiate_test-expected.txt:
  • web-platform-tests/wasm/wasm_stream_instantiate_test.html:
  • web-platform-tests/wasm/webapi/abort.any-expected.txt:
  • web-platform-tests/wasm/webapi/abort.any.worker-expected.txt:
  • web-platform-tests/wasm/webapi/body.any-expected.txt:
  • web-platform-tests/wasm/webapi/body.any.worker-expected.txt:
  • web-platform-tests/wasm/webapi/contenttype.any-expected.txt:
  • web-platform-tests/wasm/webapi/contenttype.any.worker-expected.txt:
  • web-platform-tests/wasm/webapi/empty-body.any-expected.txt:
  • web-platform-tests/wasm/webapi/empty-body.any.worker-expected.txt:
  • web-platform-tests/wasm/webapi/historical.any-expected.txt:
  • web-platform-tests/wasm/webapi/historical.any.worker-expected.txt:
  • web-platform-tests/wasm/webapi/idlharness.any-expected.txt:
  • web-platform-tests/wasm/webapi/idlharness.any.worker-expected.txt:
  • web-platform-tests/wasm/webapi/instantiateStreaming-bad-imports.any-expected.txt:
  • web-platform-tests/wasm/webapi/instantiateStreaming-bad-imports.any.worker-expected.txt:
  • web-platform-tests/wasm/webapi/instantiateStreaming.any-expected.txt:
  • web-platform-tests/wasm/webapi/instantiateStreaming.any.worker-expected.txt:
  • web-platform-tests/wasm/webapi/invalid-args.any-expected.txt:
  • web-platform-tests/wasm/webapi/invalid-args.any.worker-expected.txt:
  • web-platform-tests/wasm/webapi/invalid-code.any-expected.txt:
  • web-platform-tests/wasm/webapi/invalid-code.any.worker-expected.txt:
  • web-platform-tests/wasm/webapi/modified-contenttype.any-expected.txt:
  • web-platform-tests/wasm/webapi/modified-contenttype.any.worker-expected.txt:
  • web-platform-tests/wasm/webapi/origin.sub.any-expected.txt:
  • web-platform-tests/wasm/webapi/origin.sub.any.worker-expected.txt:
  • web-platform-tests/wasm/webapi/rejected-arg.any-expected.txt:
  • web-platform-tests/wasm/webapi/rejected-arg.any.worker-expected.txt:
  • web-platform-tests/wasm/webapi/status.any-expected.txt:
  • web-platform-tests/wasm/webapi/status.any.worker-expected.txt:

Source/JavaScriptCore:

This patch implements WebAssembly.{compileStreaming,instantiateStreaming}. JavaScriptCore offers Wasm::StreamingCompiler interface to WebCore,
so that WebCore can feed FetchResponse and compile wasm code in a streaming fashion.

Wasm::StreamingCompiler drives Wasm::LLIntPlan while it does not use Wasm::Worklist since currently Wasm::Worklist is not suitable abstraction for
streaming compilation which generates compilation tasks incrementally. Instead, Wasm::StreamingCompiler generates Wasm::StreamingPlan and enqueues
them to Wasm::Worklist, and each StreamingPlan compiles one function at a time. And we gather these compiled functions into the one LLIntPlan and
finally Wasm::StreamingCompiler completes Wasm::LLIntPlan.

We already have Wasm::StreamingParser, which is designed for streaming compilation. We can pass bytes to this parser, and this parser invokes a callback
when a new wasm function is found. Then, Wasm::StreamingCompiler generates Wasm::StreamingPlan for that.

We add WasmStreamingCompiler JS objects to JSC shell to test streaming compilation easily.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • builtins/WebAssembly.js:

(compileStreaming):
(instantiateStreaming):

  • runtime/DeferredWorkTimer.cpp:

(JSC::DeferredWorkTimer::cancelPendingWork):

  • runtime/DeferredWorkTimer.h:
  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::init):

  • runtime/JSGlobalObject.h:
  • runtime/OptionsList.h:
  • tools/JSDollarVM.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):
(JSC::JSDollarVM::finishCreation):

  • wasm/WasmBBQPlan.cpp:

(JSC::Wasm::BBQPlan::BBQPlan):

  • wasm/WasmBBQPlan.h:
  • wasm/WasmCodeBlock.cpp:

(JSC::Wasm::CodeBlock::CodeBlock):

  • wasm/WasmEntryPlan.cpp:

(JSC::Wasm::EntryPlan::EntryPlan):

  • wasm/WasmEntryPlan.h:
  • wasm/WasmLLIntPlan.cpp:

(JSC::Wasm::LLIntPlan::LLIntPlan):
(JSC::Wasm::LLIntPlan::didCompleteCompilation):
(JSC::Wasm::LLIntPlan::completeInStreaming):
(JSC::Wasm::LLIntPlan::didCompileFunctionInStreaming):
(JSC::Wasm::LLIntPlan::didFailInStreaming):

  • wasm/WasmLLIntPlan.h:
  • wasm/WasmModule.cpp:

(JSC::Wasm::Module::validateSync):
(JSC::Wasm::Module::validateAsync):

  • wasm/WasmStreamingCompiler.cpp: Added.

(JSC::Wasm::StreamingCompiler::StreamingCompiler):
(JSC::Wasm::StreamingCompiler::~StreamingCompiler):
(JSC::Wasm::StreamingCompiler::create):
(JSC::Wasm::StreamingCompiler::didReceiveFunctionData):
(JSC::Wasm::StreamingCompiler::didCompileFunction):
(JSC::Wasm::StreamingCompiler::didFinishParsing):
(JSC::Wasm::StreamingCompiler::completeIfNecessary):
(JSC::Wasm::StreamingCompiler::didComplete):
(JSC::Wasm::StreamingCompiler::finalize):
(JSC::Wasm::StreamingCompiler::fail):
(JSC::Wasm::StreamingCompiler::cancel):

  • wasm/WasmStreamingCompiler.h: Added.
  • wasm/WasmStreamingParser.cpp:
  • wasm/WasmStreamingParser.h:
  • wasm/WasmStreamingPlan.cpp: Copied from Source/JavaScriptCore/builtins/WebAssembly.js.

(JSC::Wasm::StreamingPlan::StreamingPlan):
(JSC::Wasm::StreamingPlan::work):

  • wasm/WasmStreamingPlan.h: Copied from Source/JavaScriptCore/wasm/js/JSWebAssembly.h.
  • wasm/js/JSWebAssembly.cpp:

(JSC::JSWebAssembly::finishCreation):
(JSC::JSWebAssembly::instantiateForStreaming):
(JSC::JSC_DEFINE_HOST_FUNCTION):

  • wasm/js/JSWebAssembly.h:

Source/WebCore:

Since WebAssembly.{compileStreaming,instantiateStreaming} needs to handle FetchResponse which is WebCore type, they need to be implemented in WebCore side.
To achieve that, JSC offers callback to JSGlobalObject, and WebCore JSDOMGlobalObject can implement them to offer WebAssembly.{compileStreaming,instantiateStreaming} features.

We use JSC's Wasm::StreamingCompiler to implement them. WebCore feeds bytes from FetchResponse and drives Wasm::StreamingCompiler.

  • bindings/js/JSDOMGlobalObject.cpp:

(WebCore::handleResponseOnStreamingAction):
(WebCore::JSDOMGlobalObject::compileStreaming):
(WebCore::JSDOMGlobalObject::instantiateStreaming):

  • bindings/js/JSDOMGlobalObject.h:
  • bindings/js/JSDOMPromiseDeferred.cpp:
  • bindings/js/JSDOMWindowBase.cpp:

(WebCore::tryAllocate): Deleted.
(WebCore::isResponseCorrect): Deleted.
(WebCore::handleResponseOnStreamingAction): Deleted.
(WebCore::JSDOMWindowBase::compileStreaming): Deleted.
(WebCore::JSDOMWindowBase::instantiateStreaming): Deleted.

  • bindings/js/JSDOMWindowBase.h:
  • bindings/js/JSWorkerGlobalScopeBase.cpp:
  • bindings/js/JSWorkletGlobalScopeBase.cpp:

Source/WTF:

  • wtf/PlatformEnable.h:
Location:
trunk
Files:
6 added
71 edited
2 copied

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r271945 r271993  
     12021-01-27  Yusuke Suzuki  <ysuzuki@apple.com>
     2
     3        WebAssembly: add support for stream APIs
     4        https://bugs.webkit.org/show_bug.cgi?id=173105
     5
     6        Reviewed by Keith Miller.
     7
     8        * Source/cmake/OptionsFTW.cmake:
     9        * Source/cmake/WebKitFeatures.cmake:
     10
    1112021-01-27  Angelos Oikonomopoulos  <angelos@igalia.com>
    212
  • trunk/JSTests/ChangeLog

    r271967 r271993  
     12021-01-27  Yusuke Suzuki  <ysuzuki@apple.com>
     2
     3        WebAssembly: add support for stream APIs
     4        https://bugs.webkit.org/show_bug.cgi?id=173105
     5
     6        Reviewed by Keith Miller.
     7
     8        * wasm/stress/resources/tsf.wasm: Added.
     9        * wasm/stress/wasm-streaming-compiler-compile.js: Added.
     10        (shouldBe):
     11        (slice):
     12        (async main):
     13        (main.catch):
     14        * wasm/stress/wasm-streaming-compiler-instantiate.js: Added.
     15        (shouldBe):
     16        (slice):
     17        (async main.):
     18        (async main):
     19        (main.catch):
     20
    1212021-01-27  Commit Queue  <commit-queue@webkit.org>
    222
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r271992 r271993  
     12021-01-27  Yusuke Suzuki  <ysuzuki@apple.com>
     2
     3        WebAssembly: add support for stream APIs
     4        https://bugs.webkit.org/show_bug.cgi?id=173105
     5
     6        Reviewed by Keith Miller.
     7
     8        * web-platform-tests/wasm/wasm_stream_compile_test-expected.txt:
     9        * web-platform-tests/wasm/wasm_stream_compile_test.html:
     10        * web-platform-tests/wasm/wasm_stream_instantiate_test-expected.txt:
     11        * web-platform-tests/wasm/wasm_stream_instantiate_test.html:
     12        * web-platform-tests/wasm/webapi/abort.any-expected.txt:
     13        * web-platform-tests/wasm/webapi/abort.any.worker-expected.txt:
     14        * web-platform-tests/wasm/webapi/body.any-expected.txt:
     15        * web-platform-tests/wasm/webapi/body.any.worker-expected.txt:
     16        * web-platform-tests/wasm/webapi/contenttype.any-expected.txt:
     17        * web-platform-tests/wasm/webapi/contenttype.any.worker-expected.txt:
     18        * web-platform-tests/wasm/webapi/empty-body.any-expected.txt:
     19        * web-platform-tests/wasm/webapi/empty-body.any.worker-expected.txt:
     20        * web-platform-tests/wasm/webapi/historical.any-expected.txt:
     21        * web-platform-tests/wasm/webapi/historical.any.worker-expected.txt:
     22        * web-platform-tests/wasm/webapi/idlharness.any-expected.txt:
     23        * web-platform-tests/wasm/webapi/idlharness.any.worker-expected.txt:
     24        * web-platform-tests/wasm/webapi/instantiateStreaming-bad-imports.any-expected.txt:
     25        * web-platform-tests/wasm/webapi/instantiateStreaming-bad-imports.any.worker-expected.txt:
     26        * web-platform-tests/wasm/webapi/instantiateStreaming.any-expected.txt:
     27        * web-platform-tests/wasm/webapi/instantiateStreaming.any.worker-expected.txt:
     28        * web-platform-tests/wasm/webapi/invalid-args.any-expected.txt:
     29        * web-platform-tests/wasm/webapi/invalid-args.any.worker-expected.txt:
     30        * web-platform-tests/wasm/webapi/invalid-code.any-expected.txt:
     31        * web-platform-tests/wasm/webapi/invalid-code.any.worker-expected.txt:
     32        * web-platform-tests/wasm/webapi/modified-contenttype.any-expected.txt:
     33        * web-platform-tests/wasm/webapi/modified-contenttype.any.worker-expected.txt:
     34        * web-platform-tests/wasm/webapi/origin.sub.any-expected.txt:
     35        * web-platform-tests/wasm/webapi/origin.sub.any.worker-expected.txt:
     36        * web-platform-tests/wasm/webapi/rejected-arg.any-expected.txt:
     37        * web-platform-tests/wasm/webapi/rejected-arg.any.worker-expected.txt:
     38        * web-platform-tests/wasm/webapi/status.any-expected.txt:
     39        * web-platform-tests/wasm/webapi/status.any.worker-expected.txt:
     40
    1412021-01-27  Sam Weinig  <weinig@apple.com>
    242
  • trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/wasm_stream_compile_test-expected.txt

    r231194 r271993  
    11
    2 FAIL compileStreaming using resolved response promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.compileStreaming is not a function. (In 'WebAssembly.compileStreaming(response)', 'WebAssembly.compileStreaming' is undefined)"
    3 FAIL compileStreaming using resolved response and check instantiate promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.compileStreaming is not a function. (In 'WebAssembly.compileStreaming(response)', 'WebAssembly.compileStreaming' is undefined)"
    4 FAIL compileStreaming using promise response from fetch and check instantiate promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.compileStreaming is not a function. (In 'WebAssembly.compileStreaming(result)', 'WebAssembly.compileStreaming' is undefined)"
    5 FAIL compileStreaming raise error if wrong mime type assert_true: expected true got false
    6 FAIL compileStreaming raise error if no mime type assert_true: expected true got false
    7 FAIL compileStreaming raise error if 404 status assert_equals: expected "Response has not returned OK status" but got "WebAssembly.compileStreaming is not a function. (In 'WebAssembly.compileStreaming(result)', 'WebAssembly.compileStreaming' is undefined)"
    8 FAIL compileStreaming check CORS promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.compileStreaming is not a function. (In 'WebAssembly.compileStreaming(result)', 'WebAssembly.compileStreaming' is undefined)"
    9 FAIL compileStreaming raise error if no-cors assert_equals: expected "Response is not CORS-same-origin" but got "WebAssembly.compileStreaming is not a function. (In 'WebAssembly.compileStreaming(result)', 'WebAssembly.compileStreaming' is undefined)"
    10 FAIL compileStreaming receive promise with response created from ArrayBuffer promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.compileStreaming is not a function. (In 'WebAssembly.compileStreaming(new Response(v, { headers: { "Content-Type" : "application/wasm" }}))', 'WebAssembly.compileStreaming' is undefined)"
    11 FAIL compileStreaming receive response that deliver data by chunks as bufferArray promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.compileStreaming is not a function. (In 'WebAssembly.compileStreaming(new Response(stream, { headers: { "Content-Type" : "application/wasm" }}))', 'WebAssembly.compileStreaming' is undefined)"
     2PASS compileStreaming using resolved response
     3PASS compileStreaming using resolved response and check instantiate
     4PASS compileStreaming using promise response from fetch and check instantiate
     5PASS compileStreaming raise error if wrong mime type
     6PASS compileStreaming raise error if no mime type
     7PASS compileStreaming raise error if 404 status
     8PASS compileStreaming check CORS
     9PASS compileStreaming raise error if no-cors
     10PASS compileStreaming receive promise with response created from ArrayBuffer
     11PASS compileStreaming receive response that deliver data by chunks as bufferArray
    1212
  • trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/wasm_stream_compile_test.html

    r231194 r271993  
    3838  promise_test(async function() {
    3939    try {
    40       var result = fetch('resources/incrementer.no_mime_type.wasm');
     40      var result = fetch('resources/incrementer.no_mime_type.wasm?pipe=header(Content-Type,)');
    4141      const module = await WebAssembly.compileStreaming(result);
    4242      assert_true(false);
     
    4949  promise_test(async function() {
    5050    try {
    51       var result = fetch('resources/incrementer1.wasm');
     51      var result = fetch('webapi/status.py?status=404');
    5252      const module = await WebAssembly.compileStreaming(result);
    5353      assert_true(false);
  • trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/wasm_stream_instantiate_test-expected.txt

    r231194 r271993  
    11
    2 FAIL instantiateStreaming using resolved response promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response)', 'WebAssembly.instantiateStreaming' is undefined)"
    3 FAIL instantiateStreaming using resolved response and check instantiate promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response)', 'WebAssembly.instantiateStreaming' is undefined)"
    4 FAIL instantiateStreaming using promise response from fetch and check instantiate promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(result)', 'WebAssembly.instantiateStreaming' is undefined)"
    5 FAIL instantiateStreaming raise error if wrong mime type assert_true: expected true got false
    6 FAIL instantiateStreaming raise error if no mime type assert_true: expected true got false
    7 FAIL instantiateStreaming raise error if 404 status assert_equals: expected "Response has not returned OK status" but got "WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(result)', 'WebAssembly.instantiateStreaming' is undefined)"
    8 FAIL instantiateStreaming check CORS promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(result)', 'WebAssembly.instantiateStreaming' is undefined)"
    9 FAIL instantiateStreaming raise error if no-cors assert_equals: expected "Response is not CORS-same-origin" but got "WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(result)', 'WebAssembly.instantiateStreaming' is undefined)"
    10 FAIL instantiateStreaming receive promise with response created from ArrayBuffer promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(new Response(v, { headers: { "Content-Type" : "application/wasm" }}))', 'WebAssembly.instantiateStreaming' is undefined)"
    11 FAIL instantiateStreaming receive response that deliver data by chunks as bufferArray promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(new Response(stream, { headers: { "Content-Type" : "application/wasm" }}))', 'WebAssembly.instantiateStreaming' is undefined)"
     2PASS instantiateStreaming using resolved response
     3PASS instantiateStreaming using resolved response and check instantiate
     4PASS instantiateStreaming using promise response from fetch and check instantiate
     5PASS instantiateStreaming raise error if wrong mime type
     6PASS instantiateStreaming raise error if no mime type
     7PASS instantiateStreaming raise error if 404 status
     8PASS instantiateStreaming check CORS
     9PASS instantiateStreaming raise error if no-cors
     10PASS instantiateStreaming receive promise with response created from ArrayBuffer
     11PASS instantiateStreaming receive response that deliver data by chunks as bufferArray
    1212
  • trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/wasm_stream_instantiate_test.html

    r231194 r271993  
    3636  promise_test(async function() {
    3737    try {
    38       var result = fetch('resources/incrementer.no_mime_type.wasm');
     38      var result = fetch('resources/incrementer.no_mime_type.wasm?pipe=header(Content-Type,)');
    3939      const { instance } = await WebAssembly.instantiateStreaming(result);
    4040      assert_true(false);
     
    4747  promise_test(async function() {
    4848    try {
    49       var result = fetch('resources/incrementer1.wasm');
     49      var result = fetch('webapi/status.py?status=404');
    5050      const { instance } = await WebAssembly.instantiateStreaming(result);
    5151      assert_true(false);
  • trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/abort.any-expected.txt

    r269866 r271993  
    1 CONSOLE MESSAGE: Unhandled Promise Rejection: AbortError: Request signal is aborted
    2 CONSOLE MESSAGE: Unhandled Promise Rejection: AbortError: Request signal is aborted
    31
    4 Harness Error (FAIL), message = Unhandled rejection: Request signal is aborted
     2PASS compileStreaming() on an already-aborted request should reject with AbortError
     3PASS compileStreaming() synchronously followed by abort should reject with AbortError
     4PASS compileStreaming() asynchronously racing with abort should succeed or reject with AbortError
     5PASS instantiateStreaming() on an already-aborted request should reject with AbortError
     6PASS instantiateStreaming() synchronously followed by abort should reject with AbortError
     7PASS instantiateStreaming() asynchronously racing with abort should succeed or reject with AbortError
    58
    6 FAIL compileStreaming() on an already-aborted request should reject with AbortError promise_test: Unhandled rejection with value: object "TypeError: WebAssembly[method] is not a function. (In 'WebAssembly[method](request)', 'WebAssembly[method]' is undefined)"
    7 FAIL compileStreaming() synchronously followed by abort should reject with AbortError promise_test: Unhandled rejection with value: object "TypeError: WebAssembly[method] is not a function. (In 'WebAssembly[method](request)', 'WebAssembly[method]' is undefined)"
    8 FAIL compileStreaming() asynchronously racing with abort should succeed or reject with AbortError assert_equals: expected "AbortError" but got "TypeError"
    9 FAIL instantiateStreaming() on an already-aborted request should reject with AbortError promise_test: Unhandled rejection with value: object "TypeError: WebAssembly[method] is not a function. (In 'WebAssembly[method](request)', 'WebAssembly[method]' is undefined)"
    10 FAIL instantiateStreaming() synchronously followed by abort should reject with AbortError promise_test: Unhandled rejection with value: object "TypeError: WebAssembly[method] is not a function. (In 'WebAssembly[method](request)', 'WebAssembly[method]' is undefined)"
    11 FAIL instantiateStreaming() asynchronously racing with abort should succeed or reject with AbortError assert_equals: expected "AbortError" but got "TypeError"
    12 
  • trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/abort.any.worker-expected.txt

    r269866 r271993  
    11
    2 Harness Error (FAIL), message = Unhandled rejection: Request signal is aborted
     2PASS compileStreaming() on an already-aborted request should reject with AbortError
     3PASS compileStreaming() synchronously followed by abort should reject with AbortError
     4PASS compileStreaming() asynchronously racing with abort should succeed or reject with AbortError
     5PASS instantiateStreaming() on an already-aborted request should reject with AbortError
     6PASS instantiateStreaming() synchronously followed by abort should reject with AbortError
     7PASS instantiateStreaming() asynchronously racing with abort should succeed or reject with AbortError
    38
    4 FAIL compileStreaming() on an already-aborted request should reject with AbortError promise_test: Unhandled rejection with value: object "TypeError: WebAssembly[method] is not a function. (In 'WebAssembly[method](request)', 'WebAssembly[method]' is undefined)"
    5 FAIL compileStreaming() synchronously followed by abort should reject with AbortError promise_test: Unhandled rejection with value: object "TypeError: WebAssembly[method] is not a function. (In 'WebAssembly[method](request)', 'WebAssembly[method]' is undefined)"
    6 FAIL compileStreaming() asynchronously racing with abort should succeed or reject with AbortError assert_equals: expected "AbortError" but got "TypeError"
    7 FAIL instantiateStreaming() on an already-aborted request should reject with AbortError promise_test: Unhandled rejection with value: object "TypeError: WebAssembly[method] is not a function. (In 'WebAssembly[method](request)', 'WebAssembly[method]' is undefined)"
    8 FAIL instantiateStreaming() synchronously followed by abort should reject with AbortError promise_test: Unhandled rejection with value: object "TypeError: WebAssembly[method] is not a function. (In 'WebAssembly[method](request)', 'WebAssembly[method]' is undefined)"
    9 FAIL instantiateStreaming() asynchronously racing with abort should succeed or reject with AbortError assert_equals: expected "AbortError" but got "TypeError"
    10 
  • trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/body.any-expected.txt

    r269866 r271993  
    11
    2 FAIL compileStreaming after consumption WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    3 FAIL compileStreaming before consumption WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    4 FAIL instantiateStreaming after consumption WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    5 FAIL instantiateStreaming before consumption WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
     2PASS compileStreaming after consumption
     3PASS compileStreaming before consumption
     4PASS instantiateStreaming after consumption
     5PASS instantiateStreaming before consumption
    66
  • trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/body.any.worker-expected.txt

    r269866 r271993  
    11
    2 FAIL compileStreaming after consumption WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    3 FAIL compileStreaming before consumption WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    4 FAIL instantiateStreaming after consumption WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    5 FAIL instantiateStreaming before consumption WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
     2PASS compileStreaming after consumption
     3PASS compileStreaming before consumption
     4PASS instantiateStreaming after consumption
     5PASS instantiateStreaming before consumption
    66
  • trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/contenttype.any-expected.txt

    r269866 r271993  
    11
    2 FAIL Response with Content-Type "": compileStreaming WebAssembly.compileStreaming is not a function. (In 'WebAssembly.compileStreaming(response)', 'WebAssembly.compileStreaming' is undefined)
    3 FAIL Response with Content-Type "": instantiateStreaming WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response)', 'WebAssembly.instantiateStreaming' is undefined)
    4 FAIL Response with Content-Type "application/javascript": compileStreaming WebAssembly.compileStreaming is not a function. (In 'WebAssembly.compileStreaming(response)', 'WebAssembly.compileStreaming' is undefined)
    5 FAIL Response with Content-Type "application/javascript": instantiateStreaming WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response)', 'WebAssembly.instantiateStreaming' is undefined)
    6 FAIL Response with Content-Type "application/octet-stream": compileStreaming WebAssembly.compileStreaming is not a function. (In 'WebAssembly.compileStreaming(response)', 'WebAssembly.compileStreaming' is undefined)
    7 FAIL Response with Content-Type "application/octet-stream": instantiateStreaming WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response)', 'WebAssembly.instantiateStreaming' is undefined)
    8 FAIL Response with Content-Type "text/wasm": compileStreaming WebAssembly.compileStreaming is not a function. (In 'WebAssembly.compileStreaming(response)', 'WebAssembly.compileStreaming' is undefined)
    9 FAIL Response with Content-Type "text/wasm": instantiateStreaming WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response)', 'WebAssembly.instantiateStreaming' is undefined)
    10 FAIL Response with Content-Type "application/wasm;": compileStreaming WebAssembly.compileStreaming is not a function. (In 'WebAssembly.compileStreaming(response)', 'WebAssembly.compileStreaming' is undefined)
    11 FAIL Response with Content-Type "application/wasm;": instantiateStreaming WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response)', 'WebAssembly.instantiateStreaming' is undefined)
    12 FAIL Response with Content-Type "application/wasm;x": compileStreaming WebAssembly.compileStreaming is not a function. (In 'WebAssembly.compileStreaming(response)', 'WebAssembly.compileStreaming' is undefined)
    13 FAIL Response with Content-Type "application/wasm;x": instantiateStreaming WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response)', 'WebAssembly.instantiateStreaming' is undefined)
    14 FAIL Response with Content-Type "application/wasm;charset=UTF-8": compileStreaming WebAssembly.compileStreaming is not a function. (In 'WebAssembly.compileStreaming(response)', 'WebAssembly.compileStreaming' is undefined)
    15 FAIL Response with Content-Type "application/wasm;charset=UTF-8": instantiateStreaming WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response)', 'WebAssembly.instantiateStreaming' is undefined)
    16 FAIL Response with Content-Type "application/wasm": compileStreaming promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.compileStreaming is not a function. (In 'WebAssembly.compileStreaming(response)', 'WebAssembly.compileStreaming' is undefined)"
    17 FAIL Response with Content-Type "application/wasm": instantiateStreaming promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response)', 'WebAssembly.instantiateStreaming' is undefined)"
    18 FAIL Response with Content-Type "APPLICATION/wasm": compileStreaming promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.compileStreaming is not a function. (In 'WebAssembly.compileStreaming(response)', 'WebAssembly.compileStreaming' is undefined)"
    19 FAIL Response with Content-Type "APPLICATION/wasm": instantiateStreaming promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response)', 'WebAssembly.instantiateStreaming' is undefined)"
    20 FAIL Response with Content-Type "APPLICATION/WASM": compileStreaming promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.compileStreaming is not a function. (In 'WebAssembly.compileStreaming(response)', 'WebAssembly.compileStreaming' is undefined)"
    21 FAIL Response with Content-Type "APPLICATION/WASM": instantiateStreaming promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response)', 'WebAssembly.instantiateStreaming' is undefined)"
     2PASS Response with Content-Type "": compileStreaming
     3PASS Response with Content-Type "": instantiateStreaming
     4PASS Response with Content-Type "application/javascript": compileStreaming
     5PASS Response with Content-Type "application/javascript": instantiateStreaming
     6PASS Response with Content-Type "application/octet-stream": compileStreaming
     7PASS Response with Content-Type "application/octet-stream": instantiateStreaming
     8PASS Response with Content-Type "text/wasm": compileStreaming
     9PASS Response with Content-Type "text/wasm": instantiateStreaming
     10PASS Response with Content-Type "application/wasm;": compileStreaming
     11PASS Response with Content-Type "application/wasm;": instantiateStreaming
     12PASS Response with Content-Type "application/wasm;x": compileStreaming
     13PASS Response with Content-Type "application/wasm;x": instantiateStreaming
     14PASS Response with Content-Type "application/wasm;charset=UTF-8": compileStreaming
     15PASS Response with Content-Type "application/wasm;charset=UTF-8": instantiateStreaming
     16PASS Response with Content-Type "application/wasm": compileStreaming
     17PASS Response with Content-Type "application/wasm": instantiateStreaming
     18PASS Response with Content-Type "APPLICATION/wasm": compileStreaming
     19PASS Response with Content-Type "APPLICATION/wasm": instantiateStreaming
     20PASS Response with Content-Type "APPLICATION/WASM": compileStreaming
     21PASS Response with Content-Type "APPLICATION/WASM": instantiateStreaming
    2222
  • trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/contenttype.any.worker-expected.txt

    r269866 r271993  
    11
    2 FAIL Response with Content-Type "": compileStreaming WebAssembly.compileStreaming is not a function. (In 'WebAssembly.compileStreaming(response)', 'WebAssembly.compileStreaming' is undefined)
    3 FAIL Response with Content-Type "": instantiateStreaming WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response)', 'WebAssembly.instantiateStreaming' is undefined)
    4 FAIL Response with Content-Type "application/javascript": compileStreaming WebAssembly.compileStreaming is not a function. (In 'WebAssembly.compileStreaming(response)', 'WebAssembly.compileStreaming' is undefined)
    5 FAIL Response with Content-Type "application/javascript": instantiateStreaming WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response)', 'WebAssembly.instantiateStreaming' is undefined)
    6 FAIL Response with Content-Type "application/octet-stream": compileStreaming WebAssembly.compileStreaming is not a function. (In 'WebAssembly.compileStreaming(response)', 'WebAssembly.compileStreaming' is undefined)
    7 FAIL Response with Content-Type "application/octet-stream": instantiateStreaming WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response)', 'WebAssembly.instantiateStreaming' is undefined)
    8 FAIL Response with Content-Type "text/wasm": compileStreaming WebAssembly.compileStreaming is not a function. (In 'WebAssembly.compileStreaming(response)', 'WebAssembly.compileStreaming' is undefined)
    9 FAIL Response with Content-Type "text/wasm": instantiateStreaming WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response)', 'WebAssembly.instantiateStreaming' is undefined)
    10 FAIL Response with Content-Type "application/wasm;": compileStreaming WebAssembly.compileStreaming is not a function. (In 'WebAssembly.compileStreaming(response)', 'WebAssembly.compileStreaming' is undefined)
    11 FAIL Response with Content-Type "application/wasm;": instantiateStreaming WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response)', 'WebAssembly.instantiateStreaming' is undefined)
    12 FAIL Response with Content-Type "application/wasm;x": compileStreaming WebAssembly.compileStreaming is not a function. (In 'WebAssembly.compileStreaming(response)', 'WebAssembly.compileStreaming' is undefined)
    13 FAIL Response with Content-Type "application/wasm;x": instantiateStreaming WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response)', 'WebAssembly.instantiateStreaming' is undefined)
    14 FAIL Response with Content-Type "application/wasm;charset=UTF-8": compileStreaming WebAssembly.compileStreaming is not a function. (In 'WebAssembly.compileStreaming(response)', 'WebAssembly.compileStreaming' is undefined)
    15 FAIL Response with Content-Type "application/wasm;charset=UTF-8": instantiateStreaming WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response)', 'WebAssembly.instantiateStreaming' is undefined)
    16 FAIL Response with Content-Type "application/wasm": compileStreaming promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.compileStreaming is not a function. (In 'WebAssembly.compileStreaming(response)', 'WebAssembly.compileStreaming' is undefined)"
    17 FAIL Response with Content-Type "application/wasm": instantiateStreaming promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response)', 'WebAssembly.instantiateStreaming' is undefined)"
    18 FAIL Response with Content-Type "APPLICATION/wasm": compileStreaming promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.compileStreaming is not a function. (In 'WebAssembly.compileStreaming(response)', 'WebAssembly.compileStreaming' is undefined)"
    19 FAIL Response with Content-Type "APPLICATION/wasm": instantiateStreaming promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response)', 'WebAssembly.instantiateStreaming' is undefined)"
    20 FAIL Response with Content-Type "APPLICATION/WASM": compileStreaming promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.compileStreaming is not a function. (In 'WebAssembly.compileStreaming(response)', 'WebAssembly.compileStreaming' is undefined)"
    21 FAIL Response with Content-Type "APPLICATION/WASM": instantiateStreaming promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response)', 'WebAssembly.instantiateStreaming' is undefined)"
     2PASS Response with Content-Type "": compileStreaming
     3PASS Response with Content-Type "": instantiateStreaming
     4PASS Response with Content-Type "application/javascript": compileStreaming
     5PASS Response with Content-Type "application/javascript": instantiateStreaming
     6PASS Response with Content-Type "application/octet-stream": compileStreaming
     7PASS Response with Content-Type "application/octet-stream": instantiateStreaming
     8PASS Response with Content-Type "text/wasm": compileStreaming
     9PASS Response with Content-Type "text/wasm": instantiateStreaming
     10PASS Response with Content-Type "application/wasm;": compileStreaming
     11PASS Response with Content-Type "application/wasm;": instantiateStreaming
     12PASS Response with Content-Type "application/wasm;x": compileStreaming
     13PASS Response with Content-Type "application/wasm;x": instantiateStreaming
     14PASS Response with Content-Type "application/wasm;charset=UTF-8": compileStreaming
     15PASS Response with Content-Type "application/wasm;charset=UTF-8": instantiateStreaming
     16PASS Response with Content-Type "application/wasm": compileStreaming
     17PASS Response with Content-Type "application/wasm": instantiateStreaming
     18PASS Response with Content-Type "APPLICATION/wasm": compileStreaming
     19PASS Response with Content-Type "APPLICATION/wasm": instantiateStreaming
     20PASS Response with Content-Type "APPLICATION/WASM": compileStreaming
     21PASS Response with Content-Type "APPLICATION/WASM": instantiateStreaming
    2222
  • trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/empty-body.any-expected.txt

    r269866 r271993  
    11
    2 FAIL compileStreaming: no body WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    3 FAIL compileStreaming: no body in a promise WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    4 FAIL compileStreaming: empty body WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    5 FAIL compileStreaming: empty body in a promise WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    6 FAIL instantiateStreaming: no body WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    7 FAIL instantiateStreaming: no body in a promise WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    8 FAIL instantiateStreaming: empty body WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    9 FAIL instantiateStreaming: empty body in a promise WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
     2PASS compileStreaming: no body
     3PASS compileStreaming: no body in a promise
     4PASS compileStreaming: empty body
     5PASS compileStreaming: empty body in a promise
     6PASS instantiateStreaming: no body
     7PASS instantiateStreaming: no body in a promise
     8PASS instantiateStreaming: empty body
     9PASS instantiateStreaming: empty body in a promise
    1010
  • trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/empty-body.any.worker-expected.txt

    r269866 r271993  
    11
    2 FAIL compileStreaming: no body WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    3 FAIL compileStreaming: no body in a promise WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    4 FAIL compileStreaming: empty body WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    5 FAIL compileStreaming: empty body in a promise WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    6 FAIL instantiateStreaming: no body WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    7 FAIL instantiateStreaming: no body in a promise WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    8 FAIL instantiateStreaming: empty body WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    9 FAIL instantiateStreaming: empty body in a promise WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
     2PASS compileStreaming: no body
     3PASS compileStreaming: no body in a promise
     4PASS compileStreaming: empty body
     5PASS compileStreaming: empty body in a promise
     6PASS instantiateStreaming: no body
     7PASS instantiateStreaming: no body in a promise
     8PASS instantiateStreaming: empty body
     9PASS instantiateStreaming: empty body in a promise
    1010
  • trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/historical.any-expected.txt

    r269866 r271993  
    11
    2 FAIL historical promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.compileStreaming is not a function. (In 'WebAssembly.compileStreaming(fetch('../incrementer.wasm'))', 'WebAssembly.compileStreaming' is undefined)"
     2PASS historical
    33
  • trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/historical.any.worker-expected.txt

    r269866 r271993  
    11
    2 FAIL historical promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.compileStreaming is not a function. (In 'WebAssembly.compileStreaming(fetch('../incrementer.wasm'))', 'WebAssembly.compileStreaming' is undefined)"
     2PASS historical
    33
  • trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/idlharness.any-expected.txt

    r269866 r271993  
    99PASS WebAssembly namespace: operation instantiate(BufferSource, optional object)
    1010PASS WebAssembly namespace: operation instantiate(Module, optional object)
    11 FAIL WebAssembly namespace: operation compileStreaming(Promise<Response>) assert_own_property: namespace object missing operation "compileStreaming" expected property "compileStreaming" missing
    12 FAIL WebAssembly namespace: operation instantiateStreaming(Promise<Response>, optional object) assert_own_property: namespace object missing operation "instantiateStreaming" expected property "instantiateStreaming" missing
     11PASS WebAssembly namespace: operation compileStreaming(Promise<Response>)
     12PASS WebAssembly namespace: operation instantiateStreaming(Promise<Response>, optional object)
    1313
  • trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/idlharness.any.worker-expected.txt

    r269866 r271993  
    99PASS WebAssembly namespace: operation instantiate(BufferSource, optional object)
    1010PASS WebAssembly namespace: operation instantiate(Module, optional object)
    11 FAIL WebAssembly namespace: operation compileStreaming(Promise<Response>) assert_own_property: namespace object missing operation "compileStreaming" expected property "compileStreaming" missing
    12 FAIL WebAssembly namespace: operation instantiateStreaming(Promise<Response>, optional object) assert_own_property: namespace object missing operation "instantiateStreaming" expected property "instantiateStreaming" missing
     11PASS WebAssembly namespace: operation compileStreaming(Promise<Response>)
     12PASS WebAssembly namespace: operation instantiateStreaming(Promise<Response>, optional object)
    1313
  • trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/instantiateStreaming-bad-imports.any-expected.txt

    r271168 r271993  
    11
    2 FAIL Non-object imports argument: null WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    3 FAIL Non-object imports argument: true WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    4 FAIL Non-object imports argument: "" WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    5 FAIL Non-object imports argument: symbol "Symbol()" WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    6 FAIL Non-object imports argument: 1 WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    7 FAIL Non-object imports argument: 0.1 WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    8 FAIL Non-object imports argument: NaN WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    9 FAIL Non-object module: undefined WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    10 FAIL Non-object module: null WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    11 FAIL Non-object module: true WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    12 FAIL Non-object module: "" WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    13 FAIL Non-object module: symbol "Symbol()" WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    14 FAIL Non-object module: 1 WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    15 FAIL Non-object module: 0.1 WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    16 FAIL Non-object module: NaN WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    17 FAIL Missing imports argument WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    18 FAIL Imports argument with missing property: undefined WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    19 FAIL Imports argument with missing property: empty object WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    20 FAIL Imports argument with missing property: wrong property WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    21 FAIL Importing a function with an incorrectly-typed value: undefined WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    22 FAIL Importing a function with an incorrectly-typed value: null WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    23 FAIL Importing a function with an incorrectly-typed value: true WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    24 FAIL Importing a function with an incorrectly-typed value: "" WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    25 FAIL Importing a function with an incorrectly-typed value: symbol "Symbol()" WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    26 FAIL Importing a function with an incorrectly-typed value: 1 WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    27 FAIL Importing a function with an incorrectly-typed value: 0.1 WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    28 FAIL Importing a function with an incorrectly-typed value: NaN WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    29 FAIL Importing a function with an incorrectly-typed value: object "[object Object]" WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    30 FAIL Importing an i32 global with an incorrectly-typed value: undefined WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    31 FAIL Importing an i32 global with an incorrectly-typed value: null WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    32 FAIL Importing an i32 global with an incorrectly-typed value: true WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    33 FAIL Importing an i32 global with an incorrectly-typed value: "" WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    34 FAIL Importing an i32 global with an incorrectly-typed value: symbol "Symbol()" WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    35 FAIL Importing an i32 global with an incorrectly-typed value: plain object WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    36 FAIL Importing an i32 global with an incorrectly-typed value: WebAssembly.Global WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    37 FAIL Importing an i32 global with an incorrectly-typed value: WebAssembly.Global.prototype WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    38 FAIL Importing an i32 global with an incorrectly-typed value: Object.create(WebAssembly.Global.prototype) WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    39 FAIL Importing an i32 global with an incorrectly-typed value: BigInt WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    40 FAIL Importing an i32 global with an incorrectly-typed value: WebAssembly.Global object (wrong value type) WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    41 FAIL Importing an i64 global with an incorrectly-typed value: undefined WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    42 FAIL Importing an i64 global with an incorrectly-typed value: null WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    43 FAIL Importing an i64 global with an incorrectly-typed value: true WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    44 FAIL Importing an i64 global with an incorrectly-typed value: "" WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    45 FAIL Importing an i64 global with an incorrectly-typed value: symbol "Symbol()" WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    46 FAIL Importing an i64 global with an incorrectly-typed value: plain object WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    47 FAIL Importing an i64 global with an incorrectly-typed value: WebAssembly.Global WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    48 FAIL Importing an i64 global with an incorrectly-typed value: WebAssembly.Global.prototype WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    49 FAIL Importing an i64 global with an incorrectly-typed value: Object.create(WebAssembly.Global.prototype) WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    50 FAIL Importing an i64 global with an incorrectly-typed value: Number WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    51 FAIL Importing an i64 global with an incorrectly-typed value: WebAssembly.Global object (wrong value type) WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    52 FAIL Importing an f32 global with an incorrectly-typed value: undefined WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    53 FAIL Importing an f32 global with an incorrectly-typed value: null WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    54 FAIL Importing an f32 global with an incorrectly-typed value: true WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    55 FAIL Importing an f32 global with an incorrectly-typed value: "" WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    56 FAIL Importing an f32 global with an incorrectly-typed value: symbol "Symbol()" WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    57 FAIL Importing an f32 global with an incorrectly-typed value: plain object WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    58 FAIL Importing an f32 global with an incorrectly-typed value: WebAssembly.Global WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    59 FAIL Importing an f32 global with an incorrectly-typed value: WebAssembly.Global.prototype WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    60 FAIL Importing an f32 global with an incorrectly-typed value: Object.create(WebAssembly.Global.prototype) WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    61 FAIL Importing an f32 global with an incorrectly-typed value: BigInt WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    62 FAIL Importing an f32 global with an incorrectly-typed value: WebAssembly.Global object (wrong value type) WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    63 FAIL Importing an f64 global with an incorrectly-typed value: undefined WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    64 FAIL Importing an f64 global with an incorrectly-typed value: null WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    65 FAIL Importing an f64 global with an incorrectly-typed value: true WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    66 FAIL Importing an f64 global with an incorrectly-typed value: "" WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    67 FAIL Importing an f64 global with an incorrectly-typed value: symbol "Symbol()" WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    68 FAIL Importing an f64 global with an incorrectly-typed value: plain object WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    69 FAIL Importing an f64 global with an incorrectly-typed value: WebAssembly.Global WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    70 FAIL Importing an f64 global with an incorrectly-typed value: WebAssembly.Global.prototype WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    71 FAIL Importing an f64 global with an incorrectly-typed value: Object.create(WebAssembly.Global.prototype) WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    72 FAIL Importing an f64 global with an incorrectly-typed value: BigInt WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    73 FAIL Importing an f64 global with an incorrectly-typed value: WebAssembly.Global object (wrong value type) WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    74 FAIL Importing an i32 mutable global with a primitive value WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    75 FAIL Importing an i32 mutable global with an immutable Global object WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    76 FAIL Importing an i64 mutable global with a primitive value WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    77 FAIL Importing an i64 mutable global with an immutable Global object WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    78 FAIL Importing an f32 mutable global with a primitive value WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    79 FAIL Importing an f32 mutable global with an immutable Global object WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    80 FAIL Importing an f64 mutable global with a primitive value WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    81 FAIL Importing an f64 mutable global with an immutable Global object WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    82 FAIL Importing memory with an incorrectly-typed value: undefined WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    83 FAIL Importing memory with an incorrectly-typed value: null WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    84 FAIL Importing memory with an incorrectly-typed value: true WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    85 FAIL Importing memory with an incorrectly-typed value: "" WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    86 FAIL Importing memory with an incorrectly-typed value: symbol "Symbol()" WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    87 FAIL Importing memory with an incorrectly-typed value: 1 WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    88 FAIL Importing memory with an incorrectly-typed value: 0.1 WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    89 FAIL Importing memory with an incorrectly-typed value: NaN WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    90 FAIL Importing memory with an incorrectly-typed value: plain object WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    91 FAIL Importing memory with an incorrectly-typed value: WebAssembly.Memory WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    92 FAIL Importing memory with an incorrectly-typed value: WebAssembly.Memory.prototype WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    93 FAIL Importing memory with an incorrectly-typed value: Object.create(WebAssembly.Memory.prototype) WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    94 FAIL Importing memory with an incorrectly-typed value: WebAssembly.Memory object (too large) WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    95 FAIL Importing table with an incorrectly-typed value: undefined WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    96 FAIL Importing table with an incorrectly-typed value: null WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    97 FAIL Importing table with an incorrectly-typed value: true WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    98 FAIL Importing table with an incorrectly-typed value: "" WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    99 FAIL Importing table with an incorrectly-typed value: symbol "Symbol()" WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    100 FAIL Importing table with an incorrectly-typed value: 1 WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    101 FAIL Importing table with an incorrectly-typed value: 0.1 WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    102 FAIL Importing table with an incorrectly-typed value: NaN WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    103 FAIL Importing table with an incorrectly-typed value: plain object WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    104 FAIL Importing table with an incorrectly-typed value: WebAssembly.Table WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    105 FAIL Importing table with an incorrectly-typed value: WebAssembly.Table.prototype WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    106 FAIL Importing table with an incorrectly-typed value: Object.create(WebAssembly.Table.prototype) WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    107 FAIL Importing table with an incorrectly-typed value: WebAssembly.Table object (too large) WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
     2PASS Non-object imports argument: null
     3PASS Non-object imports argument: true
     4PASS Non-object imports argument: ""
     5PASS Non-object imports argument: symbol "Symbol()"
     6PASS Non-object imports argument: 1
     7PASS Non-object imports argument: 0.1
     8PASS Non-object imports argument: NaN
     9PASS Non-object module: undefined
     10PASS Non-object module: null
     11PASS Non-object module: true
     12PASS Non-object module: ""
     13PASS Non-object module: symbol "Symbol()"
     14PASS Non-object module: 1
     15PASS Non-object module: 0.1
     16PASS Non-object module: NaN
     17PASS Missing imports argument
     18PASS Imports argument with missing property: undefined
     19PASS Imports argument with missing property: empty object
     20PASS Imports argument with missing property: wrong property
     21PASS Importing a function with an incorrectly-typed value: undefined
     22PASS Importing a function with an incorrectly-typed value: null
     23PASS Importing a function with an incorrectly-typed value: true
     24PASS Importing a function with an incorrectly-typed value: ""
     25PASS Importing a function with an incorrectly-typed value: symbol "Symbol()"
     26PASS Importing a function with an incorrectly-typed value: 1
     27PASS Importing a function with an incorrectly-typed value: 0.1
     28PASS Importing a function with an incorrectly-typed value: NaN
     29PASS Importing a function with an incorrectly-typed value: object "[object Object]"
     30PASS Importing an i32 global with an incorrectly-typed value: undefined
     31PASS Importing an i32 global with an incorrectly-typed value: null
     32PASS Importing an i32 global with an incorrectly-typed value: true
     33PASS Importing an i32 global with an incorrectly-typed value: ""
     34PASS Importing an i32 global with an incorrectly-typed value: symbol "Symbol()"
     35PASS Importing an i32 global with an incorrectly-typed value: plain object
     36PASS Importing an i32 global with an incorrectly-typed value: WebAssembly.Global
     37PASS Importing an i32 global with an incorrectly-typed value: WebAssembly.Global.prototype
     38PASS Importing an i32 global with an incorrectly-typed value: Object.create(WebAssembly.Global.prototype)
     39PASS Importing an i32 global with an incorrectly-typed value: BigInt
     40PASS Importing an i32 global with an incorrectly-typed value: WebAssembly.Global object (wrong value type)
     41PASS Importing an i64 global with an incorrectly-typed value: undefined
     42PASS Importing an i64 global with an incorrectly-typed value: null
     43PASS Importing an i64 global with an incorrectly-typed value: true
     44PASS Importing an i64 global with an incorrectly-typed value: ""
     45PASS Importing an i64 global with an incorrectly-typed value: symbol "Symbol()"
     46PASS Importing an i64 global with an incorrectly-typed value: plain object
     47PASS Importing an i64 global with an incorrectly-typed value: WebAssembly.Global
     48PASS Importing an i64 global with an incorrectly-typed value: WebAssembly.Global.prototype
     49PASS Importing an i64 global with an incorrectly-typed value: Object.create(WebAssembly.Global.prototype)
     50PASS Importing an i64 global with an incorrectly-typed value: Number
     51PASS Importing an i64 global with an incorrectly-typed value: WebAssembly.Global object (wrong value type)
     52PASS Importing an f32 global with an incorrectly-typed value: undefined
     53PASS Importing an f32 global with an incorrectly-typed value: null
     54PASS Importing an f32 global with an incorrectly-typed value: true
     55PASS Importing an f32 global with an incorrectly-typed value: ""
     56PASS Importing an f32 global with an incorrectly-typed value: symbol "Symbol()"
     57PASS Importing an f32 global with an incorrectly-typed value: plain object
     58PASS Importing an f32 global with an incorrectly-typed value: WebAssembly.Global
     59PASS Importing an f32 global with an incorrectly-typed value: WebAssembly.Global.prototype
     60PASS Importing an f32 global with an incorrectly-typed value: Object.create(WebAssembly.Global.prototype)
     61PASS Importing an f32 global with an incorrectly-typed value: BigInt
     62PASS Importing an f32 global with an incorrectly-typed value: WebAssembly.Global object (wrong value type)
     63PASS Importing an f64 global with an incorrectly-typed value: undefined
     64PASS Importing an f64 global with an incorrectly-typed value: null
     65PASS Importing an f64 global with an incorrectly-typed value: true
     66PASS Importing an f64 global with an incorrectly-typed value: ""
     67PASS Importing an f64 global with an incorrectly-typed value: symbol "Symbol()"
     68PASS Importing an f64 global with an incorrectly-typed value: plain object
     69PASS Importing an f64 global with an incorrectly-typed value: WebAssembly.Global
     70PASS Importing an f64 global with an incorrectly-typed value: WebAssembly.Global.prototype
     71PASS Importing an f64 global with an incorrectly-typed value: Object.create(WebAssembly.Global.prototype)
     72PASS Importing an f64 global with an incorrectly-typed value: BigInt
     73PASS Importing an f64 global with an incorrectly-typed value: WebAssembly.Global object (wrong value type)
     74PASS Importing an i32 mutable global with a primitive value
     75PASS Importing an i32 mutable global with an immutable Global object
     76PASS Importing an i64 mutable global with a primitive value
     77PASS Importing an i64 mutable global with an immutable Global object
     78PASS Importing an f32 mutable global with a primitive value
     79PASS Importing an f32 mutable global with an immutable Global object
     80PASS Importing an f64 mutable global with a primitive value
     81PASS Importing an f64 mutable global with an immutable Global object
     82PASS Importing memory with an incorrectly-typed value: undefined
     83PASS Importing memory with an incorrectly-typed value: null
     84PASS Importing memory with an incorrectly-typed value: true
     85PASS Importing memory with an incorrectly-typed value: ""
     86PASS Importing memory with an incorrectly-typed value: symbol "Symbol()"
     87PASS Importing memory with an incorrectly-typed value: 1
     88PASS Importing memory with an incorrectly-typed value: 0.1
     89PASS Importing memory with an incorrectly-typed value: NaN
     90PASS Importing memory with an incorrectly-typed value: plain object
     91PASS Importing memory with an incorrectly-typed value: WebAssembly.Memory
     92PASS Importing memory with an incorrectly-typed value: WebAssembly.Memory.prototype
     93PASS Importing memory with an incorrectly-typed value: Object.create(WebAssembly.Memory.prototype)
     94PASS Importing memory with an incorrectly-typed value: WebAssembly.Memory object (too large)
     95PASS Importing table with an incorrectly-typed value: undefined
     96PASS Importing table with an incorrectly-typed value: null
     97PASS Importing table with an incorrectly-typed value: true
     98PASS Importing table with an incorrectly-typed value: ""
     99PASS Importing table with an incorrectly-typed value: symbol "Symbol()"
     100PASS Importing table with an incorrectly-typed value: 1
     101PASS Importing table with an incorrectly-typed value: 0.1
     102PASS Importing table with an incorrectly-typed value: NaN
     103PASS Importing table with an incorrectly-typed value: plain object
     104PASS Importing table with an incorrectly-typed value: WebAssembly.Table
     105PASS Importing table with an incorrectly-typed value: WebAssembly.Table.prototype
     106PASS Importing table with an incorrectly-typed value: Object.create(WebAssembly.Table.prototype)
     107PASS Importing table with an incorrectly-typed value: WebAssembly.Table object (too large)
    108108
  • trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/instantiateStreaming-bad-imports.any.worker-expected.txt

    r271168 r271993  
    11
    2 FAIL Non-object imports argument: null WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    3 FAIL Non-object imports argument: true WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    4 FAIL Non-object imports argument: "" WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    5 FAIL Non-object imports argument: symbol "Symbol()" WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    6 FAIL Non-object imports argument: 1 WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    7 FAIL Non-object imports argument: 0.1 WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    8 FAIL Non-object imports argument: NaN WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    9 FAIL Non-object module: undefined WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    10 FAIL Non-object module: null WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    11 FAIL Non-object module: true WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    12 FAIL Non-object module: "" WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    13 FAIL Non-object module: symbol "Symbol()" WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    14 FAIL Non-object module: 1 WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    15 FAIL Non-object module: 0.1 WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    16 FAIL Non-object module: NaN WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    17 FAIL Missing imports argument WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    18 FAIL Imports argument with missing property: undefined WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    19 FAIL Imports argument with missing property: empty object WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    20 FAIL Imports argument with missing property: wrong property WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    21 FAIL Importing a function with an incorrectly-typed value: undefined WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    22 FAIL Importing a function with an incorrectly-typed value: null WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    23 FAIL Importing a function with an incorrectly-typed value: true WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    24 FAIL Importing a function with an incorrectly-typed value: "" WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    25 FAIL Importing a function with an incorrectly-typed value: symbol "Symbol()" WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    26 FAIL Importing a function with an incorrectly-typed value: 1 WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    27 FAIL Importing a function with an incorrectly-typed value: 0.1 WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    28 FAIL Importing a function with an incorrectly-typed value: NaN WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    29 FAIL Importing a function with an incorrectly-typed value: object "[object Object]" WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    30 FAIL Importing an i32 global with an incorrectly-typed value: undefined WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    31 FAIL Importing an i32 global with an incorrectly-typed value: null WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    32 FAIL Importing an i32 global with an incorrectly-typed value: true WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    33 FAIL Importing an i32 global with an incorrectly-typed value: "" WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    34 FAIL Importing an i32 global with an incorrectly-typed value: symbol "Symbol()" WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    35 FAIL Importing an i32 global with an incorrectly-typed value: plain object WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    36 FAIL Importing an i32 global with an incorrectly-typed value: WebAssembly.Global WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    37 FAIL Importing an i32 global with an incorrectly-typed value: WebAssembly.Global.prototype WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    38 FAIL Importing an i32 global with an incorrectly-typed value: Object.create(WebAssembly.Global.prototype) WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    39 FAIL Importing an i32 global with an incorrectly-typed value: BigInt WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    40 FAIL Importing an i32 global with an incorrectly-typed value: WebAssembly.Global object (wrong value type) WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    41 FAIL Importing an i64 global with an incorrectly-typed value: undefined WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    42 FAIL Importing an i64 global with an incorrectly-typed value: null WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    43 FAIL Importing an i64 global with an incorrectly-typed value: true WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    44 FAIL Importing an i64 global with an incorrectly-typed value: "" WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    45 FAIL Importing an i64 global with an incorrectly-typed value: symbol "Symbol()" WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    46 FAIL Importing an i64 global with an incorrectly-typed value: plain object WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    47 FAIL Importing an i64 global with an incorrectly-typed value: WebAssembly.Global WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    48 FAIL Importing an i64 global with an incorrectly-typed value: WebAssembly.Global.prototype WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    49 FAIL Importing an i64 global with an incorrectly-typed value: Object.create(WebAssembly.Global.prototype) WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    50 FAIL Importing an i64 global with an incorrectly-typed value: Number WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    51 FAIL Importing an i64 global with an incorrectly-typed value: WebAssembly.Global object (wrong value type) WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    52 FAIL Importing an f32 global with an incorrectly-typed value: undefined WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    53 FAIL Importing an f32 global with an incorrectly-typed value: null WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    54 FAIL Importing an f32 global with an incorrectly-typed value: true WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    55 FAIL Importing an f32 global with an incorrectly-typed value: "" WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    56 FAIL Importing an f32 global with an incorrectly-typed value: symbol "Symbol()" WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    57 FAIL Importing an f32 global with an incorrectly-typed value: plain object WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    58 FAIL Importing an f32 global with an incorrectly-typed value: WebAssembly.Global WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    59 FAIL Importing an f32 global with an incorrectly-typed value: WebAssembly.Global.prototype WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    60 FAIL Importing an f32 global with an incorrectly-typed value: Object.create(WebAssembly.Global.prototype) WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    61 FAIL Importing an f32 global with an incorrectly-typed value: BigInt WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    62 FAIL Importing an f32 global with an incorrectly-typed value: WebAssembly.Global object (wrong value type) WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    63 FAIL Importing an f64 global with an incorrectly-typed value: undefined WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    64 FAIL Importing an f64 global with an incorrectly-typed value: null WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    65 FAIL Importing an f64 global with an incorrectly-typed value: true WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    66 FAIL Importing an f64 global with an incorrectly-typed value: "" WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    67 FAIL Importing an f64 global with an incorrectly-typed value: symbol "Symbol()" WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    68 FAIL Importing an f64 global with an incorrectly-typed value: plain object WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    69 FAIL Importing an f64 global with an incorrectly-typed value: WebAssembly.Global WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    70 FAIL Importing an f64 global with an incorrectly-typed value: WebAssembly.Global.prototype WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    71 FAIL Importing an f64 global with an incorrectly-typed value: Object.create(WebAssembly.Global.prototype) WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    72 FAIL Importing an f64 global with an incorrectly-typed value: BigInt WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    73 FAIL Importing an f64 global with an incorrectly-typed value: WebAssembly.Global object (wrong value type) WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    74 FAIL Importing an i32 mutable global with a primitive value WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    75 FAIL Importing an i32 mutable global with an immutable Global object WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    76 FAIL Importing an i64 mutable global with a primitive value WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    77 FAIL Importing an i64 mutable global with an immutable Global object WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    78 FAIL Importing an f32 mutable global with a primitive value WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    79 FAIL Importing an f32 mutable global with an immutable Global object WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    80 FAIL Importing an f64 mutable global with a primitive value WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    81 FAIL Importing an f64 mutable global with an immutable Global object WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    82 FAIL Importing memory with an incorrectly-typed value: undefined WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    83 FAIL Importing memory with an incorrectly-typed value: null WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    84 FAIL Importing memory with an incorrectly-typed value: true WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    85 FAIL Importing memory with an incorrectly-typed value: "" WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    86 FAIL Importing memory with an incorrectly-typed value: symbol "Symbol()" WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    87 FAIL Importing memory with an incorrectly-typed value: 1 WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    88 FAIL Importing memory with an incorrectly-typed value: 0.1 WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    89 FAIL Importing memory with an incorrectly-typed value: NaN WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    90 FAIL Importing memory with an incorrectly-typed value: plain object WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    91 FAIL Importing memory with an incorrectly-typed value: WebAssembly.Memory WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    92 FAIL Importing memory with an incorrectly-typed value: WebAssembly.Memory.prototype WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    93 FAIL Importing memory with an incorrectly-typed value: Object.create(WebAssembly.Memory.prototype) WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    94 FAIL Importing memory with an incorrectly-typed value: WebAssembly.Memory object (too large) WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    95 FAIL Importing table with an incorrectly-typed value: undefined WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    96 FAIL Importing table with an incorrectly-typed value: null WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    97 FAIL Importing table with an incorrectly-typed value: true WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    98 FAIL Importing table with an incorrectly-typed value: "" WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    99 FAIL Importing table with an incorrectly-typed value: symbol "Symbol()" WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    100 FAIL Importing table with an incorrectly-typed value: 1 WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    101 FAIL Importing table with an incorrectly-typed value: 0.1 WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    102 FAIL Importing table with an incorrectly-typed value: NaN WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    103 FAIL Importing table with an incorrectly-typed value: plain object WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    104 FAIL Importing table with an incorrectly-typed value: WebAssembly.Table WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    105 FAIL Importing table with an incorrectly-typed value: WebAssembly.Table.prototype WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    106 FAIL Importing table with an incorrectly-typed value: Object.create(WebAssembly.Table.prototype) WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
    107 FAIL Importing table with an incorrectly-typed value: WebAssembly.Table object (too large) WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)
     2PASS Non-object imports argument: null
     3PASS Non-object imports argument: true
     4PASS Non-object imports argument: ""
     5PASS Non-object imports argument: symbol "Symbol()"
     6PASS Non-object imports argument: 1
     7PASS Non-object imports argument: 0.1
     8PASS Non-object imports argument: NaN
     9PASS Non-object module: undefined
     10PASS Non-object module: null
     11PASS Non-object module: true
     12PASS Non-object module: ""
     13PASS Non-object module: symbol "Symbol()"
     14PASS Non-object module: 1
     15PASS Non-object module: 0.1
     16PASS Non-object module: NaN
     17PASS Missing imports argument
     18PASS Imports argument with missing property: undefined
     19PASS Imports argument with missing property: empty object
     20PASS Imports argument with missing property: wrong property
     21PASS Importing a function with an incorrectly-typed value: undefined
     22PASS Importing a function with an incorrectly-typed value: null
     23PASS Importing a function with an incorrectly-typed value: true
     24PASS Importing a function with an incorrectly-typed value: ""
     25PASS Importing a function with an incorrectly-typed value: symbol "Symbol()"
     26PASS Importing a function with an incorrectly-typed value: 1
     27PASS Importing a function with an incorrectly-typed value: 0.1
     28PASS Importing a function with an incorrectly-typed value: NaN
     29PASS Importing a function with an incorrectly-typed value: object "[object Object]"
     30PASS Importing an i32 global with an incorrectly-typed value: undefined
     31PASS Importing an i32 global with an incorrectly-typed value: null
     32PASS Importing an i32 global with an incorrectly-typed value: true
     33PASS Importing an i32 global with an incorrectly-typed value: ""
     34PASS Importing an i32 global with an incorrectly-typed value: symbol "Symbol()"
     35PASS Importing an i32 global with an incorrectly-typed value: plain object
     36PASS Importing an i32 global with an incorrectly-typed value: WebAssembly.Global
     37PASS Importing an i32 global with an incorrectly-typed value: WebAssembly.Global.prototype
     38PASS Importing an i32 global with an incorrectly-typed value: Object.create(WebAssembly.Global.prototype)
     39PASS Importing an i32 global with an incorrectly-typed value: BigInt
     40PASS Importing an i32 global with an incorrectly-typed value: WebAssembly.Global object (wrong value type)
     41PASS Importing an i64 global with an incorrectly-typed value: undefined
     42PASS Importing an i64 global with an incorrectly-typed value: null
     43PASS Importing an i64 global with an incorrectly-typed value: true
     44PASS Importing an i64 global with an incorrectly-typed value: ""
     45PASS Importing an i64 global with an incorrectly-typed value: symbol "Symbol()"
     46PASS Importing an i64 global with an incorrectly-typed value: plain object
     47PASS Importing an i64 global with an incorrectly-typed value: WebAssembly.Global
     48PASS Importing an i64 global with an incorrectly-typed value: WebAssembly.Global.prototype
     49PASS Importing an i64 global with an incorrectly-typed value: Object.create(WebAssembly.Global.prototype)
     50PASS Importing an i64 global with an incorrectly-typed value: Number
     51PASS Importing an i64 global with an incorrectly-typed value: WebAssembly.Global object (wrong value type)
     52PASS Importing an f32 global with an incorrectly-typed value: undefined
     53PASS Importing an f32 global with an incorrectly-typed value: null
     54PASS Importing an f32 global with an incorrectly-typed value: true
     55PASS Importing an f32 global with an incorrectly-typed value: ""
     56PASS Importing an f32 global with an incorrectly-typed value: symbol "Symbol()"
     57PASS Importing an f32 global with an incorrectly-typed value: plain object
     58PASS Importing an f32 global with an incorrectly-typed value: WebAssembly.Global
     59PASS Importing an f32 global with an incorrectly-typed value: WebAssembly.Global.prototype
     60PASS Importing an f32 global with an incorrectly-typed value: Object.create(WebAssembly.Global.prototype)
     61PASS Importing an f32 global with an incorrectly-typed value: BigInt
     62PASS Importing an f32 global with an incorrectly-typed value: WebAssembly.Global object (wrong value type)
     63PASS Importing an f64 global with an incorrectly-typed value: undefined
     64PASS Importing an f64 global with an incorrectly-typed value: null
     65PASS Importing an f64 global with an incorrectly-typed value: true
     66PASS Importing an f64 global with an incorrectly-typed value: ""
     67PASS Importing an f64 global with an incorrectly-typed value: symbol "Symbol()"
     68PASS Importing an f64 global with an incorrectly-typed value: plain object
     69PASS Importing an f64 global with an incorrectly-typed value: WebAssembly.Global
     70PASS Importing an f64 global with an incorrectly-typed value: WebAssembly.Global.prototype
     71PASS Importing an f64 global with an incorrectly-typed value: Object.create(WebAssembly.Global.prototype)
     72PASS Importing an f64 global with an incorrectly-typed value: BigInt
     73PASS Importing an f64 global with an incorrectly-typed value: WebAssembly.Global object (wrong value type)
     74PASS Importing an i32 mutable global with a primitive value
     75PASS Importing an i32 mutable global with an immutable Global object
     76PASS Importing an i64 mutable global with a primitive value
     77PASS Importing an i64 mutable global with an immutable Global object
     78PASS Importing an f32 mutable global with a primitive value
     79PASS Importing an f32 mutable global with an immutable Global object
     80PASS Importing an f64 mutable global with a primitive value
     81PASS Importing an f64 mutable global with an immutable Global object
     82PASS Importing memory with an incorrectly-typed value: undefined
     83PASS Importing memory with an incorrectly-typed value: null
     84PASS Importing memory with an incorrectly-typed value: true
     85PASS Importing memory with an incorrectly-typed value: ""
     86PASS Importing memory with an incorrectly-typed value: symbol "Symbol()"
     87PASS Importing memory with an incorrectly-typed value: 1
     88PASS Importing memory with an incorrectly-typed value: 0.1
     89PASS Importing memory with an incorrectly-typed value: NaN
     90PASS Importing memory with an incorrectly-typed value: plain object
     91PASS Importing memory with an incorrectly-typed value: WebAssembly.Memory
     92PASS Importing memory with an incorrectly-typed value: WebAssembly.Memory.prototype
     93PASS Importing memory with an incorrectly-typed value: Object.create(WebAssembly.Memory.prototype)
     94PASS Importing memory with an incorrectly-typed value: WebAssembly.Memory object (too large)
     95PASS Importing table with an incorrectly-typed value: undefined
     96PASS Importing table with an incorrectly-typed value: null
     97PASS Importing table with an incorrectly-typed value: true
     98PASS Importing table with an incorrectly-typed value: ""
     99PASS Importing table with an incorrectly-typed value: symbol "Symbol()"
     100PASS Importing table with an incorrectly-typed value: 1
     101PASS Importing table with an incorrectly-typed value: 0.1
     102PASS Importing table with an incorrectly-typed value: NaN
     103PASS Importing table with an incorrectly-typed value: plain object
     104PASS Importing table with an incorrectly-typed value: WebAssembly.Table
     105PASS Importing table with an incorrectly-typed value: WebAssembly.Table.prototype
     106PASS Importing table with an incorrectly-typed value: Object.create(WebAssembly.Table.prototype)
     107PASS Importing table with an incorrectly-typed value: WebAssembly.Table object (too large)
    108108
  • trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/instantiateStreaming.any-expected.txt

    r271774 r271993  
    11
    2 FAIL Empty module without imports argument promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)"
    3 FAIL Empty module with undefined imports argument promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)"
    4 FAIL Empty module with empty imports argument promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)"
    5 FAIL getter order for imports object promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)"
    6 FAIL imports promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)"
    7 FAIL imports with empty module names promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)"
    8 FAIL imports with empty names promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)"
    9 FAIL exports with empty name: function promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)"
    10 FAIL exports with empty name: table promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)"
    11 FAIL exports with empty name: global promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)"
    12 FAIL No imports promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)"
    13 FAIL exports and imports promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)"
    14 FAIL i64 exports and imports promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)"
    15 FAIL import with i32-returning function promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)"
    16 FAIL import with function that takes and returns i32 promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)"
    17 FAIL import with i64-returning function promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)"
    18 FAIL import with function that takes and returns i64 promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)"
    19 FAIL import with i32-taking function promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)"
    20 FAIL import with i64-taking function promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)"
    21 FAIL export i64-returning function promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)"
    22 FAIL i32 mutable WebAssembly.Global import promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)"
    23 FAIL i64 mutable WebAssembly.Global import promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)"
    24 FAIL Multiple i64 arguments promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)"
    25 FAIL stray argument promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)"
    26 FAIL Synchronous options handling promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, imports)', 'WebAssembly.instantiateStreaming' is undefined)"
     2PASS Empty module without imports argument
     3PASS Empty module with undefined imports argument
     4PASS Empty module with empty imports argument
     5FAIL getter order for imports object assert_array_equals: expected property 1 to be "global1 getter" but got "memory getter" (expected array ["module getter", "global1 getter", "module2 getter", "global3 getter", "module getter", "memory getter", "module getter", "global2 getter"] got ["module getter", "memory getter", "module getter", "global1 getter", "module2 getter", "global3 getter", "module getter", "global2 getter"])
     6PASS imports
     7PASS imports with empty module names
     8PASS imports with empty names
     9PASS exports with empty name: function
     10PASS exports with empty name: table
     11PASS exports with empty name: global
     12PASS No imports
     13PASS exports and imports
     14PASS i64 exports and imports
     15PASS import with i32-returning function
     16PASS import with function that takes and returns i32
     17PASS import with i64-returning function
     18PASS import with function that takes and returns i64
     19PASS import with i32-taking function
     20PASS import with i64-taking function
     21PASS export i64-returning function
     22PASS i32 mutable WebAssembly.Global import
     23PASS i64 mutable WebAssembly.Global import
     24PASS Multiple i64 arguments
     25PASS stray argument
     26PASS Synchronous options handling
    2727
  • trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/instantiateStreaming.any.worker-expected.txt

    r271774 r271993  
    11
    2 FAIL Empty module without imports argument promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)"
    3 FAIL Empty module with undefined imports argument promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)"
    4 FAIL Empty module with empty imports argument promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)"
    5 FAIL getter order for imports object promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)"
    6 FAIL imports promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)"
    7 FAIL imports with empty module names promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)"
    8 FAIL imports with empty names promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)"
    9 FAIL exports with empty name: function promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)"
    10 FAIL exports with empty name: table promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)"
    11 FAIL exports with empty name: global promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)"
    12 FAIL No imports promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)"
    13 FAIL exports and imports promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)"
    14 FAIL i64 exports and imports promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)"
    15 FAIL import with i32-returning function promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)"
    16 FAIL import with function that takes and returns i32 promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)"
    17 FAIL import with i64-returning function promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)"
    18 FAIL import with function that takes and returns i64 promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)"
    19 FAIL import with i32-taking function promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)"
    20 FAIL import with i64-taking function promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)"
    21 FAIL export i64-returning function promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)"
    22 FAIL i32 mutable WebAssembly.Global import promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)"
    23 FAIL i64 mutable WebAssembly.Global import promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)"
    24 FAIL Multiple i64 arguments promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)"
    25 FAIL stray argument promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, ...args)', 'WebAssembly.instantiateStreaming' is undefined)"
    26 FAIL Synchronous options handling promise_test: Unhandled rejection with value: object "TypeError: WebAssembly.instantiateStreaming is not a function. (In 'WebAssembly.instantiateStreaming(response, imports)', 'WebAssembly.instantiateStreaming' is undefined)"
     2PASS Empty module without imports argument
     3PASS Empty module with undefined imports argument
     4PASS Empty module with empty imports argument
     5FAIL getter order for imports object assert_array_equals: expected property 1 to be "global1 getter" but got "memory getter" (expected array ["module getter", "global1 getter", "module2 getter", "global3 getter", "module getter", "memory getter", "module getter", "global2 getter"] got ["module getter", "memory getter", "module getter", "global1 getter", "module2 getter", "global3 getter", "module getter", "global2 getter"])
     6PASS imports
     7PASS imports with empty module names
     8PASS imports with empty names
     9PASS exports with empty name: function
     10PASS exports with empty name: table
     11PASS exports with empty name: global
     12PASS No imports
     13PASS exports and imports
     14PASS i64 exports and imports
     15PASS import with i32-returning function
     16PASS import with function that takes and returns i32
     17PASS import with i64-returning function
     18PASS import with function that takes and returns i64
     19PASS import with i32-taking function
     20PASS import with i64-taking function
     21PASS export i64-returning function
     22PASS i32 mutable WebAssembly.Global import
     23PASS i64 mutable WebAssembly.Global import
     24PASS Multiple i64 arguments
     25PASS stray argument
     26PASS Synchronous options handling
    2727
  • trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/invalid-args.any-expected.txt

    r269866 r271993  
    11
    2 FAIL compileStreaming: undefined WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    3 FAIL compileStreaming: undefined in a promise WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    4 FAIL compileStreaming: null WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    5 FAIL compileStreaming: null in a promise WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    6 FAIL compileStreaming: true WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    7 FAIL compileStreaming: true in a promise WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    8 FAIL compileStreaming: "test" WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    9 FAIL compileStreaming: "test" in a promise WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    10 FAIL compileStreaming: symbol "Symbol()" WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    11 FAIL compileStreaming: symbol "Symbol()" in a promise WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    12 FAIL compileStreaming: 0 WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    13 FAIL compileStreaming: 0 in a promise WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    14 FAIL compileStreaming: 0.1 WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    15 FAIL compileStreaming: 0.1 in a promise WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    16 FAIL compileStreaming: NaN WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    17 FAIL compileStreaming: NaN in a promise WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    18 FAIL compileStreaming: Empty object WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    19 FAIL compileStreaming: Empty object in a promise WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    20 FAIL compileStreaming: Response interface object WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    21 FAIL compileStreaming: Response interface object in a promise WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    22 FAIL compileStreaming: Response interface prototype object WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    23 FAIL compileStreaming: Response interface prototype object in a promise WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    24 FAIL instantiateStreaming: undefined WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    25 FAIL instantiateStreaming: undefined in a promise WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    26 FAIL instantiateStreaming: null WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    27 FAIL instantiateStreaming: null in a promise WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    28 FAIL instantiateStreaming: true WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    29 FAIL instantiateStreaming: true in a promise WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    30 FAIL instantiateStreaming: "test" WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    31 FAIL instantiateStreaming: "test" in a promise WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    32 FAIL instantiateStreaming: symbol "Symbol()" WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    33 FAIL instantiateStreaming: symbol "Symbol()" in a promise WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    34 FAIL instantiateStreaming: 0 WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    35 FAIL instantiateStreaming: 0 in a promise WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    36 FAIL instantiateStreaming: 0.1 WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    37 FAIL instantiateStreaming: 0.1 in a promise WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    38 FAIL instantiateStreaming: NaN WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    39 FAIL instantiateStreaming: NaN in a promise WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    40 FAIL instantiateStreaming: Empty object WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    41 FAIL instantiateStreaming: Empty object in a promise WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    42 FAIL instantiateStreaming: Response interface object WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    43 FAIL instantiateStreaming: Response interface object in a promise WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    44 FAIL instantiateStreaming: Response interface prototype object WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    45 FAIL instantiateStreaming: Response interface prototype object in a promise WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
     2PASS compileStreaming: undefined
     3PASS compileStreaming: undefined in a promise
     4PASS compileStreaming: null
     5PASS compileStreaming: null in a promise
     6PASS compileStreaming: true
     7PASS compileStreaming: true in a promise
     8PASS compileStreaming: "test"
     9PASS compileStreaming: "test" in a promise
     10PASS compileStreaming: symbol "Symbol()"
     11PASS compileStreaming: symbol "Symbol()" in a promise
     12PASS compileStreaming: 0
     13PASS compileStreaming: 0 in a promise
     14PASS compileStreaming: 0.1
     15PASS compileStreaming: 0.1 in a promise
     16PASS compileStreaming: NaN
     17PASS compileStreaming: NaN in a promise
     18PASS compileStreaming: Empty object
     19PASS compileStreaming: Empty object in a promise
     20PASS compileStreaming: Response interface object
     21PASS compileStreaming: Response interface object in a promise
     22PASS compileStreaming: Response interface prototype object
     23PASS compileStreaming: Response interface prototype object in a promise
     24PASS instantiateStreaming: undefined
     25PASS instantiateStreaming: undefined in a promise
     26PASS instantiateStreaming: null
     27PASS instantiateStreaming: null in a promise
     28PASS instantiateStreaming: true
     29PASS instantiateStreaming: true in a promise
     30PASS instantiateStreaming: "test"
     31PASS instantiateStreaming: "test" in a promise
     32PASS instantiateStreaming: symbol "Symbol()"
     33PASS instantiateStreaming: symbol "Symbol()" in a promise
     34PASS instantiateStreaming: 0
     35PASS instantiateStreaming: 0 in a promise
     36PASS instantiateStreaming: 0.1
     37PASS instantiateStreaming: 0.1 in a promise
     38PASS instantiateStreaming: NaN
     39PASS instantiateStreaming: NaN in a promise
     40PASS instantiateStreaming: Empty object
     41PASS instantiateStreaming: Empty object in a promise
     42PASS instantiateStreaming: Response interface object
     43PASS instantiateStreaming: Response interface object in a promise
     44PASS instantiateStreaming: Response interface prototype object
     45PASS instantiateStreaming: Response interface prototype object in a promise
    4646
  • trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/invalid-args.any.worker-expected.txt

    r269866 r271993  
    11
    2 FAIL compileStreaming: undefined WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    3 FAIL compileStreaming: undefined in a promise WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    4 FAIL compileStreaming: null WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    5 FAIL compileStreaming: null in a promise WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    6 FAIL compileStreaming: true WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    7 FAIL compileStreaming: true in a promise WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    8 FAIL compileStreaming: "test" WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    9 FAIL compileStreaming: "test" in a promise WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    10 FAIL compileStreaming: symbol "Symbol()" WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    11 FAIL compileStreaming: symbol "Symbol()" in a promise WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    12 FAIL compileStreaming: 0 WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    13 FAIL compileStreaming: 0 in a promise WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    14 FAIL compileStreaming: 0.1 WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    15 FAIL compileStreaming: 0.1 in a promise WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    16 FAIL compileStreaming: NaN WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    17 FAIL compileStreaming: NaN in a promise WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    18 FAIL compileStreaming: Empty object WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    19 FAIL compileStreaming: Empty object in a promise WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    20 FAIL compileStreaming: Response interface object WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    21 FAIL compileStreaming: Response interface object in a promise WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    22 FAIL compileStreaming: Response interface prototype object WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    23 FAIL compileStreaming: Response interface prototype object in a promise WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    24 FAIL instantiateStreaming: undefined WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    25 FAIL instantiateStreaming: undefined in a promise WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    26 FAIL instantiateStreaming: null WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    27 FAIL instantiateStreaming: null in a promise WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    28 FAIL instantiateStreaming: true WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    29 FAIL instantiateStreaming: true in a promise WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    30 FAIL instantiateStreaming: "test" WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    31 FAIL instantiateStreaming: "test" in a promise WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    32 FAIL instantiateStreaming: symbol "Symbol()" WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    33 FAIL instantiateStreaming: symbol "Symbol()" in a promise WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    34 FAIL instantiateStreaming: 0 WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    35 FAIL instantiateStreaming: 0 in a promise WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    36 FAIL instantiateStreaming: 0.1 WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    37 FAIL instantiateStreaming: 0.1 in a promise WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    38 FAIL instantiateStreaming: NaN WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    39 FAIL instantiateStreaming: NaN in a promise WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    40 FAIL instantiateStreaming: Empty object WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    41 FAIL instantiateStreaming: Empty object in a promise WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    42 FAIL instantiateStreaming: Response interface object WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    43 FAIL instantiateStreaming: Response interface object in a promise WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    44 FAIL instantiateStreaming: Response interface prototype object WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
    45 FAIL instantiateStreaming: Response interface prototype object in a promise WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)
     2PASS compileStreaming: undefined
     3PASS compileStreaming: undefined in a promise
     4PASS compileStreaming: null
     5PASS compileStreaming: null in a promise
     6PASS compileStreaming: true
     7PASS compileStreaming: true in a promise
     8PASS compileStreaming: "test"
     9PASS compileStreaming: "test" in a promise
     10PASS compileStreaming: symbol "Symbol()"
     11PASS compileStreaming: symbol "Symbol()" in a promise
     12PASS compileStreaming: 0
     13PASS compileStreaming: 0 in a promise
     14PASS compileStreaming: 0.1
     15PASS compileStreaming: 0.1 in a promise
     16PASS compileStreaming: NaN
     17PASS compileStreaming: NaN in a promise
     18PASS compileStreaming: Empty object
     19PASS compileStreaming: Empty object in a promise
     20PASS compileStreaming: Response interface object
     21PASS compileStreaming: Response interface object in a promise
     22PASS compileStreaming: Response interface prototype object
     23PASS compileStreaming: Response interface prototype object in a promise
     24PASS instantiateStreaming: undefined
     25PASS instantiateStreaming: undefined in a promise
     26PASS instantiateStreaming: null
     27PASS instantiateStreaming: null in a promise
     28PASS instantiateStreaming: true
     29PASS instantiateStreaming: true in a promise
     30PASS instantiateStreaming: "test"
     31PASS instantiateStreaming: "test" in a promise
     32PASS instantiateStreaming: symbol "Symbol()"
     33PASS instantiateStreaming: symbol "Symbol()" in a promise
     34PASS instantiateStreaming: 0
     35PASS instantiateStreaming: 0 in a promise
     36PASS instantiateStreaming: 0.1
     37PASS instantiateStreaming: 0.1 in a promise
     38PASS instantiateStreaming: NaN
     39PASS instantiateStreaming: NaN in a promise
     40PASS instantiateStreaming: Empty object
     41PASS instantiateStreaming: Empty object in a promise
     42PASS instantiateStreaming: Response interface object
     43PASS instantiateStreaming: Response interface object in a promise
     44PASS instantiateStreaming: Response interface prototype object
     45PASS instantiateStreaming: Response interface prototype object in a promise
    4646
  • trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/invalid-code.any-expected.txt

    r271774 r271993  
    11
    2 FAIL Invalid code (0x0000): compileStreaming WebAssembly[method] is not a function. (In 'WebAssembly[method](response)', 'WebAssembly[method]' is undefined)
    3 FAIL Invalid code (0xCAFE): compileStreaming WebAssembly[method] is not a function. (In 'WebAssembly[method](response)', 'WebAssembly[method]' is undefined)
    4 FAIL Invalid code (0x0000): instantiateStreaming WebAssembly[method] is not a function. (In 'WebAssembly[method](response)', 'WebAssembly[method]' is undefined)
    5 FAIL Invalid code (0xCAFE): instantiateStreaming WebAssembly[method] is not a function. (In 'WebAssembly[method](response)', 'WebAssembly[method]' is undefined)
     2PASS Invalid code (0x0000): compileStreaming
     3PASS Invalid code (0xCAFE): compileStreaming
     4PASS Invalid code (0x0000): instantiateStreaming
     5PASS Invalid code (0xCAFE): instantiateStreaming
    66
  • trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/invalid-code.any.worker-expected.txt

    r271774 r271993  
    11
    2 FAIL Invalid code (0x0000): compileStreaming WebAssembly[method] is not a function. (In 'WebAssembly[method](response)', 'WebAssembly[method]' is undefined)
    3 FAIL Invalid code (0xCAFE): compileStreaming WebAssembly[method] is not a function. (In 'WebAssembly[method](response)', 'WebAssembly[method]' is undefined)
    4 FAIL Invalid code (0x0000): instantiateStreaming WebAssembly[method] is not a function. (In 'WebAssembly[method](response)', 'WebAssembly[method]' is undefined)
    5 FAIL Invalid code (0xCAFE): instantiateStreaming WebAssembly[method] is not a function. (In 'WebAssembly[method](response)', 'WebAssembly[method]' is undefined)
     2PASS Invalid code (0x0000): compileStreaming
     3PASS Invalid code (0xCAFE): compileStreaming
     4PASS Invalid code (0x0000): instantiateStreaming
     5PASS Invalid code (0xCAFE): instantiateStreaming
    66
  • trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/modified-contenttype.any-expected.txt

    r271774 r271993  
    11
    2 FAIL compileStreaming with Content-Type set late promise_test: Unhandled rejection with value: object "TypeError: WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)"
    3 FAIL compileStreaming with Content-Type removed late promise_test: Unhandled rejection with value: object "TypeError: WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)"
    4 FAIL instantiateStreaming with Content-Type set late promise_test: Unhandled rejection with value: object "TypeError: WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)"
    5 FAIL instantiateStreaming with Content-Type removed late promise_test: Unhandled rejection with value: object "TypeError: WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)"
     2PASS compileStreaming with Content-Type set late
     3PASS compileStreaming with Content-Type removed late
     4PASS instantiateStreaming with Content-Type set late
     5PASS instantiateStreaming with Content-Type removed late
    66
  • trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/modified-contenttype.any.worker-expected.txt

    r271774 r271993  
    11
    2 FAIL compileStreaming with Content-Type set late promise_test: Unhandled rejection with value: object "TypeError: WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)"
    3 FAIL compileStreaming with Content-Type removed late promise_test: Unhandled rejection with value: object "TypeError: WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)"
    4 FAIL instantiateStreaming with Content-Type set late promise_test: Unhandled rejection with value: object "TypeError: WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)"
    5 FAIL instantiateStreaming with Content-Type removed late promise_test: Unhandled rejection with value: object "TypeError: WebAssembly[method] is not a function. (In 'WebAssembly[method](argument)', 'WebAssembly[method]' is undefined)"
     2PASS compileStreaming with Content-Type set late
     3PASS compileStreaming with Content-Type removed late
     4PASS instantiateStreaming with Content-Type set late
     5PASS instantiateStreaming with Content-Type removed late
    66
  • trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/origin.sub.any-expected.txt

    r269866 r271993  
    11
    2 FAIL Opaque response: compileStreaming WebAssembly[method] is not a function. (In 'WebAssembly[method](response)', 'WebAssembly[method]' is undefined)
    3 FAIL Opaque redirect response: compileStreaming WebAssembly[method] is not a function. (In 'WebAssembly[method](response)', 'WebAssembly[method]' is undefined)
    4 FAIL Opaque response: instantiateStreaming WebAssembly[method] is not a function. (In 'WebAssembly[method](response)', 'WebAssembly[method]' is undefined)
    5 FAIL Opaque redirect response: instantiateStreaming WebAssembly[method] is not a function. (In 'WebAssembly[method](response)', 'WebAssembly[method]' is undefined)
     2PASS Opaque response: compileStreaming
     3PASS Opaque redirect response: compileStreaming
     4PASS Opaque response: instantiateStreaming
     5PASS Opaque redirect response: instantiateStreaming
    66
  • trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/origin.sub.any.worker-expected.txt

    r269866 r271993  
    11
    2 FAIL Opaque response: compileStreaming WebAssembly[method] is not a function. (In 'WebAssembly[method](response)', 'WebAssembly[method]' is undefined)
    3 FAIL Opaque redirect response: compileStreaming WebAssembly[method] is not a function. (In 'WebAssembly[method](response)', 'WebAssembly[method]' is undefined)
    4 FAIL Opaque response: instantiateStreaming WebAssembly[method] is not a function. (In 'WebAssembly[method](response)', 'WebAssembly[method]' is undefined)
    5 FAIL Opaque redirect response: instantiateStreaming WebAssembly[method] is not a function. (In 'WebAssembly[method](response)', 'WebAssembly[method]' is undefined)
     2PASS Opaque response: compileStreaming
     3PASS Opaque redirect response: compileStreaming
     4PASS Opaque response: instantiateStreaming
     5PASS Opaque redirect response: instantiateStreaming
    66
  • trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/rejected-arg.any-expected.txt

    r269866 r271993  
    11
    2 FAIL compileStreaming WebAssembly[method] is not a function. (In 'WebAssembly[method](promise)', 'WebAssembly[method]' is undefined)
    3 FAIL instantiateStreaming WebAssembly[method] is not a function. (In 'WebAssembly[method](promise)', 'WebAssembly[method]' is undefined)
     2PASS compileStreaming
     3PASS instantiateStreaming
    44
  • trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/rejected-arg.any.worker-expected.txt

    r269866 r271993  
    11
    2 FAIL compileStreaming WebAssembly[method] is not a function. (In 'WebAssembly[method](promise)', 'WebAssembly[method]' is undefined)
    3 FAIL instantiateStreaming WebAssembly[method] is not a function. (In 'WebAssembly[method](promise)', 'WebAssembly[method]' is undefined)
     2PASS compileStreaming
     3PASS instantiateStreaming
    44
  • trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/status.any-expected.txt

    r269866 r271993  
    11
    2 FAIL Response with status 0: compileStreaming WebAssembly[method] is not a function. (In 'WebAssembly[method](response)', 'WebAssembly[method]' is undefined)
    3 FAIL Response with status 300: compileStreaming WebAssembly[method] is not a function. (In 'WebAssembly[method](response)', 'WebAssembly[method]' is undefined)
    4 FAIL Response with status 400: compileStreaming WebAssembly[method] is not a function. (In 'WebAssembly[method](response)', 'WebAssembly[method]' is undefined)
    5 FAIL Response with status 404: compileStreaming WebAssembly[method] is not a function. (In 'WebAssembly[method](response)', 'WebAssembly[method]' is undefined)
    6 FAIL Response with status 500: compileStreaming WebAssembly[method] is not a function. (In 'WebAssembly[method](response)', 'WebAssembly[method]' is undefined)
    7 FAIL Response with status 600: compileStreaming WebAssembly[method] is not a function. (In 'WebAssembly[method](response)', 'WebAssembly[method]' is undefined)
    8 FAIL Response with status 700: compileStreaming WebAssembly[method] is not a function. (In 'WebAssembly[method](response)', 'WebAssembly[method]' is undefined)
    9 FAIL Response with status 999: compileStreaming WebAssembly[method] is not a function. (In 'WebAssembly[method](response)', 'WebAssembly[method]' is undefined)
    10 FAIL Response with status 0: instantiateStreaming WebAssembly[method] is not a function. (In 'WebAssembly[method](response)', 'WebAssembly[method]' is undefined)
    11 FAIL Response with status 300: instantiateStreaming WebAssembly[method] is not a function. (In 'WebAssembly[method](response)', 'WebAssembly[method]' is undefined)
    12 FAIL Response with status 400: instantiateStreaming WebAssembly[method] is not a function. (In 'WebAssembly[method](response)', 'WebAssembly[method]' is undefined)
    13 FAIL Response with status 404: instantiateStreaming WebAssembly[method] is not a function. (In 'WebAssembly[method](response)', 'WebAssembly[method]' is undefined)
    14 FAIL Response with status 500: instantiateStreaming WebAssembly[method] is not a function. (In 'WebAssembly[method](response)', 'WebAssembly[method]' is undefined)
    15 FAIL Response with status 600: instantiateStreaming WebAssembly[method] is not a function. (In 'WebAssembly[method](response)', 'WebAssembly[method]' is undefined)
    16 FAIL Response with status 700: instantiateStreaming WebAssembly[method] is not a function. (In 'WebAssembly[method](response)', 'WebAssembly[method]' is undefined)
    17 FAIL Response with status 999: instantiateStreaming WebAssembly[method] is not a function. (In 'WebAssembly[method](response)', 'WebAssembly[method]' is undefined)
     2PASS Response with status 0: compileStreaming
     3PASS Response with status 300: compileStreaming
     4PASS Response with status 400: compileStreaming
     5PASS Response with status 404: compileStreaming
     6PASS Response with status 500: compileStreaming
     7PASS Response with status 600: compileStreaming
     8PASS Response with status 700: compileStreaming
     9PASS Response with status 999: compileStreaming
     10PASS Response with status 0: instantiateStreaming
     11PASS Response with status 300: instantiateStreaming
     12PASS Response with status 400: instantiateStreaming
     13PASS Response with status 404: instantiateStreaming
     14PASS Response with status 500: instantiateStreaming
     15PASS Response with status 600: instantiateStreaming
     16PASS Response with status 700: instantiateStreaming
     17PASS Response with status 999: instantiateStreaming
    1818
  • trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/webapi/status.any.worker-expected.txt

    r269866 r271993  
    11
    2 FAIL Response with status 0: compileStreaming WebAssembly[method] is not a function. (In 'WebAssembly[method](response)', 'WebAssembly[method]' is undefined)
    3 FAIL Response with status 300: compileStreaming WebAssembly[method] is not a function. (In 'WebAssembly[method](response)', 'WebAssembly[method]' is undefined)
    4 FAIL Response with status 400: compileStreaming WebAssembly[method] is not a function. (In 'WebAssembly[method](response)', 'WebAssembly[method]' is undefined)
    5 FAIL Response with status 404: compileStreaming WebAssembly[method] is not a function. (In 'WebAssembly[method](response)', 'WebAssembly[method]' is undefined)
    6 FAIL Response with status 500: compileStreaming WebAssembly[method] is not a function. (In 'WebAssembly[method](response)', 'WebAssembly[method]' is undefined)
    7 FAIL Response with status 600: compileStreaming WebAssembly[method] is not a function. (In 'WebAssembly[method](response)', 'WebAssembly[method]' is undefined)
    8 FAIL Response with status 700: compileStreaming WebAssembly[method] is not a function. (In 'WebAssembly[method](response)', 'WebAssembly[method]' is undefined)
    9 FAIL Response with status 999: compileStreaming WebAssembly[method] is not a function. (In 'WebAssembly[method](response)', 'WebAssembly[method]' is undefined)
    10 FAIL Response with status 0: instantiateStreaming WebAssembly[method] is not a function. (In 'WebAssembly[method](response)', 'WebAssembly[method]' is undefined)
    11 FAIL Response with status 300: instantiateStreaming WebAssembly[method] is not a function. (In 'WebAssembly[method](response)', 'WebAssembly[method]' is undefined)
    12 FAIL Response with status 400: instantiateStreaming WebAssembly[method] is not a function. (In 'WebAssembly[method](response)', 'WebAssembly[method]' is undefined)
    13 FAIL Response with status 404: instantiateStreaming WebAssembly[method] is not a function. (In 'WebAssembly[method](response)', 'WebAssembly[method]' is undefined)
    14 FAIL Response with status 500: instantiateStreaming WebAssembly[method] is not a function. (In 'WebAssembly[method](response)', 'WebAssembly[method]' is undefined)
    15 FAIL Response with status 600: instantiateStreaming WebAssembly[method] is not a function. (In 'WebAssembly[method](response)', 'WebAssembly[method]' is undefined)
    16 FAIL Response with status 700: instantiateStreaming WebAssembly[method] is not a function. (In 'WebAssembly[method](response)', 'WebAssembly[method]' is undefined)
    17 FAIL Response with status 999: instantiateStreaming WebAssembly[method] is not a function. (In 'WebAssembly[method](response)', 'WebAssembly[method]' is undefined)
     2PASS Response with status 0: compileStreaming
     3PASS Response with status 300: compileStreaming
     4PASS Response with status 400: compileStreaming
     5PASS Response with status 404: compileStreaming
     6PASS Response with status 500: compileStreaming
     7PASS Response with status 600: compileStreaming
     8PASS Response with status 700: compileStreaming
     9PASS Response with status 999: compileStreaming
     10PASS Response with status 0: instantiateStreaming
     11PASS Response with status 300: instantiateStreaming
     12PASS Response with status 400: instantiateStreaming
     13PASS Response with status 404: instantiateStreaming
     14PASS Response with status 500: instantiateStreaming
     15PASS Response with status 600: instantiateStreaming
     16PASS Response with status 700: instantiateStreaming
     17PASS Response with status 999: instantiateStreaming
    1818
  • trunk/Source/JavaScriptCore/CMakeLists.txt

    r271942 r271993  
    11041104    wasm/WasmNameSection.h
    11051105    wasm/WasmPageCount.h
     1106    wasm/WasmSections.h
    11061107    wasm/WasmSignature.h
     1108    wasm/WasmStreamingCompiler.h
     1109    wasm/WasmStreamingParser.h
    11071110    wasm/WasmTierUpCount.h
    11081111
  • trunk/Source/JavaScriptCore/ChangeLog

    r271987 r271993  
     12021-01-27  Yusuke Suzuki  <ysuzuki@apple.com>
     2
     3        WebAssembly: add support for stream APIs
     4        https://bugs.webkit.org/show_bug.cgi?id=173105
     5
     6        Reviewed by Keith Miller.
     7
     8        This patch implements WebAssembly.{compileStreaming,instantiateStreaming}. JavaScriptCore offers Wasm::StreamingCompiler interface to WebCore,
     9        so that WebCore can feed FetchResponse and compile wasm code in a streaming fashion.
     10
     11        Wasm::StreamingCompiler drives Wasm::LLIntPlan while it does not use Wasm::Worklist since currently Wasm::Worklist is not suitable abstraction for
     12        streaming compilation which generates compilation tasks incrementally. Instead, Wasm::StreamingCompiler generates Wasm::StreamingPlan and enqueues
     13        them to Wasm::Worklist, and each StreamingPlan compiles one function at a time. And we gather these compiled functions into the one LLIntPlan and
     14        finally Wasm::StreamingCompiler completes Wasm::LLIntPlan.
     15
     16        We already have Wasm::StreamingParser, which is designed for streaming compilation. We can pass bytes to this parser, and this parser invokes a callback
     17        when a new wasm function is found. Then, Wasm::StreamingCompiler generates Wasm::StreamingPlan for that.
     18
     19        We add WasmStreamingCompiler JS objects to JSC shell to test streaming compilation easily.
     20
     21        * CMakeLists.txt:
     22        * JavaScriptCore.xcodeproj/project.pbxproj:
     23        * Sources.txt:
     24        * builtins/WebAssembly.js:
     25        (compileStreaming):
     26        (instantiateStreaming):
     27        * runtime/DeferredWorkTimer.cpp:
     28        (JSC::DeferredWorkTimer::cancelPendingWork):
     29        * runtime/DeferredWorkTimer.h:
     30        * runtime/JSGlobalObject.cpp:
     31        (JSC::JSGlobalObject::init):
     32        * runtime/JSGlobalObject.h:
     33        * runtime/OptionsList.h:
     34        * tools/JSDollarVM.cpp:
     35        (JSC::JSC_DEFINE_HOST_FUNCTION):
     36        (JSC::JSDollarVM::finishCreation):
     37        * wasm/WasmBBQPlan.cpp:
     38        (JSC::Wasm::BBQPlan::BBQPlan):
     39        * wasm/WasmBBQPlan.h:
     40        * wasm/WasmCodeBlock.cpp:
     41        (JSC::Wasm::CodeBlock::CodeBlock):
     42        * wasm/WasmEntryPlan.cpp:
     43        (JSC::Wasm::EntryPlan::EntryPlan):
     44        * wasm/WasmEntryPlan.h:
     45        * wasm/WasmLLIntPlan.cpp:
     46        (JSC::Wasm::LLIntPlan::LLIntPlan):
     47        (JSC::Wasm::LLIntPlan::didCompleteCompilation):
     48        (JSC::Wasm::LLIntPlan::completeInStreaming):
     49        (JSC::Wasm::LLIntPlan::didCompileFunctionInStreaming):
     50        (JSC::Wasm::LLIntPlan::didFailInStreaming):
     51        * wasm/WasmLLIntPlan.h:
     52        * wasm/WasmModule.cpp:
     53        (JSC::Wasm::Module::validateSync):
     54        (JSC::Wasm::Module::validateAsync):
     55        * wasm/WasmStreamingCompiler.cpp: Added.
     56        (JSC::Wasm::StreamingCompiler::StreamingCompiler):
     57        (JSC::Wasm::StreamingCompiler::~StreamingCompiler):
     58        (JSC::Wasm::StreamingCompiler::create):
     59        (JSC::Wasm::StreamingCompiler::didReceiveFunctionData):
     60        (JSC::Wasm::StreamingCompiler::didCompileFunction):
     61        (JSC::Wasm::StreamingCompiler::didFinishParsing):
     62        (JSC::Wasm::StreamingCompiler::completeIfNecessary):
     63        (JSC::Wasm::StreamingCompiler::didComplete):
     64        (JSC::Wasm::StreamingCompiler::finalize):
     65        (JSC::Wasm::StreamingCompiler::fail):
     66        (JSC::Wasm::StreamingCompiler::cancel):
     67        * wasm/WasmStreamingCompiler.h: Added.
     68        * wasm/WasmStreamingParser.cpp:
     69        * wasm/WasmStreamingParser.h:
     70        * wasm/WasmStreamingPlan.cpp: Copied from Source/JavaScriptCore/builtins/WebAssembly.js.
     71        (JSC::Wasm::StreamingPlan::StreamingPlan):
     72        (JSC::Wasm::StreamingPlan::work):
     73        * wasm/WasmStreamingPlan.h: Copied from Source/JavaScriptCore/wasm/js/JSWebAssembly.h.
     74        * wasm/js/JSWebAssembly.cpp:
     75        (JSC::JSWebAssembly::finishCreation):
     76        (JSC::JSWebAssembly::instantiateForStreaming):
     77        (JSC::JSC_DEFINE_HOST_FUNCTION):
     78        * wasm/js/JSWebAssembly.h:
     79
    1802021-01-27  Yusuke Suzuki  <ysuzuki@apple.com>
    281
  • trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj

    r271942 r271993  
    11171117                53EE01B8218F7EFF00AD1F8D /* JSScriptInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 53EE01B7218F7EFF00AD1F8D /* JSScriptInternal.h */; };
    11181118                53F11F41209138D700E411A7 /* JSImmutableButterfly.h in Headers */ = {isa = PBXBuildFile; fileRef = 53F11F40209138D700E411A7 /* JSImmutableButterfly.h */; settings = {ATTRIBUTES = (Private, ); }; };
    1119                 53F40E851D58F9770099A1B6 /* WasmSections.h in Headers */ = {isa = PBXBuildFile; fileRef = 53F40E841D58F9770099A1B6 /* WasmSections.h */; };
     1119                53F40E851D58F9770099A1B6 /* WasmSections.h in Headers */ = {isa = PBXBuildFile; fileRef = 53F40E841D58F9770099A1B6 /* WasmSections.h */; settings = {ATTRIBUTES = (Private, ); }; };
    11201120                53F40E8B1D5901BB0099A1B6 /* WasmFunctionParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 53F40E8A1D5901BB0099A1B6 /* WasmFunctionParser.h */; };
    11211121                53F40E8D1D5901F20099A1B6 /* WasmParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 53F40E8C1D5901F20099A1B6 /* WasmParser.h */; };
     
    18271827                E33A94962255323000D42B06 /* RandomizingFuzzerAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = E33A94942255322900D42B06 /* RandomizingFuzzerAgent.h */; };
    18281828                E33A94972255323300D42B06 /* FuzzerAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = E33A94922255322900D42B06 /* FuzzerAgent.h */; settings = {ATTRIBUTES = (Private, ); }; };
     1829                E33BBE0925BFA0410053690F /* WasmStreamingCompiler.h in Headers */ = {isa = PBXBuildFile; fileRef = E33BBE0825BFA03C0053690F /* WasmStreamingCompiler.h */; settings = {ATTRIBUTES = (Private, ); }; };
    18291830                E33E8D1D1B9013C300346B52 /* JSNativeStdFunction.h in Headers */ = {isa = PBXBuildFile; fileRef = E33E8D1B1B9013C300346B52 /* JSNativeStdFunction.h */; settings = {ATTRIBUTES = (Private, ); }; };
    18301831                E33F50751B8421C000413856 /* JSInternalPromisePrototype.h in Headers */ = {isa = PBXBuildFile; fileRef = E33F50731B8421C000413856 /* JSInternalPromisePrototype.h */; settings = {ATTRIBUTES = (Private, ); }; };
     
    18741875                E39EEAF322812450008474F4 /* CachedSpecialPropertyAdaptiveStructureWatchpoint.h in Headers */ = {isa = PBXBuildFile; fileRef = E39EEAF22281244C008474F4 /* CachedSpecialPropertyAdaptiveStructureWatchpoint.h */; };
    18751876                E39FEBE32339C5D900B40AB0 /* JSAsyncGenerator.h in Headers */ = {isa = PBXBuildFile; fileRef = E39FEBE22339C5D400B40AB0 /* JSAsyncGenerator.h */; };
    1876                 E3A0531A21342B680022EC14 /* WasmStreamingParser.h in Headers */ = {isa = PBXBuildFile; fileRef = E3A0531621342B660022EC14 /* WasmStreamingParser.h */; };
     1877                E3A0531A21342B680022EC14 /* WasmStreamingParser.h in Headers */ = {isa = PBXBuildFile; fileRef = E3A0531621342B660022EC14 /* WasmStreamingParser.h */; settings = {ATTRIBUTES = (Private, ); }; };
    18771878                E3A0531C21342B680022EC14 /* WasmSectionParser.h in Headers */ = {isa = PBXBuildFile; fileRef = E3A0531821342B670022EC14 /* WasmSectionParser.h */; };
    18781879                E3A32BC71FC83147007D7E76 /* WeakMapImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = E3A32BC61FC8312E007D7E76 /* WeakMapImpl.h */; };
     
    18881889                E3C295DD1ED2CBDA00D3016F /* ObjectPropertyChangeAdaptiveWatchpoint.h in Headers */ = {isa = PBXBuildFile; fileRef = E3C295DC1ED2CBAA00D3016F /* ObjectPropertyChangeAdaptiveWatchpoint.h */; };
    18891890                E3C694B323026877006FBE42 /* WasmOSREntryData.h in Headers */ = {isa = PBXBuildFile; fileRef = E3C694B123026873006FBE42 /* WasmOSREntryData.h */; };
     1891                E3C73A9125BFA73B00EFE303 /* WasmStreamingPlan.h in Headers */ = {isa = PBXBuildFile; fileRef = E3C73A9025BFA73400EFE303 /* WasmStreamingPlan.h */; };
    18901892                E3C79CAB1DB9A4DC00D1ECA4 /* DOMJITEffect.h in Headers */ = {isa = PBXBuildFile; fileRef = E3C79CAA1DB9A4D600D1ECA4 /* DOMJITEffect.h */; settings = {ATTRIBUTES = (Private, ); }; };
    18911893                E3C8ED4323A1DBCB00131958 /* IsoInlinedHeapCellType.h in Headers */ = {isa = PBXBuildFile; fileRef = E3C8ED4223A1DBC500131958 /* IsoInlinedHeapCellType.h */; };
     
    50225024                E33A94942255322900D42B06 /* RandomizingFuzzerAgent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RandomizingFuzzerAgent.h; sourceTree = "<group>"; };
    50235025                E33A94952255322A00D42B06 /* FuzzerAgent.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = FuzzerAgent.cpp; sourceTree = "<group>"; };
     5026                E33BBE0725BFA03C0053690F /* WasmStreamingCompiler.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WasmStreamingCompiler.cpp; sourceTree = "<group>"; };
     5027                E33BBE0825BFA03C0053690F /* WasmStreamingCompiler.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WasmStreamingCompiler.h; sourceTree = "<group>"; };
    50245028                E33E8D1A1B9013C300346B52 /* JSNativeStdFunction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSNativeStdFunction.cpp; sourceTree = "<group>"; };
    50255029                E33E8D1B1B9013C300346B52 /* JSNativeStdFunction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSNativeStdFunction.h; sourceTree = "<group>"; };
     
    51225126                E3C694B123026873006FBE42 /* WasmOSREntryData.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WasmOSREntryData.h; sourceTree = "<group>"; };
    51235127                E3C694B223026874006FBE42 /* WasmTierUpCount.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WasmTierUpCount.cpp; sourceTree = "<group>"; };
     5128                E3C73A8F25BFA73400EFE303 /* WasmStreamingPlan.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WasmStreamingPlan.cpp; sourceTree = "<group>"; };
     5129                E3C73A9025BFA73400EFE303 /* WasmStreamingPlan.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WasmStreamingPlan.h; sourceTree = "<group>"; };
    51245130                E3C79CAA1DB9A4D600D1ECA4 /* DOMJITEffect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMJITEffect.h; sourceTree = "<group>"; };
    51255131                E3C8ED4123A1DBC400131958 /* IsoHeapCellType.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IsoHeapCellType.cpp; sourceTree = "<group>"; };
     
    70017007                                14AB0C92231747B7000250BC /* WasmSlowPaths.cpp */,
    70027008                                14AB0C93231747B7000250BC /* WasmSlowPaths.h */,
     7009                                E33BBE0725BFA03C0053690F /* WasmStreamingCompiler.cpp */,
     7010                                E33BBE0825BFA03C0053690F /* WasmStreamingCompiler.h */,
    70037011                                E3A0531921342B670022EC14 /* WasmStreamingParser.cpp */,
    70047012                                E3A0531621342B660022EC14 /* WasmStreamingParser.h */,
     7013                                E3C73A8F25BFA73400EFE303 /* WasmStreamingPlan.cpp */,
     7014                                E3C73A9025BFA73400EFE303 /* WasmStreamingPlan.h */,
    70057015                                AD5C36E31F69EC8B000BCAAF /* WasmTable.cpp */,
    70067016                                AD5C36E41F69EC8B000BCAAF /* WasmTable.h */,
     
    1055610566                                AD7438C01E0457A400FD0C2A /* WasmSignature.h in Headers */,
    1055710567                                4BAA07CEB81F49A296E02203 /* WasmSignatureInlines.h in Headers */,
     10568                                E33BBE0925BFA0410053690F /* WasmStreamingCompiler.h in Headers */,
    1055810569                                E3A0531A21342B680022EC14 /* WasmStreamingParser.h in Headers */,
     10570                                E3C73A9125BFA73B00EFE303 /* WasmStreamingPlan.h in Headers */,
    1055910571                                AD5C36E61F69EC91000BCAAF /* WasmTable.h in Headers */,
    1056010572                                5250D2D21E8DA05A0029A932 /* WasmThunks.h in Headers */,
  • trunk/Source/JavaScriptCore/Sources.txt

    r271942 r271993  
    10731073wasm/WasmSignature.cpp
    10741074wasm/WasmSlowPaths.cpp
     1075wasm/WasmStreamingCompiler.cpp
    10751076wasm/WasmStreamingParser.cpp
     1077wasm/WasmStreamingPlan.cpp
    10761078wasm/WasmTable.cpp
    10771079wasm/WasmThunks.cpp
  • trunk/Source/JavaScriptCore/builtins/WebAssembly.js

    r247457 r271993  
    2424 */
    2525
    26 function compileStreaming(argument) {
     26function compileStreaming(source) {
    2727    "use strict";
    2828
    29     return @Promise.@resolve(argument).@then(@webAssemblyCompileStreamingInternal);
     29    return @Promise.@resolve(source).@then(@webAssemblyCompileStreamingInternal);
    3030}
    3131
    32 function instantiateStreaming(argument) {
     32function instantiateStreaming(source) {
    3333    "use strict";
    3434
    35     return @Promise.@resolve(argument).@then(@webAssemblyInstantiateStreamingInternal);
     35    var importObject = @argument(1);
     36    return @Promise.@resolve(source).@then((source) => {
     37        return @webAssemblyInstantiateStreamingInternal(source, importObject);
     38    });
    3639}
    3740
  • trunk/Source/JavaScriptCore/runtime/DeferredWorkTimer.cpp

    r271781 r271993  
    161161}
    162162
     163bool DeferredWorkTimer::cancelPendingWork(Ticket ticket)
     164{
     165    ASSERT(ticket->vm().currentThreadIsHoldingAPILock() || (Thread::mayBeGCThread() && ticket->vm().heap.worldIsStopped()));
     166    bool result = m_pendingTickets.remove(ticket);
     167
     168    if (result)
     169        dataLogLnIf(DeferredWorkTimerInternal::verbose, "Canceling ticket: ", RawPointer(ticket));
     170
     171    return result;
     172}
     173
    163174void DeferredWorkTimer::didResumeScriptExecutionOwner()
    164175{
  • trunk/Source/JavaScriptCore/runtime/DeferredWorkTimer.h

    r271781 r271993  
    5555    bool hasPendingWork(Ticket);
    5656    bool hasDependancyInPendingWork(Ticket, JSCell* dependency);
     57    bool cancelPendingWork(Ticket);
    5758
    5859    // If the script execution owner your ticket is associated with gets canceled
  • trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp

    r271942 r271993  
    13261326        });
    13271327
    1328 #if ENABLE(WEBASSEMBLY) && ENABLE(WEBASSEMBLY_STREAMING_API)
     1328#if ENABLE(WEBASSEMBLY)
    13291329    // WebAssembly Streaming API
    13301330    m_linkTimeConstants[static_cast<unsigned>(LinkTimeConstant::webAssemblyCompileStreamingInternal)].initLater([] (const Initializer<JSCell>& init) {
  • trunk/Source/JavaScriptCore/runtime/JSGlobalObject.h

    r271269 r271993  
    248248    DefaultLanguageFunctionPtr defaultLanguage;
    249249
    250     typedef void (*CompileStreamingPtr)(JSGlobalObject*, JSPromise*, JSValue);
     250    typedef JSPromise* (*CompileStreamingPtr)(JSGlobalObject*, JSValue);
    251251    CompileStreamingPtr compileStreaming;
    252252
    253     typedef void (*InstantiateStreamingPtr)(JSGlobalObject*, JSPromise*, JSValue, JSObject*);
     253    typedef JSPromise* (*InstantiateStreamingPtr)(JSGlobalObject*, JSValue, JSObject*);
    254254    InstantiateStreamingPtr instantiateStreaming;
    255255};
  • trunk/Source/JavaScriptCore/runtime/OptionsList.h

    r271746 r271993  
    3636#else
    3737#define MAXIMUM_NUMBER_OF_FTL_COMPILER_THREADS 8
    38 #endif
    39 
    40 #if ENABLE(WEBASSEMBLY_STREAMING_API)
    41 constexpr bool enableWebAssemblyStreamingApi = true;
    42 #else
    43 constexpr bool enableWebAssemblyStreamingApi = false;
    4438#endif
    4539
     
    488482    v(Bool, wasmLLIntTiersUpToBBQ, true, Normal, nullptr) \
    489483    v(Size, webAssemblyBBQAirModeThreshold, isIOS() ? (10 * MB) : 0, Normal, "If 0, we always use BBQ Air. If Wasm module code size hits this threshold, we compile Wasm module with B3 BBQ mode.") \
    490     v(Bool, useWebAssemblyStreamingApi, enableWebAssemblyStreamingApi, Normal, "Allow to run WebAssembly's Streaming API") \
     484    v(Bool, useWebAssemblyStreaming, true, Normal, "Allow to run WebAssembly's Streaming API") \
    491485    v(Bool, useEagerWebAssemblyModuleHashing, false, Normal, "Unnamed WebAssembly modules are identified in backtraces through their hash, if available.") \
    492486    v(Bool, useWebAssemblyReferences, false, Normal, "Allow types from the wasm references spec.") \
  • trunk/Source/JavaScriptCore/tools/JSDollarVM.cpp

    r271422 r271993  
    6262#if ENABLE(WEBASSEMBLY)
    6363#include "JSWebAssemblyHelpers.h"
     64#include "WasmModuleInformation.h"
     65#include "WasmStreamingCompiler.h"
    6466#include "WasmStreamingParser.h"
    6567#endif
     
    17711773        return JSValue::encode(jsBoolean(false));
    17721774    return JSValue::encode(jsNumber(static_cast<int32_t>(thisObject->streamingParser().finalize())));
     1775}
     1776
     1777static JSC_DECLARE_HOST_FUNCTION(functionWasmStreamingCompilerAddBytes);
     1778
     1779class WasmStreamingCompiler : public JSDestructibleObject {
     1780public:
     1781    using Base = JSDestructibleObject;
     1782    template<typename CellType, SubspaceAccess>
     1783    static CompleteSubspace* subspaceFor(VM& vm)
     1784    {
     1785        return &vm.destructibleObjectSpace;
     1786    }
     1787
     1788    WasmStreamingCompiler(VM& vm, Structure* structure, Wasm::CompilerMode compilerMode, JSGlobalObject* globalObject, JSPromise* promise, JSObject* importObject)
     1789        : Base(vm, structure)
     1790        , m_promise(vm, this, promise)
     1791        , m_streamingCompiler(Wasm::StreamingCompiler::create(vm, compilerMode, globalObject, promise, importObject))
     1792    {
     1793        DollarVMAssertScope assertScope;
     1794    }
     1795
     1796    static WasmStreamingCompiler* create(VM& vm, JSGlobalObject* globalObject, Wasm::CompilerMode compilerMode, JSObject* importObject)
     1797    {
     1798        DollarVMAssertScope assertScope;
     1799        JSPromise* promise = JSPromise::create(vm, globalObject->promiseStructure());
     1800        Structure* structure = createStructure(vm, globalObject, jsNull());
     1801        WasmStreamingCompiler* result = new (NotNull, allocateCell<WasmStreamingCompiler>(vm.heap)) WasmStreamingCompiler(vm, structure, compilerMode, globalObject, promise, importObject);
     1802        result->finishCreation(vm);
     1803        return result;
     1804    }
     1805
     1806    static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype)
     1807    {
     1808        DollarVMAssertScope assertScope;
     1809        return Structure::create(vm, globalObject, prototype, TypeInfo(ObjectType, StructureFlags), info());
     1810    }
     1811
     1812    Wasm::StreamingCompiler& streamingCompiler() { return m_streamingCompiler.get(); }
     1813
     1814    JSPromise* promise() const { return m_promise.get(); }
     1815
     1816    void finishCreation(VM& vm)
     1817    {
     1818        DollarVMAssertScope assertScope;
     1819        Base::finishCreation(vm);
     1820
     1821        JSGlobalObject* globalObject = this->globalObject(vm);
     1822        putDirectNativeFunction(vm, globalObject, Identifier::fromString(vm, "addBytes"), 0, functionWasmStreamingCompilerAddBytes, NoIntrinsic, static_cast<unsigned>(PropertyAttribute::DontEnum));
     1823    }
     1824
     1825    static void visitChildren(JSCell* cell, SlotVisitor& visitor)
     1826    {
     1827        DollarVMAssertScope assertScope;
     1828        auto* thisObject = jsCast<WasmStreamingCompiler*>(cell);
     1829        ASSERT_GC_OBJECT_INHERITS(thisObject, info());
     1830        Base::visitChildren(thisObject, visitor);
     1831        visitor.append(thisObject->m_promise);
     1832    }
     1833
     1834    DECLARE_INFO;
     1835
     1836    WriteBarrier<JSPromise> m_promise;
     1837    Ref<Wasm::StreamingCompiler> m_streamingCompiler;
     1838};
     1839
     1840const ClassInfo WasmStreamingCompiler::s_info = { "WasmStreamingCompiler", &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(WasmStreamingCompiler) };
     1841
     1842JSC_DEFINE_HOST_FUNCTION(functionWasmStreamingCompilerAddBytes, (JSGlobalObject* globalObject, CallFrame* callFrame))
     1843{
     1844    DollarVMAssertScope assertScope;
     1845    VM& vm = globalObject->vm();
     1846    auto scope = DECLARE_THROW_SCOPE(globalObject->vm());
     1847
     1848    auto* thisObject = jsDynamicCast<WasmStreamingCompiler*>(vm, callFrame->thisValue());
     1849    if (!thisObject)
     1850        RELEASE_AND_RETURN(scope, JSValue::encode(jsBoolean(false)));
     1851
     1852    auto data = getWasmBufferFromValue(globalObject, callFrame->argument(0));
     1853    RETURN_IF_EXCEPTION(scope, { });
     1854    thisObject->streamingCompiler().addBytes(bitwise_cast<const uint8_t*>(data.first), data.second);
     1855    return JSValue::encode(jsUndefined());
    17731856}
    17741857
     
    18281911#if ENABLE(WEBASSEMBLY)
    18291912static JSC_DECLARE_HOST_FUNCTION(functionCreateWasmStreamingParser);
     1913static JSC_DECLARE_HOST_FUNCTION(functionCreateWasmStreamingCompilerForCompile);
     1914static JSC_DECLARE_HOST_FUNCTION(functionCreateWasmStreamingCompilerForInstantiate);
    18301915#endif
    18311916static JSC_DECLARE_HOST_FUNCTION(functionCreateStaticCustomAccessor);
     
    27292814    return JSValue::encode(WasmStreamingParser::create(vm, globalObject));
    27302815}
     2816
     2817JSC_DEFINE_HOST_FUNCTION(functionCreateWasmStreamingCompilerForCompile, (JSGlobalObject* globalObject, CallFrame* callFrame))
     2818{
     2819    DollarVMAssertScope assertScope;
     2820    VM& vm = globalObject->vm();
     2821    JSLockHolder lock(vm);
     2822    auto scope = DECLARE_THROW_SCOPE(vm);
     2823
     2824    auto callback = jsDynamicCast<JSFunction*>(vm, callFrame->argument(0));
     2825    if (!callback)
     2826        return throwVMTypeError(globalObject, scope, "First argument is not a JS function"_s);
     2827
     2828    auto compiler = WasmStreamingCompiler::create(vm, globalObject, Wasm::CompilerMode::Validation, nullptr);
     2829    MarkedArgumentBuffer args;
     2830    args.append(compiler);
     2831    call(globalObject, callback, jsUndefined(), args, "You shouldn't see this...");
     2832    if (UNLIKELY(scope.exception()))
     2833        scope.clearException();
     2834    compiler->streamingCompiler().finalize(globalObject);
     2835    RETURN_IF_EXCEPTION(scope, { });
     2836    return JSValue::encode(compiler->promise());
     2837}
     2838
     2839JSC_DEFINE_HOST_FUNCTION(functionCreateWasmStreamingCompilerForInstantiate, (JSGlobalObject* globalObject, CallFrame* callFrame))
     2840{
     2841    DollarVMAssertScope assertScope;
     2842    VM& vm = globalObject->vm();
     2843    JSLockHolder lock(vm);
     2844    auto scope = DECLARE_THROW_SCOPE(vm);
     2845
     2846    auto callback = jsDynamicCast<JSFunction*>(vm, callFrame->argument(0));
     2847    if (!callback)
     2848        return throwVMTypeError(globalObject, scope, "First argument is not a JS function"_s);
     2849
     2850    JSValue importArgument = callFrame->argument(1);
     2851    JSObject* importObject = importArgument.getObject();
     2852    if (UNLIKELY(!importArgument.isUndefined() && !importObject))
     2853        return throwVMTypeError(globalObject, scope);
     2854
     2855    auto compiler = WasmStreamingCompiler::create(vm, globalObject, Wasm::CompilerMode::FullCompile, importObject);
     2856    MarkedArgumentBuffer args;
     2857    args.append(compiler);
     2858    call(globalObject, callback, jsUndefined(), args, "You shouldn't see this...");
     2859    if (UNLIKELY(scope.exception()))
     2860        scope.clearException();
     2861    compiler->streamingCompiler().finalize(globalObject);
     2862    RETURN_IF_EXCEPTION(scope, { });
     2863    return JSValue::encode(compiler->promise());
     2864}
    27312865#endif
    27322866
     
    34773611#if ENABLE(WEBASSEMBLY)
    34783612    addFunction(vm, "createWasmStreamingParser", functionCreateWasmStreamingParser, 0);
     3613    addFunction(vm, "createWasmStreamingCompilerForCompile", functionCreateWasmStreamingCompilerForCompile, 0);
     3614    addFunction(vm, "createWasmStreamingCompilerForInstantiate", functionCreateWasmStreamingCompilerForInstantiate, 0);
    34793615#endif
    34803616    addFunction(vm, "createStaticCustomAccessor", functionCreateStaticCustomAccessor, 0);
  • trunk/Source/JavaScriptCore/wasm/WasmBBQPlan.cpp

    r271775 r271993  
    4949
    5050BBQPlan::BBQPlan(Context* context, Ref<ModuleInformation> moduleInformation, uint32_t functionIndex, CodeBlock* codeBlock, CompletionTask&& completionTask)
    51     : EntryPlan(context, WTFMove(moduleInformation), AsyncWork::FullCompile, WTFMove(completionTask))
     51    : EntryPlan(context, WTFMove(moduleInformation), CompilerMode::FullCompile, WTFMove(completionTask))
    5252    , m_codeBlock(codeBlock)
    5353    , m_functionIndex(functionIndex)
  • trunk/Source/JavaScriptCore/wasm/WasmBBQPlan.h

    r271775 r271993  
    5959    bool hasWork() const final
    6060    {
    61         if (m_asyncWork == AsyncWork::Validation)
     61        if (m_compilerMode == CompilerMode::Validation)
    6262            return m_state < State::Validated;
    6363        return m_state < State::Compiled;
  • trunk/Source/JavaScriptCore/wasm/WasmCodeBlock.cpp

    r271775 r271993  
    7777#if ENABLE(WEBASSEMBLY_B3JIT)
    7878    else {
    79         m_plan = adoptRef(*new BBQPlan(context, makeRef(moduleInformation), EntryPlan::FullCompile, createSharedTask<Plan::CallbackType>([this, protectedThis = WTFMove(protectedThis)] (Plan&) {
     79        m_plan = adoptRef(*new BBQPlan(context, makeRef(moduleInformation), CompilerMode::FullCompile, createSharedTask<Plan::CallbackType>([this, protectedThis = WTFMove(protectedThis)] (Plan&) {
    8080            auto locker = holdLock(m_lock);
    8181            if (m_plan->failed()) {
  • trunk/Source/JavaScriptCore/wasm/WasmEntryPlan.cpp

    r270344 r271993  
    4242}
    4343
    44 EntryPlan::EntryPlan(Context* context, Ref<ModuleInformation> info, AsyncWork work, CompletionTask&& task)
     44EntryPlan::EntryPlan(Context* context, Ref<ModuleInformation> info, CompilerMode compilerMode, CompletionTask&& task)
    4545    : Base(context, WTFMove(info), WTFMove(task))
    4646    , m_streamingParser(m_moduleInformation.get(), *this)
    4747    , m_state(State::Validated)
    48     , m_asyncWork(work)
    49 {
    50 }
    51 
    52 EntryPlan::EntryPlan(Context* context, Vector<uint8_t>&& source, AsyncWork work, CompletionTask&& task)
     48    , m_compilerMode(compilerMode)
     49{
     50}
     51
     52EntryPlan::EntryPlan(Context* context, Vector<uint8_t>&& source, CompilerMode compilerMode, CompletionTask&& task)
    5353    : Base(context, WTFMove(task))
    5454    , m_source(WTFMove(source))
    5555    , m_streamingParser(m_moduleInformation.get(), *this)
    5656    , m_state(State::Initial)
    57     , m_asyncWork(work)
     57    , m_compilerMode(compilerMode)
    5858{
    5959}
  • trunk/Source/JavaScriptCore/wasm/WasmEntryPlan.h

    r264488 r271993  
    4545public:
    4646    using Base = Plan;
    47     enum AsyncWork : uint8_t { FullCompile, Validation };
    4847
    4948    // Note: CompletionTask should not hold a reference to the Plan otherwise there will be a reference cycle.
    50     EntryPlan(Context*, Ref<ModuleInformation>, AsyncWork, CompletionTask&&);
    51     JS_EXPORT_PRIVATE EntryPlan(Context*, Vector<uint8_t>&&, AsyncWork, CompletionTask&&);
     49    EntryPlan(Context*, Ref<ModuleInformation>, CompilerMode, CompletionTask&&);
     50    JS_EXPORT_PRIVATE EntryPlan(Context*, Vector<uint8_t>&&, CompilerMode, CompletionTask&&);
    5251
    5352    ~EntryPlan() override = default;
     
    122121    State m_state;
    123122
    124     const AsyncWork m_asyncWork;
     123    const CompilerMode m_compilerMode;
    125124    uint8_t m_numberOfActiveThreads { 0 };
    126125    uint32_t m_currentIndex { 0 };
  • trunk/Source/JavaScriptCore/wasm/WasmLLIntPlan.cpp

    r271775 r271993  
    4242namespace JSC { namespace Wasm {
    4343
    44 LLIntPlan::LLIntPlan(Context* context, Vector<uint8_t>&& source, AsyncWork work, CompletionTask&& task)
    45     : Base(context, WTFMove(source), work, WTFMove(task))
     44LLIntPlan::LLIntPlan(Context* context, Vector<uint8_t>&& source, CompilerMode compilerMode, CompletionTask&& task)
     45    : Base(context, WTFMove(source), compilerMode, WTFMove(task))
    4646{
    4747    if (parseAndValidateModule(m_source.data(), m_source.size()))
     
    5050
    5151LLIntPlan::LLIntPlan(Context* context, Ref<ModuleInformation> info, const Ref<LLIntCallee>* callees, CompletionTask&& task)
    52     : Base(context, WTFMove(info), AsyncWork::FullCompile, WTFMove(task))
     52    : Base(context, WTFMove(info), CompilerMode::FullCompile, WTFMove(task))
    5353    , m_callees(callees)
    5454{
    5555    ASSERT(m_callees || !m_moduleInformation->functions.size());
     56    prepare();
     57    m_currentIndex = m_moduleInformation->functions.size();
     58}
     59
     60LLIntPlan::LLIntPlan(Context* context, Ref<ModuleInformation> info, CompilerMode compilerMode, CompletionTask&& task)
     61    : Base(context, WTFMove(info), compilerMode, WTFMove(task))
     62{
    5663    prepare();
    5764    m_currentIndex = m_moduleInformation->functions.size();
     
    136143    }
    137144
    138     if (m_asyncWork == AsyncWork::Validation)
     145    if (m_compilerMode == CompilerMode::Validation)
    139146        return;
    140147
     
    183190}
    184191
     192void LLIntPlan::completeInStreaming()
     193{
     194    complete(holdLock(m_lock));
     195}
     196
     197void LLIntPlan::didCompileFunctionInStreaming()
     198{
     199    auto locker = holdLock(m_lock);
     200    moveToState(EntryPlan::State::Compiled);
     201}
     202
     203void LLIntPlan::didFailInStreaming(String&& message)
     204{
     205    auto locker = holdLock(m_lock);
     206    if (!m_errorMessage)
     207        fail(locker, WTFMove(message));
     208}
     209
    185210void LLIntPlan::work(CompilationEffort effort)
    186211{
  • trunk/Source/JavaScriptCore/wasm/WasmLLIntPlan.h

    r271594 r271993  
    3939class LLIntCallee;
    4040class EmbedderEntrypointCallee;
     41class StreamingCompiler;
    4142
    4243using EmbedderEntrypointCalleeMap = HashMap<uint32_t, RefPtr<EmbedderEntrypointCallee>, DefaultHash<uint32_t>, WTF::UnsignedWithZeroKeyHashTraits<uint32_t>>;
     
    4647
    4748public:
    48     JS_EXPORT_PRIVATE LLIntPlan(Context*, Vector<uint8_t>&&, AsyncWork, CompletionTask&&);
     49    JS_EXPORT_PRIVATE LLIntPlan(Context*, Vector<uint8_t>&&, CompilerMode, CompletionTask&&);
    4950    LLIntPlan(Context*, Ref<ModuleInformation>, const Ref<LLIntCallee>*, CompletionTask&&);
     51    LLIntPlan(Context*, Ref<ModuleInformation>, CompilerMode, CompletionTask&&); // For StreamingCompiler.
    5052
    5153    MacroAssemblerCodeRef<JITCompilationPtrTag>&& takeEntryThunks()
     
    7678    bool didReceiveFunctionData(unsigned, const FunctionData&) final;
    7779
     80    void compileFunction(uint32_t functionIndex) final;
     81
     82    void completeInStreaming();
     83    void didCompileFunctionInStreaming();
     84    void didFailInStreaming(String&&);
     85
    7886private:
    7987    bool prepareImpl() final;
    80     void compileFunction(uint32_t functionIndex) final;
    8188    void didCompleteCompilation(const AbstractLocker&) final;
    8289
  • trunk/Source/JavaScriptCore/wasm/WasmModule.cpp

    r261755 r271993  
    6767Module::ValidationResult Module::validateSync(Context* context, Vector<uint8_t>&& source)
    6868{
    69     Ref<LLIntPlan> plan = adoptRef(*new LLIntPlan(context, WTFMove(source), EntryPlan::Validation, Plan::dontFinalize()));
     69    Ref<LLIntPlan> plan = adoptRef(*new LLIntPlan(context, WTFMove(source), CompilerMode::Validation, Plan::dontFinalize()));
    7070    Wasm::ensureWorklist().enqueue(plan.get());
    7171    plan->waitForCompletion();
     
    7575void Module::validateAsync(Context* context, Vector<uint8_t>&& source, Module::AsyncValidationCallback&& callback)
    7676{
    77     Ref<Plan> plan = adoptRef(*new LLIntPlan(context, WTFMove(source), EntryPlan::Validation, makeValidationCallback(WTFMove(callback))));
     77    Ref<Plan> plan = adoptRef(*new LLIntPlan(context, WTFMove(source), CompilerMode::Validation, makeValidationCallback(WTFMove(callback))));
    7878    Wasm::ensureWorklist().enqueue(WTFMove(plan));
    7979}
  • trunk/Source/JavaScriptCore/wasm/WasmStreamingParser.cpp

    r262098 r271993  
    2929#if ENABLE(WEBASSEMBLY)
    3030
     31#include "WasmModuleInformation.h"
    3132#include "WasmOps.h"
     33#include "WasmParser.h"
    3234#include "WasmSectionParser.h"
    3335#include "WasmSignatureInlines.h"
  • trunk/Source/JavaScriptCore/wasm/WasmStreamingParser.h

    r252513 r271993  
    2828#if ENABLE(WEBASSEMBLY)
    2929
    30 #include "WasmModuleInformation.h"
    31 #include "WasmParser.h"
    3230#include "WasmSections.h"
    3331#include <wtf/CrossThreadCopier.h>
     
    3735
    3836namespace JSC { namespace Wasm {
     37
     38struct FunctionData;
     39struct ModuleInformation;
     40
     41enum class CompilerMode : uint8_t { FullCompile, Validation };
    3942
    4043class StreamingParserClient {
     
    8790    static constexpr unsigned sectionIDSize = 1;
    8891
    89     State addBytes(const uint8_t* bytes, size_t length, IsEndOfStream);
     92    JS_EXPORT_PRIVATE State addBytes(const uint8_t* bytes, size_t length, IsEndOfStream);
    9093
    9194    State parseModuleHeader(Vector<uint8_t>&&);
  • trunk/Source/JavaScriptCore/wasm/WasmStreamingPlan.cpp

    r271992 r271993  
    11/*
    2  * Copyright (C) 2018 Oleksandr Skachkov <gskachkov@gmail.com>.
     2 * Copyright (C) 2021 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    2424 */
    2525
    26 function compileStreaming(argument) {
    27     "use strict";
     26#include "config.h"
     27#include "WasmStreamingPlan.h"
    2828
    29     return @Promise.@resolve(argument).@then(@webAssemblyCompileStreamingInternal);
     29#if ENABLE(WEBASSEMBLY)
     30
     31#include "WasmCallee.h"
     32#include "WasmNameSection.h"
     33#include "WasmSignatureInlines.h"
     34#include <wtf/DataLog.h>
     35#include <wtf/Locker.h>
     36#include <wtf/StdLibExtras.h>
     37
     38namespace JSC { namespace Wasm {
     39
     40namespace WasmStreamingPlanInternal {
     41static constexpr bool verbose = false;
    3042}
    3143
    32 function instantiateStreaming(argument) {
    33     "use strict";
    34 
    35     return @Promise.@resolve(argument).@then(@webAssemblyInstantiateStreamingInternal);
     44StreamingPlan::StreamingPlan(Context* context, Ref<ModuleInformation>&& info, Ref<LLIntPlan>&& plan, uint32_t functionIndex, CompletionTask&& task)
     45    : Base(context, WTFMove(info), WTFMove(task))
     46    , m_plan(WTFMove(plan))
     47    , m_functionIndex(functionIndex)
     48{
     49    dataLogLnIf(WasmStreamingPlanInternal::verbose, "Starting Streaming plan for ", functionIndex, " of module info: ", RawPointer(&m_moduleInformation.get()));
    3650}
    3751
     52void StreamingPlan::work(CompilationEffort)
     53{
     54    m_plan->compileFunction(m_functionIndex);
     55    dataLogLnIf(WasmStreamingPlanInternal::verbose, "Finished Streaming ", m_functionIndex);
     56    complete(holdLock(m_lock));
     57}
     58
     59} } // namespace JSC::Wasm
     60
     61#endif // ENABLE(WEBASSEMBLY)
  • trunk/Source/JavaScriptCore/wasm/WasmStreamingPlan.h

    r271992 r271993  
    11/*
    2  * Copyright (C) 2016-2019 Apple Inc. All rights reserved.
     2 * Copyright (C) 2021 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    2828#if ENABLE(WEBASSEMBLY)
    2929
    30 #include "JSObject.h"
    31 #include "JSPromise.h"
     30#include "WasmContext.h"
     31#include "WasmModule.h"
     32#include "WasmPlan.h"
    3233
    3334namespace JSC {
    3435
    35 class JSWebAssembly final : public JSNonFinalObject {
     36class CallLinkInfo;
     37
     38namespace Wasm {
     39
     40class StreamingPlan final : public Plan {
    3641public:
    37     using Base = JSNonFinalObject;
    38     static constexpr unsigned StructureFlags = Base::StructureFlags | HasStaticPropertyTable;
     42    using Base = Plan;
    3943
    40     template<typename CellType, SubspaceAccess>
    41     static IsoSubspace* subspaceFor(VM& vm)
     44    bool hasWork() const final { return !m_completed; }
     45    void work(CompilationEffort) final;
     46    bool multiThreaded() const final { return false; }
     47    uint32_t functionIndex() const { return m_functionIndex; }
     48
     49    // Note: CompletionTask should not hold a reference to the Plan otherwise there will be a reference cycle.
     50    StreamingPlan(Context*, Ref<ModuleInformation>&&, Ref<LLIntPlan>&&, uint32_t functionIndex, CompletionTask&&);
     51
     52private:
     53    // For some reason friendship doesn't extend to parent classes...
     54    using Base::m_lock;
     55
     56    bool isComplete() const final { return m_completed; }
     57    void complete(const AbstractLocker& locker) final
    4258    {
    43         STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSWebAssembly, Base);
    44         return &vm.plainObjectSpace;
     59        m_completed = true;
     60        runCompletionTasks(locker);
    4561    }
    4662
    47     static JSWebAssembly* create(VM&, JSGlobalObject*, Structure*);
    48     static Structure* createStructure(VM&, JSGlobalObject*, JSValue);
    49 
    50     DECLARE_INFO;
    51 
    52     JS_EXPORT_PRIVATE static void webAssemblyModuleValidateAsync(JSGlobalObject*, JSPromise*, Vector<uint8_t>&&);
    53     JS_EXPORT_PRIVATE static void webAssemblyModuleInstantinateAsync(JSGlobalObject*, JSPromise*, Vector<uint8_t>&&, JSObject*);
    54     static JSValue instantiate(JSGlobalObject*, JSPromise*, const Identifier&, JSValue);
    55 
    56 private:
    57     JSWebAssembly(VM&, Structure*);
    58     void finishCreation(VM&, JSGlobalObject*);
     63    Ref<LLIntPlan> m_plan;
     64    bool m_completed { false };
     65    uint32_t m_functionIndex;
    5966};
    6067
    61 JSC_DECLARE_HOST_FUNCTION(webAssemblyCompileStreamingInternal);
    62 JSC_DECLARE_HOST_FUNCTION(webAssemblyInstantiateStreamingInternal);
    63 
    64 } // namespace JSC
     68} } // namespace JSC::Wasm
    6569
    6670#endif // ENABLE(WEBASSEMBLY)
  • trunk/Source/JavaScriptCore/wasm/js/JSWebAssembly.cpp

    r271781 r271993  
    109109    ASSERT(inherits(vm, info()));
    110110    JSC_TO_STRING_TAG_WITHOUT_TRANSITION();
    111     if (Options::useWebAssemblyStreamingApi()) {
    112         JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("compileStreaming", webAssemblyCompileStreamingCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum));
    113         JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("instantiateStreaming", webAssemblyInstantiateStreamingCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum));
     111    if (Options::useWebAssemblyStreaming()) {
     112        if (globalObject->globalObjectMethodTable()->compileStreaming)
     113            JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("compileStreaming", webAssemblyCompileStreamingCodeGenerator, static_cast<unsigned>(0));
     114        if (globalObject->globalObjectMethodTable()->instantiateStreaming)
     115            JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("instantiateStreaming", webAssemblyInstantiateStreamingCodeGenerator, static_cast<unsigned>(0));
    114116    }
    115117}
     
    257259}
    258260
     261void JSWebAssembly::instantiateForStreaming(VM& vm, JSGlobalObject* globalObject, JSPromise* promise, JSWebAssemblyModule* module, JSObject* importObject)
     262{
     263    JSC::instantiate(vm, globalObject, promise, module, importObject, JSWebAssemblyInstance::createPrivateModuleKey(), Resolve::WithModuleAndInstance, Wasm::CreationMode::FromJS);
     264}
     265
    259266void JSWebAssembly::webAssemblyModuleInstantinateAsync(JSGlobalObject* globalObject, JSPromise* promise, Vector<uint8_t>&& source, JSObject* importObject)
    260267{
     
    297304
    298305    JSValue firstArgument = callFrame->argument(0);
    299     if (auto* module = jsDynamicCast<JSWebAssemblyModule*>(vm, firstArgument))
    300         instantiate(vm, globalObject, promise, module, importObject, JSWebAssemblyInstance::createPrivateModuleKey(), Resolve::WithInstance, Wasm::CreationMode::FromJS);
     306    if (firstArgument.inherits<JSWebAssemblyModule>(vm))
     307        instantiate(vm, globalObject, promise, jsCast<JSWebAssemblyModule*>(firstArgument), importObject, JSWebAssemblyInstance::createPrivateModuleKey(), Resolve::WithInstance, Wasm::CreationMode::FromJS);
    301308    else
    302309        compileAndInstantiate(vm, globalObject, promise, JSWebAssemblyInstance::createPrivateModuleKey(), firstArgument, importObject, Resolve::WithModuleAndInstance, Wasm::CreationMode::FromJS);
     
    320327JSC_DEFINE_HOST_FUNCTION(webAssemblyCompileStreamingInternal, (JSGlobalObject* globalObject, CallFrame* callFrame))
    321328{
    322     VM& vm = globalObject->vm();
    323 
    324     auto* promise = JSPromise::create(vm, globalObject->promiseStructure());
    325 
    326     Vector<Strong<JSCell>> dependencies;
    327     dependencies.append(Strong<JSCell>(vm, globalObject));
    328     vm.deferredWorkTimer->addPendingWork(vm, promise, WTFMove(dependencies));
    329 
    330     if (!globalObject->globalObjectMethodTable()->compileStreaming) {
    331         // CompileStreaming is not supported in jsc, only in browser environment
    332         ASSERT_NOT_REACHED();
    333     }
    334 
    335     globalObject->globalObjectMethodTable()->compileStreaming(globalObject, promise, callFrame->argument(0));
    336     return JSValue::encode(promise);
     329    ASSERT(globalObject->globalObjectMethodTable()->compileStreaming);
     330    return JSValue::encode(globalObject->globalObjectMethodTable()->compileStreaming(globalObject, callFrame->argument(0)));
    337331}
    338332
     
    341335    VM& vm = globalObject->vm();
    342336
    343     auto* promise = JSPromise::create(vm, globalObject->promiseStructure());
    344337    JSValue importArgument = callFrame->argument(1);
    345338    JSObject* importObject = importArgument.getObject();
    346339    if (UNLIKELY(!importArgument.isUndefined() && !importObject)) {
     340        auto* promise = JSPromise::create(vm, globalObject->promiseStructure());
    347341        promise->reject(globalObject, createTypeError(globalObject,
    348342            "second argument to WebAssembly.instantiateStreaming must be undefined or an Object"_s, defaultSourceAppender, runtimeTypeForValue(vm, importArgument)));
     
    350344    }
    351345
    352     if (!globalObject->globalObjectMethodTable()->instantiateStreaming) {
    353         // InstantiateStreaming is not supported in jsc, only in browser environment.
    354         ASSERT_NOT_REACHED();
    355     }
    356 
    357     Vector<Strong<JSCell>> dependencies;
    358     dependencies.append(Strong<JSCell>(vm, globalObject));
    359     dependencies.append(Strong<JSCell>(vm, importObject));
    360     vm.deferredWorkTimer->addPendingWork(vm, promise, WTFMove(dependencies));
    361 
     346    ASSERT(globalObject->globalObjectMethodTable()->instantiateStreaming);
    362347    // FIXME: <http://webkit.org/b/184888> if there's an importObject and it contains a Memory, then we can compile the module with the right memory type (fast or not) by looking at the memory's type.
    363     globalObject->globalObjectMethodTable()->instantiateStreaming(globalObject, promise, callFrame->argument(0), importObject);
    364     return JSValue::encode(promise);
     348    return JSValue::encode(globalObject->globalObjectMethodTable()->instantiateStreaming(globalObject, callFrame->argument(0), importObject));
    365349}
    366350
  • trunk/Source/JavaScriptCore/wasm/js/JSWebAssembly.h

    r267594 r271993  
    5454    static JSValue instantiate(JSGlobalObject*, JSPromise*, const Identifier&, JSValue);
    5555
     56    static void instantiateForStreaming(VM&, JSGlobalObject*, JSPromise*, JSWebAssemblyModule*, JSObject*);
     57
    5658private:
    5759    JSWebAssembly(VM&, Structure*);
  • trunk/Source/WTF/ChangeLog

    r271965 r271993  
     12021-01-25  Yusuke Suzuki  <ysuzuki@apple.com>
     2
     3        WebAssembly: add support for stream APIs
     4        https://bugs.webkit.org/show_bug.cgi?id=173105
     5
     6        Reviewed by Keith Miller.
     7
     8        * wtf/PlatformEnable.h:
     9
    1102021-01-27  Per Arne  <pvollan@apple.com>
    211
  • trunk/Source/WebCore/ChangeLog

    r271992 r271993  
     12021-01-27  Yusuke Suzuki  <ysuzuki@apple.com>
     2
     3        WebAssembly: add support for stream APIs
     4        https://bugs.webkit.org/show_bug.cgi?id=173105
     5
     6        Reviewed by Keith Miller.
     7
     8        Since WebAssembly.{compileStreaming,instantiateStreaming} needs to handle FetchResponse which is WebCore type, they need to be implemented in WebCore side.
     9        To achieve that, JSC offers callback to JSGlobalObject, and WebCore JSDOMGlobalObject can implement them to offer WebAssembly.{compileStreaming,instantiateStreaming} features.
     10
     11        We use JSC's Wasm::StreamingCompiler to implement them. WebCore feeds bytes from FetchResponse and drives Wasm::StreamingCompiler.
     12
     13        * bindings/js/JSDOMGlobalObject.cpp:
     14        (WebCore::handleResponseOnStreamingAction):
     15        (WebCore::JSDOMGlobalObject::compileStreaming):
     16        (WebCore::JSDOMGlobalObject::instantiateStreaming):
     17        * bindings/js/JSDOMGlobalObject.h:
     18        * bindings/js/JSDOMPromiseDeferred.cpp:
     19        * bindings/js/JSDOMWindowBase.cpp:
     20        (WebCore::tryAllocate): Deleted.
     21        (WebCore::isResponseCorrect): Deleted.
     22        (WebCore::handleResponseOnStreamingAction): Deleted.
     23        (WebCore::JSDOMWindowBase::compileStreaming): Deleted.
     24        (WebCore::JSDOMWindowBase::instantiateStreaming): Deleted.
     25        * bindings/js/JSDOMWindowBase.h:
     26        * bindings/js/JSWorkerGlobalScopeBase.cpp:
     27        * bindings/js/JSWorkletGlobalScopeBase.cpp:
     28
    1292021-01-27  Sam Weinig  <weinig@apple.com>
    230
  • trunk/Source/WebCore/Modules/fetch/FetchResponse.cpp

    r268700 r271993  
    542542}
    543543
     544bool FetchResponse::isCORSSameOrigin() const
     545{
     546    // https://html.spec.whatwg.org/#cors-same-origin
     547    // A response whose type is "basic", "cors", or "default" is CORS-same-origin.
     548    switch (type()) {
     549    case ResourceResponse::Type::Basic:
     550    case ResourceResponse::Type::Cors:
     551    case ResourceResponse::Type::Default:
     552        return true;
     553    default:
     554        return false;
     555    }
     556}
     557
     558bool FetchResponse::hasWasmMIMEType() const
     559{
     560    return equalLettersIgnoringASCIICase(m_headers->fastGet(HTTPHeaderName::ContentType), "application/wasm");
     561}
     562
    544563} // namespace WebCore
  • trunk/Source/WebCore/Modules/fetch/FetchResponse.h

    r263700 r271993  
    109109    const HTTPHeaderMap& internalResponseHeaders() const { return m_internalResponse.httpHeaderFields(); }
    110110
     111    bool isCORSSameOrigin() const;
     112    bool hasWasmMIMEType() const;
     113
    111114private:
    112115    FetchResponse(ScriptExecutionContext&, Optional<FetchBody>&&, Ref<FetchHeaders>&&, ResourceResponse&&);
  • trunk/Source/WebCore/bindings/js/JSDOMGlobalObject.cpp

    r269414 r271993  
    3030#include "DOMWindow.h"
    3131#include "Document.h"
     32#include "FetchResponse.h"
    3233#include "JSAbortAlgorithm.h"
    3334#include "JSAbortSignal.h"
     
    3536#include "JSDOMWindow.h"
    3637#include "JSEventListener.h"
     38#include "JSFetchResponse.h"
    3739#include "JSIDBSerializationGlobalObject.h"
    3840#include "JSMediaStream.h"
     
    5456#include <JavaScriptCore/JSInternalPromise.h>
    5557#include <JavaScriptCore/StructureInlines.h>
     58#include <JavaScriptCore/WasmStreamingCompiler.h>
    5659
    5760namespace WebCore {
     
    292295}
    293296
     297#if ENABLE(WEBASSEMBLY)
     298// https://webassembly.github.io/spec/web-api/index.html#compile-a-potential-webassembly-response
     299static JSC::JSPromise* handleResponseOnStreamingAction(JSC::JSGlobalObject* globalObject, JSC::JSValue source, JSC::Wasm::CompilerMode compilerMode, JSC::JSObject* importObject)
     300{
     301    VM& vm = globalObject->vm();
     302    JSLockHolder lock(vm);
     303
     304    auto deferred = DeferredPromise::create(*jsCast<JSDOMGlobalObject*>(globalObject), DeferredPromise::Mode::RetainPromiseOnResolve);
     305
     306    auto inputResponse = JSFetchResponse::toWrapped(vm, source);
     307    if (!inputResponse) {
     308        deferred->reject(TypeError, "first argument must be an Response or Promise for Response"_s);
     309        return jsCast<JSC::JSPromise*>(deferred->promise());
     310    }
     311
     312    if (auto exception = inputResponse->loadingException()) {
     313        deferred->reject(*exception);
     314        return jsCast<JSC::JSPromise*>(deferred->promise());
     315    }
     316
     317    // 4. If response is not CORS-same-origin, reject returnValue with a TypeError and abort these substeps.
     318    // If response is opaque, content-type becomes "".
     319    if (!inputResponse->isCORSSameOrigin()) {
     320        deferred->reject(TypeError, "Response is not CORS-same-origin"_s);
     321        return jsCast<JSC::JSPromise*>(deferred->promise());
     322    }
     323
     324    // 3. If mimeType is not `application/wasm`, reject returnValue with a TypeError and abort these substeps.
     325    if (!inputResponse->hasWasmMIMEType()) {
     326        deferred->reject(TypeError, "Unexpected response MIME type. Expected 'application/wasm'"_s);
     327        return jsCast<JSC::JSPromise*>(deferred->promise());
     328    }
     329
     330    // 5. If response’s status is not an ok status, reject returnValue with a TypeError and abort these substeps.
     331    if (!inputResponse->ok()) {
     332        deferred->reject(TypeError, "Response has not returned OK status"_s);
     333        return jsCast<JSC::JSPromise*>(deferred->promise());
     334    }
     335
     336    // https://fetch.spec.whatwg.org/#concept-body-consume-body
     337    if (inputResponse->isDisturbedOrLocked()) {
     338        deferred->reject(TypeError, "Response is disturbed or locked"_s);
     339        return jsCast<JSC::JSPromise*>(deferred->promise());
     340    }
     341
     342    auto compiler = JSC::Wasm::StreamingCompiler::create(vm, compilerMode, globalObject, jsCast<JSC::JSPromise*>(deferred->promise()), importObject);
     343
     344    if (inputResponse->isBodyReceivedByChunk()) {
     345        inputResponse->consumeBodyReceivedByChunk([globalObject, compiler = WTFMove(compiler)](auto&& result) mutable {
     346            VM& vm = globalObject->vm();
     347            JSLockHolder lock(vm);
     348
     349            if (result.hasException()) {
     350                auto exception = result.exception();
     351                if (exception.code() == ExistingExceptionError) {
     352                    auto scope = DECLARE_CATCH_SCOPE(vm);
     353
     354                    EXCEPTION_ASSERT(scope.exception());
     355
     356                    auto error = scope.exception()->value();
     357                    scope.clearException();
     358
     359                    compiler->fail(globalObject, error);
     360                    return;
     361                }
     362
     363                auto scope = DECLARE_THROW_SCOPE(vm);
     364                auto error = createDOMException(*globalObject, WTFMove(exception));
     365                if (UNLIKELY(scope.exception())) {
     366                    ASSERT(isTerminatedExecutionException(vm, scope.exception()));
     367                    compiler->cancel();
     368                    return;
     369                }
     370
     371                compiler->fail(globalObject, error);
     372                return;
     373            }
     374
     375            if (auto chunk = result.returnValue())
     376                compiler->addBytes(chunk->data, chunk->size);
     377            else
     378                compiler->finalize(globalObject);
     379        });
     380        return jsCast<JSC::JSPromise*>(deferred->promise());
     381    }
     382
     383    auto body = inputResponse->consumeBody();
     384    WTF::switchOn(body, [&](Ref<FormData>& formData) {
     385        if (auto buffer = formData->asSharedBuffer()) {
     386            compiler->addBytes(reinterpret_cast<const uint8_t*>(buffer->data()), buffer->size());
     387            compiler->finalize(globalObject);
     388            return;
     389        }
     390        // FIXME: http://webkit.org/b/184886> Implement loading for the Blob type
     391        compiler->fail(globalObject, createTypeError(globalObject, "Blob is not supported"_s));
     392    }, [&](Ref<SharedBuffer>& buffer) {
     393        compiler->addBytes(reinterpret_cast<const uint8_t*>(buffer->data()), buffer->size());
     394        compiler->finalize(globalObject);
     395    }, [&](std::nullptr_t&) {
     396        compiler->finalize(globalObject);
     397    });
     398
     399    return jsCast<JSC::JSPromise*>(deferred->promise());
     400}
     401
     402JSC::JSPromise* JSDOMGlobalObject::compileStreaming(JSC::JSGlobalObject* globalObject, JSC::JSValue source)
     403{
     404    ASSERT(source);
     405    return handleResponseOnStreamingAction(globalObject, source, JSC::Wasm::CompilerMode::Validation, nullptr);
     406}
     407
     408JSC::JSPromise* JSDOMGlobalObject::instantiateStreaming(JSC::JSGlobalObject* globalObject, JSC::JSValue source, JSC::JSObject* importObject)
     409{
     410    ASSERT(source);
     411    return handleResponseOnStreamingAction(globalObject, source, JSC::Wasm::CompilerMode::FullCompile, importObject);
     412}
     413#endif
     414
    294415JSDOMGlobalObject& callerGlobalObject(JSGlobalObject& lexicalGlobalObject, CallFrame& callFrame)
    295416{
  • trunk/Source/WebCore/bindings/js/JSDOMGlobalObject.h

    r269414 r271993  
    101101    static void promiseRejectionTracker(JSC::JSGlobalObject*, JSC::JSPromise*, JSC::JSPromiseRejectionOperation);
    102102
     103#if ENABLE(WEBASSEMBLY)
     104    static JSC::JSPromise* compileStreaming(JSC::JSGlobalObject*, JSC::JSValue);
     105    static JSC::JSPromise* instantiateStreaming(JSC::JSGlobalObject*, JSC::JSValue, JSC::JSObject*);
     106#endif
     107
    103108    JSDOMStructureMap m_structures;
    104109    JSDOMConstructorMap m_constructors;
  • trunk/Source/WebCore/bindings/js/JSDOMPromiseDeferred.cpp

    r264992 r271993  
    2929#include "DOMWindow.h"
    3030#include "EventLoop.h"
     31#include "JSDOMExceptionHandling.h"
    3132#include "JSDOMPromise.h"
    3233#include "JSDOMWindow.h"
  • trunk/Source/WebCore/bindings/js/JSDOMWindowBase.cpp

    r269414 r271993  
    391391}
    392392
    393 #if ENABLE(WEBASSEMBLY)
    394 static Optional<Vector<uint8_t>> tryAllocate(JSC::JSGlobalObject* lexicalGlobalObject, JSC::JSPromise* promise, const char* data, size_t byteSize)
    395 {
    396     Vector<uint8_t> arrayBuffer;
    397     if (!arrayBuffer.tryReserveCapacity(byteSize)) {
    398         promise->reject(lexicalGlobalObject, createOutOfMemoryError(lexicalGlobalObject));
    399         return WTF::nullopt;
    400     }
    401 
    402     arrayBuffer.grow(byteSize);
    403     memcpy(arrayBuffer.data(), data, byteSize);
    404 
    405     return arrayBuffer;
    406 }
    407 
    408 static bool isResponseCorrect(JSC::JSGlobalObject* lexicalGlobalObject, FetchResponse* inputResponse, JSC::JSPromise* promise)
    409 {
    410     bool isResponseCorsSameOrigin = inputResponse->type() == ResourceResponse::Type::Basic || inputResponse->type() == ResourceResponse::Type::Cors || inputResponse->type() == ResourceResponse::Type::Default;
    411 
    412     if (!isResponseCorsSameOrigin) {
    413         promise->reject(lexicalGlobalObject, createTypeError(lexicalGlobalObject, "Response is not CORS-same-origin"_s));
    414         return false;
    415     }
    416 
    417     if (!inputResponse->ok()) {
    418         promise->reject(lexicalGlobalObject, createTypeError(lexicalGlobalObject, "Response has not returned OK status"_s));
    419         return false;
    420     }
    421 
    422     auto contentType = inputResponse->headers().fastGet(HTTPHeaderName::ContentType);
    423     if (!equalLettersIgnoringASCIICase(contentType, "application/wasm")) {
    424         promise->reject(lexicalGlobalObject, createTypeError(lexicalGlobalObject, "Unexpected response MIME type. Expected 'application/wasm'"_s));
    425         return false;
    426     }
    427 
    428     return true;
    429 }
    430 
    431 static void handleResponseOnStreamingAction(JSC::JSGlobalObject* globalObject, FetchResponse* inputResponse, JSC::JSPromise* promise, Function<void(JSC::JSGlobalObject* lexicalGlobalObject, const char* data, size_t byteSize)>&& actionCallback)
    432 {
    433     if (!isResponseCorrect(globalObject, inputResponse, promise))
    434         return;
    435 
    436     if (inputResponse->isBodyReceivedByChunk()) {
    437         inputResponse->consumeBodyReceivedByChunk([promise, callback = WTFMove(actionCallback), globalObject, data = SharedBuffer::create()] (auto&& result) mutable {
    438             if (result.hasException()) {
    439                 promise->reject(globalObject, createTypeError(globalObject, result.exception().message()));
    440                 return;
    441             }
    442 
    443             if (auto chunk = result.returnValue())
    444                 data->append(reinterpret_cast<const char*>(chunk->data), chunk->size);
    445             else {
    446                 VM& vm = globalObject->vm();
    447                 JSLockHolder lock(vm);
    448 
    449                 callback(globalObject, data->data(), data->size());
    450             }
    451         });
    452         return;
    453     }
    454 
    455     auto body = inputResponse->consumeBody();
    456     WTF::switchOn(body, [&] (Ref<FormData>& formData) {
    457         if (auto buffer = formData->asSharedBuffer()) {
    458             VM& vm = globalObject->vm();
    459             JSLockHolder lock(vm);
    460 
    461             actionCallback(globalObject, buffer->data(), buffer->size());
    462             return;
    463         }
    464         // FIXME: http://webkit.org/b/184886> Implement loading for the Blob type
    465         promise->reject(globalObject, createTypeError(globalObject, "Unexpected Response's Content-type"_s));
    466     }, [&] (Ref<SharedBuffer>& buffer) {
    467         VM& vm = globalObject->vm();
    468         JSLockHolder lock(vm);
    469 
    470         actionCallback(globalObject, buffer->data(), buffer->size());
    471     }, [&] (std::nullptr_t&) {
    472         promise->reject(globalObject, createTypeError(globalObject, "Unexpected Response's Content-type"_s));
    473     });
    474 }
    475 
    476 void JSDOMWindowBase::compileStreaming(JSC::JSGlobalObject* globalObject, JSC::JSPromise* promise, JSC::JSValue source)
    477 {
    478     ASSERT(source);
    479 
    480     VM& vm = globalObject->vm();
    481 
    482     ASSERT(vm.deferredWorkTimer->hasPendingWork(promise));
    483     ASSERT(vm.deferredWorkTimer->hasDependancyInPendingWork(promise, globalObject));
    484 
    485     if (auto inputResponse = JSFetchResponse::toWrapped(vm, source)) {
    486         handleResponseOnStreamingAction(globalObject, inputResponse, promise, [promise] (JSC::JSGlobalObject* lexicalGlobalObject, const char* data, size_t byteSize) mutable {
    487             if (auto arrayBuffer = tryAllocate(lexicalGlobalObject, promise, data, byteSize))
    488                 JSC::JSWebAssembly::webAssemblyModuleValidateAsync(lexicalGlobalObject, promise, WTFMove(*arrayBuffer));
    489         });
    490     } else
    491         promise->reject(globalObject, createTypeError(globalObject, "first argument must be an Response or Promise for Response"_s));
    492 }
    493 
    494 void JSDOMWindowBase::instantiateStreaming(JSC::JSGlobalObject* globalObject, JSC::JSPromise* promise, JSC::JSValue source, JSC::JSObject* importedObject)
    495 {
    496     ASSERT(source);
    497 
    498     VM& vm = globalObject->vm();
    499 
    500     ASSERT(vm.deferredWorkTimer->hasPendingWork(promise));
    501     ASSERT(vm.deferredWorkTimer->hasDependancyInPendingWork(promise, globalObject));
    502     ASSERT(vm.deferredWorkTimer->hasDependancyInPendingWork(promise, importedObject));
    503 
    504     if (auto inputResponse = JSFetchResponse::toWrapped(vm, source)) {
    505         handleResponseOnStreamingAction(globalObject, inputResponse, promise, [promise, importedObject] (JSC::JSGlobalObject* lexicalGlobalObject, const char* data, size_t byteSize) mutable {
    506             if (auto arrayBuffer = tryAllocate(lexicalGlobalObject, promise, data, byteSize))
    507                 JSC::JSWebAssembly::webAssemblyModuleInstantinateAsync(lexicalGlobalObject, promise, WTFMove(*arrayBuffer), importedObject);
    508         });
    509     } else
    510         promise->reject(globalObject, createTypeError(globalObject, "first argument must be an Response or Promise for Response"_s));
    511 }
    512 #endif
    513 
    514393} // namespace WebCore
  • trunk/Source/WebCore/bindings/js/JSDOMWindowBase.h

    r269414 r271993  
    106106    static JSC::JSObject* moduleLoaderCreateImportMetaProperties(JSC::JSGlobalObject*, JSC::JSModuleLoader*, JSC::JSValue, JSC::JSModuleRecord*, JSC::JSValue);
    107107
    108 #if ENABLE(WEBASSEMBLY)
    109     static void compileStreaming(JSC::JSGlobalObject*, JSC::JSPromise*, JSC::JSValue);
    110     static void instantiateStreaming(JSC::JSGlobalObject*, JSC::JSPromise*, JSC::JSValue, JSC::JSObject*);
    111 #endif
    112 
    113108    RefPtr<DOMWindow> m_wrapped;
    114109    RefPtr<Event> m_currentEvent;
  • trunk/Source/WebCore/bindings/js/JSWorkerGlobalScopeBase.cpp

    r268775 r271993  
    7070    &scriptExecutionStatus,
    7171    &defaultLanguage,
    72     nullptr, // compileStreaming
    73     nullptr, // instantiateStreaming
     72#if ENABLE(WEBASSEMBLY)
     73    &compileStreaming,
     74    &instantiateStreaming,
     75#else
     76    nullptr,
     77    nullptr,
     78#endif
    7479};
    7580
  • trunk/Source/WebCore/bindings/js/JSWorkletGlobalScopeBase.cpp

    r268775 r271993  
    6060    &scriptExecutionStatus,
    6161    &defaultLanguage,
    62     nullptr, // compileStreaming
    63     nullptr, // instantiateStreaming
     62#if ENABLE(WEBASSEMBLY)
     63    &compileStreaming,
     64    &instantiateStreaming,
     65#else
     66    nullptr,
     67    nullptr,
     68#endif
    6469};
    6570
  • trunk/Source/cmake/OptionsFTW.cmake

    r271316 r271993  
    103103WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_VIDEO PRIVATE ON)
    104104WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEBASSEMBLY PRIVATE OFF)
    105 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEBASSEMBLY_STREAMING_API PRIVATE OFF)
    106105WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEBGL PRIVATE ON)
    107106WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WIRELESS_PLAYBACK_TARGET PRIVATE OFF)
  • trunk/Source/cmake/WebKitFeatures.cmake

    r271775 r271993  
    244244    WEBKIT_OPTION_DEFINE(ENABLE_WEBASSEMBLY "Toggle WebAssembly support" PRIVATE ${ENABLE_JIT_DEFAULT})
    245245    WEBKIT_OPTION_DEFINE(ENABLE_WEBASSEMBLY_B3JIT "Toggle WebAssembly B3 JIT support" PRIVATE ${ENABLE_FTL_DEFAULT})
    246     WEBKIT_OPTION_DEFINE(ENABLE_WEBASSEMBLY_STREAMING_API "Toggle WebAssembly streaming api support." PRIVATE OFF)
    247246    WEBKIT_OPTION_DEFINE(ENABLE_WEBDRIVER "Toggle WebDriver service process" PRIVATE OFF)
    248247    WEBKIT_OPTION_DEFINE(ENABLE_WEBDRIVER_KEYBOARD_INTERACTIONS "Toggle WebDriver keyboard interactions" PRIVATE OFF)
Note: See TracChangeset for help on using the changeset viewer.