Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 5faef46275e1a37fc9924d252f3cd9e59fa8a7b4
      
https://github.com/WebKit/WebKit/commit/5faef46275e1a37fc9924d252f3cd9e59fa8a7b4
  Author: Sosuke Suzuki <[email protected]>
  Date:   2026-08-31 (Mon, 31 Aug 2026)

  Changed paths:
    A JSTests/wasm/stress/exception-constructor-options-argument.js
    M Source/JavaScriptCore/wasm/js/WebAssemblyExceptionConstructor.cpp

  Log Message:
  -----------
  [JSC] `WebAssembly.Exception` rejects null options and accepts non-object 
options
https://bugs.webkit.org/show_bug.cgi?id=322948

Reviewed by Keith Miller.

The third argument of the WebAssembly.Exception constructor is a WebIDL
dictionary, so null must be treated like undefined and any other
non-object must be a TypeError. The constructor only skipped undefined,
so null threw while reading traceStack and a number or string was read
as an object.

Treat undefined and null as the empty dictionary and throw for other
non-objects.

Test: JSTests/wasm/stress/exception-constructor-options-argument.js

* JSTests/wasm/stress/exception-constructor-options-argument.js: Added.
(testUndefinedAndNull):
(testNonObjects):
* Source/JavaScriptCore/wasm/js/WebAssemblyExceptionConstructor.cpp:
(JSC::JSC_DEFINE_HOST_FUNCTION):

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



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

Reply via email to