Closed Bug 1615939 Opened 4 years ago Closed 4 years ago

Bound functions cannot be eagerly evaluated

Categories

(DevTools :: Console, defect)

defect
Not set
normal

Tracking

(firefox75 fixed)

RESOLVED FIXED
Firefox 75
Tracking Status
firefox75 --- fixed

People

(Reporter: loganfsmyth, Assigned: loganfsmyth)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

A conversation in another issue sparked me to test out bound functions, and it looks like they don't currently work with eager evaluation.

For example, if you run the following in the console:

var obj = [1, 2, 3];
var fn = obj.includes.bind(obj, 1);

and then type out

fn()

you will not get an eager result, whereas if you type out

obj.includes(1)

you will get an eager result.

Assignee: nobody → loganfsmyth
Status: NEW → ASSIGNED
Pushed by loganfsmyth@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/1ed519a227e2
Drill through bound functions when checking function whitelist. r=jlast
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 75
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: