Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 7f065ab4abdb982cbf80de24d8a7fde95d8306de
      
https://github.com/WebKit/WebKit/commit/7f065ab4abdb982cbf80de24d8a7fde95d8306de
  Author: Sergey Rubanov <[email protected]>
  Date:   2026-07-15 (Wed, 15 Jul 2026)

  Changed paths:
    A JSTests/wasm/stress/streaming-instantiate-omitted-imports.js
    M Source/JavaScriptCore/wasm/WasmStreamingCompiler.cpp

  Log Message:
  -----------
  WebAssembly streaming instantiation uses the result promise as the import 
object when imports are omitted
https://bugs.webkit.org/show_bug.cgi?id=316985

Reviewed by Yusuke Suzuki.

StreamingCompiler records [globalObject, importObject?] as deferred-work
dependencies; DeferredWorkTimer then appends the result promise. FullCompile
completion always treated dependencies()[1] as the import object, so when
imports were omitted that slot was the result promise. Script could then
satisfy import modules via Promise.prototype.

Only read an import object when dependencies include one (size > 2);
otherwise pass nullptr into instantiateForStreaming.

* Source/JavaScriptCore/wasm/WasmStreamingCompiler.cpp:
(StreamingCompiler::didComplete):
* JSTests/wasm/stress/streaming-instantiate-omitted-imports.js: Added.
Regression for the bug PoC plus a positive path with real imports.

Canonical link: https://commits.webkit.org/317268@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to