Closed Bug 1610206 Opened 5 years ago Closed 5 years ago

Restrict functions returned by Function#caller

Categories

(Core :: JavaScript Engine, task, P2)

task

Tracking

()

RESOLVED FIXED
mozilla75
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.

Priority: -- → P2
Pushed by evilpies@gmail.com: https://hg.mozilla.org/integration/autoland/rev/d0226991e792 Restrict functions returned by Function#caller. r=jorendorff
Keywords: site-compat
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla75

Posted site compatibility note for web developers.

Blocks: 1615704
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: