Closed
Bug 1462741
Opened 7 years ago
Closed 7 years ago
Function.prototype.toString() is not displayed as a native function
Categories
(Core :: JavaScript: Standard Library, defect)
Core
JavaScript: Standard Library
Tracking
()
RESOLVED
FIXED
mozilla66
Tracking | Status | |
---|---|---|
firefox66 | --- | fixed |
People
(Reporter: anba, Assigned: evilpies)
References
(Blocks 1 open bug)
Details
Attachments
(2 files, 2 obsolete files)
https://github.com/tc39/test262/blob/master/test/built-ins/Function/prototype/toString/well-known-intrinsic-object-functions.js expects that |Function.prototype.toString()| returns the string representation of a native function.
Test case:
---
print(Function.prototype.toString());
---
Expected: "function () {\n [native code]\n}"
Actual: "function () {\n}"
Assignee | ||
Comment 1•7 years ago
|
||
I wonder if this means that we can make Function.prototype a real native function, instead of an interpreted function: https://searchfox.org/mozilla-central/rev/3fdc51e66c9487b39220ad58dcee275fca070ccd/js/src/vm/JSFunction.cpp#857
Assignee | ||
Comment 2•7 years ago
|
||
Assignee | ||
Comment 3•7 years ago
|
||
Interesting behaviour change from this: Function.prototype.{arguments, caller} now throw, because it's a native (built-in) function. Chrome also behaves like this, so it's probably web-compatible.
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → evilpies
Assignee | ||
Comment 4•7 years ago
|
||
Assignee | ||
Comment 5•7 years ago
|
||
Various debugger tests were observing Function.prototype.
Assignee | ||
Comment 6•7 years ago
|
||
Assignee | ||
Comment 7•7 years ago
|
||
Depends on D14704
Assignee | ||
Updated•7 years ago
|
Attachment #9030018 -
Attachment is obsolete: true
Assignee | ||
Updated•7 years ago
|
Attachment #9030019 -
Attachment is obsolete: true
Pushed by evilpies@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/7d987ede1c79
Make Function.prototype a native function. r=jorendorff
https://hg.mozilla.org/integration/autoland/rev/f23ff3309649
Update tests. r=jorendorff
Comment 10•7 years ago
|
||
bugherder |
Comment 11•7 years ago
|
||
Pushed by evilpies@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/faac12c6cb61
Enable test262 test. r=me
Assignee | ||
Updated•7 years ago
|
Keywords: leave-open
Comment 12•7 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox66:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla66
Updated•7 years ago
|
status-firefox62:
affected → ---
You need to log in
before you can comment on or make changes to this bug.
Description
•