Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 736ce62a5254f322562cf1ee8f4e12c98a913029
https://github.com/WebKit/WebKit/commit/736ce62a5254f322562cf1ee8f4e12c98a913029
Author: Shu-yu Guo <[email protected]>
Date: 2026-06-30 (Tue, 30 Jun 2026)
Changed paths:
A JSTests/wasm/gc/private-fields-and-methods.js
M Source/JavaScriptCore/runtime/JSObjectInlines.h
Log Message:
-----------
[JSC] Disallow defining private names on WasmGC objects
https://bugs.webkit.org/show_bug.cgi?id=314438
rdar://176445615
Reviewed by Yusuke Suzuki.
While the spec currently technically allows for defining private fields and
methods on WasmGC objects, this is against the spirit of those objects being
fixed-layout.
For compat, both V8 and SpiderMonkey also disallow addition of private names on
WasmGC objects.
Test: JSTests/wasm/gc/private-fields-and-methods.js
* JSTests/wasm/gc/private-fields-and-methods.js: Added.
(testPrivateMethodOnStruct.B):
(testPrivateMethodOnStruct.D.prototype.m):
(testPrivateMethodOnStruct.D):
(testPrivateMethodOnStruct):
(testPrivateFieldOnStruct.B):
(testPrivateFieldOnStruct.D):
(testPrivateFieldOnStruct):
(testPrivateMethodOnArray.B):
(testPrivateMethodOnArray.D.prototype.m):
(testPrivateMethodOnArray.D):
(testPrivateMethodOnArray):
(testPrivateFieldOnArray.B):
(testPrivateFieldOnArray.D):
(testPrivateFieldOnArray):
(testPrivateGetterOnStruct.B):
(testPrivateGetterOnStruct.D.prototype.get x):
(testPrivateGetterOnStruct.D):
(testPrivateGetterOnStruct):
(testGCSurvival.B):
(testGCSurvival.D.prototype.m):
(testGCSurvival.D):
(testGCSurvival):
* Source/JavaScriptCore/runtime/JSObjectInlines.h:
(JSC::JSObject::getPrivateField):
(JSC::JSObject::setPrivateField):
(JSC::JSObject::definePrivateField):
(JSC::JSObject::setPrivateBrand):
Originally-landed-as: 305413.881@safari-7624-branch (525600a227a6).
rdar://180438063
Canonical link: https://commits.webkit.org/316152@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications