Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 24cf2e544f58ca4c951887186f7d42d1a8e45119
https://github.com/WebKit/WebKit/commit/24cf2e544f58ca4c951887186f7d42d1a8e45119
Author: Yusuke Suzuki <[email protected]>
Date: 2026-05-13 (Wed, 13 May 2026)
Changed paths:
M Source/JavaScriptCore/CMakeLists.txt
M Source/JavaScriptCore/DerivedSources.make
M Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
M Source/JavaScriptCore/Sources.txt
M Source/JavaScriptCore/builtins/BuiltinNames.h
R Source/JavaScriptCore/builtins/WebAssembly.js
M Source/JavaScriptCore/bytecode/LinkTimeConstant.h
M Source/JavaScriptCore/heap/Heap.h
M Source/JavaScriptCore/heap/HeapSubspaceTypes.h
M Source/JavaScriptCore/runtime/GlobalObjectMethodTable.h
M Source/JavaScriptCore/runtime/JSCast.h
M Source/JavaScriptCore/runtime/JSGlobalObject.cpp
M Source/JavaScriptCore/runtime/JSMicrotask.cpp
M Source/JavaScriptCore/runtime/JSType.cpp
M Source/JavaScriptCore/runtime/JSType.h
M Source/JavaScriptCore/runtime/Microtask.h
M Source/JavaScriptCore/runtime/VM.cpp
M Source/JavaScriptCore/runtime/VM.h
M Source/JavaScriptCore/wasm/js/JSWebAssembly.cpp
M Source/JavaScriptCore/wasm/js/JSWebAssembly.h
A Source/JavaScriptCore/wasm/js/JSWebAssemblyStreamingContext.cpp
A Source/JavaScriptCore/wasm/js/JSWebAssemblyStreamingContext.h
A Source/JavaScriptCore/wasm/js/JSWebAssemblyStreamingContextInlines.h
M Source/WebCore/bindings/js/JSDOMGlobalObject.cpp
M Source/WebCore/bindings/js/JSDOMGlobalObject.h
Log Message:
-----------
[JSC] Move WebAssembly.instantiateStreaming / WebAssembly.compileStreaming to
C++
https://bugs.webkit.org/show_bug.cgi?id=314471
rdar://176642241
Reviewed by Keith Miller.
Actually, the old code was slightly wrong. We are returning a resolved
promise inside `then`'s fullfill handler, but this may invoke "then"
function of this returned promise, which can be observable. This patch
cleans up the implementation and also fixes this slight spec-compliant issue.
We move WebAssembly.instantiateStreaming / WebAssembly.compileStreaming
to C++. We introduce JSWebAssemblyStreamingContext and use InternalMicrotask.
The code is much more aligned to the spec[1]'s behavior (we resolve the
returned promise with the output).
This also drops WebAssembly.js builtin file.
[1]: https://www.w3.org/TR/wasm-web-api-2/#streaming-modules
* Source/JavaScriptCore/CMakeLists.txt:
* Source/JavaScriptCore/DerivedSources.make:
* Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj:
* Source/JavaScriptCore/Sources.txt:
* Source/JavaScriptCore/builtins/BuiltinNames.h:
* Source/JavaScriptCore/bytecode/LinkTimeConstant.h:
* Source/JavaScriptCore/heap/Heap.h:
* Source/JavaScriptCore/heap/HeapSubspaceTypes.h:
* Source/JavaScriptCore/runtime/GlobalObjectMethodTable.h:
* Source/JavaScriptCore/runtime/JSCast.h:
* Source/JavaScriptCore/runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
* Source/JavaScriptCore/runtime/JSMicrotask.cpp:
(JSC::webAssemblyCompileStreaming):
(JSC::webAssemblyInstantiateStreaming):
(JSC::runInternalMicrotask):
* Source/JavaScriptCore/runtime/JSType.cpp:
(WTF::printInternal):
* Source/JavaScriptCore/runtime/JSType.h:
* Source/JavaScriptCore/runtime/Microtask.h:
* Source/JavaScriptCore/runtime/VM.cpp:
(JSC::VM::VM):
(JSC::VM::visitAggregateImpl):
* Source/JavaScriptCore/runtime/VM.h:
* Source/JavaScriptCore/wasm/js/JSWebAssembly.cpp:
(JSC::JSWebAssembly::finishCreation):
(JSC::JSC_DEFINE_HOST_FUNCTION):
* Source/JavaScriptCore/wasm/js/JSWebAssembly.h:
* Source/JavaScriptCore/wasm/js/JSWebAssemblyStreamingContext.cpp: Added.
(JSC::JSWebAssemblyStreamingContext::JSWebAssemblyStreamingContext):
(JSC::JSWebAssemblyStreamingContext::create):
(JSC::JSWebAssemblyStreamingContext::destroy):
(JSC::JSWebAssemblyStreamingContext::visitChildrenImpl):
* Source/JavaScriptCore/wasm/js/JSWebAssemblyStreamingContext.h: Copied from
Source/JavaScriptCore/wasm/js/JSWebAssembly.h.
* Source/JavaScriptCore/wasm/js/JSWebAssemblyStreamingContextInlines.h: Renamed
from Source/JavaScriptCore/builtins/WebAssembly.js.
(JSC::JSWebAssemblyStreamingContext::createStructure):
* Source/WebCore/bindings/js/JSDOMGlobalObject.cpp:
(WebCore::handleResponseOnStreamingAction):
(WebCore::JSDOMGlobalObject::compileStreaming):
(WebCore::JSDOMGlobalObject::instantiateStreaming):
* Source/WebCore/bindings/js/JSDOMGlobalObject.h:
Canonical link: https://commits.webkit.org/313171@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications