Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: d02369b1dee563eb26b8f36ba243aedb63f0f531
https://github.com/WebKit/WebKit/commit/d02369b1dee563eb26b8f36ba243aedb63f0f531
Author: Sergey Rubanov <[email protected]>
Date: 2026-10-07 (Wed, 07 Oct 2026)
Changed paths:
A JSTests/stress/bound-function-instanceof-primitive.js
M JSTests/stress/intl-collator.js
M JSTests/stress/intl-datetimeformat.js
M JSTests/stress/intl-numberformat.js
M Source/JavaScriptCore/runtime/JSObject.cpp
Log Message:
-----------
[JSC] Don't read prototype for instanceof of a primitive through a bound
function
https://bugs.webkit.org/show_bug.cgi?id=326073
Reviewed by Yusuke Suzuki.
OrdinaryHasInstance returns false for a non-object before it gets
"prototype". A bound function forwards that check to its target through
InstanceofOperator. The default hasInstance path loaded "prototype"
first, so a throwing getter ran for a number or a string.
The Intl compare and format stress tests expected that getter to throw
TypeError for `1 instanceof` the bound function. Those now count
"prototype" reads and expect zero.
* JSTests/stress/bound-function-instanceof-primitive.js:
* JSTests/stress/intl-collator.js:
* JSTests/stress/intl-datetimeformat.js:
* JSTests/stress/intl-numberformat.js:
* Source/JavaScriptCore/runtime/JSObject.cpp:
(JSC::JSObject::hasInstance):
Canonical link: https://commits.webkit.org/322956@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications