[webkit-changes] [WebKit/WebKit] dab440: [JSC] Private brand can be empty in computed prope...
David Degazio
noreply at github.com
Fri May 10 17:15:11 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: dab4400141adebfc0fb1f80a4a3c201df64a04ef
https://github.com/WebKit/WebKit/commit/dab4400141adebfc0fb1f80a4a3c201df64a04ef
Author: David Degazio <d_degazio at apple.com>
Date: 2024-05-10 (Fri, 10 May 2024)
Changed paths:
A JSTests/stress/use-static-private-member-in-computed-property-name.js
M Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
Log Message:
-----------
[JSC] Private brand can be empty in computed property name
https://bugs.webkit.org/show_bug.cgi?id=273978
rdar://124072928
Reviewed by Yusuke Suzuki.
Adds a check_tdz to emitCheckPrivateBrand to checks if the private brand is
an empty value before comparing it against the access base. This covers the
case where we're performing a private field access in a computed property
name expression, in which case the enclosing class definition is incomplete
and the private brand will not yet have been defined.
* JSTests/stress/use-static-private-member-in-computed-property-name.js: Added.
(Test.method):
(Test):
* Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitJumpIfEmpty):
(JSC::BytecodeGenerator::emitCheckPrivateBrand):
* Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h:
Canonical link: https://commits.webkit.org/278642@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list