Restrict functions returned by Function#caller
Categories
(Core :: JavaScript Engine, task, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox75 | --- | fixed |
People
(Reporter: evilpies, Assigned: evilpies)
References
(Blocks 1 open bug)
Details
(Keywords: dev-doc-complete, site-compat)
Attachments
(1 file)
There is a TC39 proposal for specifying Function#caller. This proposal restricts the functions that can be returned. Currently we already throw for strict functions. The proposal changes this to returning null
for strict, async or generator functions. Furthermore cross-realm functions are also disallowed. I suggest we implement that change in a separate bug, because this restriction is currently not enforced by any browser.
I just realized this proposal is at stage 0. So I think we should wait at least till the first presentation of this proposal at the next meeting.
Updated•5 years ago
|
Comment 3•5 years ago
|
||
See also https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/caller
Comment 5•5 years ago
|
||
bugherder |
Comment 6•5 years ago
|
||
Posted site compatibility note for web developers.
Comment 8•5 years ago
|
||
Release notes: https://wiki.developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/75#JavaScript
Reference docs: https://wiki.developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/caller
Description
•