WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
326072
Function.prototype.bind calls the target's [[GetPrototypeOf]] after reading "length" and "name"
https://bugs.webkit.org/show_bug.cgi?id=326072
Summary
Function.prototype.bind calls the target's [[GetPrototypeOf]] after reading "...
d01c2
Reported
2026-10-02 06:17:19 PDT
Version: JavaScriptCore revision
321440@main
(installed via jsvu) OS: macOS Golden Gate 27.0 Architecture: ARM64 What steps will reproduce the problem? Running the following JavaScript program reproduces the problem: ```js // sample.js var log = []; var target = new Proxy(function f(a, b) {}, { getPrototypeOf(t) { log.push("getPrototypeOf"); return Reflect.getPrototypeOf(t); }, getOwnPropertyDescriptor(t, k) { log.push("getOwnPropertyDescriptor " + String(k)); return Reflect.getOwnPropertyDescriptor(t, k); }, get(t, k) { log.push("get " + String(k)); return Reflect.get(t, k); }, }); target.bind(); print(log.join(", ")); ``` What is the expected output? get bind, getPrototypeOf, getOwnPropertyDescriptor length, get length, get name What do you see instead? get bind, getOwnPropertyDescriptor length, get length, get name, getPrototypeOf Additional information: Function.prototype.bind step 3 is BoundFunctionCreate, whose step 1 is ? targetFunction.[[GetPrototypeOf]](). Only after that does bind call HasOwnProperty(target, "length") and Get(target, "length") (steps 5-6) and Get(target, "name") (step 8). JSC reads "length" and "name" first and calls [[GetPrototypeOf]] last. V8 (15.6.20), SpiderMonkey (157.0b3), GraalJS (25.3.4.1) and XS (9.5.0) print the expected order. Specification links: Function.prototype.bind:
https://tc39.es/ecma262/#sec-function.prototype.bind
BoundFunctionCreate:
https://tc39.es/ecma262/#sec-boundfunctioncreate
Attachments
Add attachment
proposed patch, testcase, etc.
Sergey Rubanov
Comment 1
2026-10-05 05:57:09 PDT
https://github.com/WebKit/WebKit/pull/75885
Radar WebKit Bug Importer
Comment 2
2026-10-09 06:18:14 PDT
<
rdar://problem/189616288
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug