Closed Bug 722551 Opened 13 years ago Closed 13 years ago

Freezing function proxies doesn't work.

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla13

People

(Reporter: jimb, Assigned: jimb)

Details

Attachments

(1 file, 1 obsolete file)

Function proxies' trap handlers can get called even after they've been frozen: $ cat ~/moz/fproxy.js function x() {} var handler = { getOwnPropertyNames: function () { print("Hi!"); return[]; }, fix:function(){ return{} } }; var fp = Proxy.createFunction(handler,x,x); Object.freeze(fp); print("Frozen."); Object.getOwnPropertyNames(fp); $ obj~/js -f ~/moz/fproxy.js Hi! Frozen. Hi! $
Attachment #592911 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Flags: in-testsuite+
Assignee: general → jimb
Attachment #592986 - Flags: review?(gal)
Comment on attachment 592986 [details] [diff] [review] Once a function proxy has been frozen, operating on it should not cause its trap handlers to be called. Those are some pretty tests. Made my day to read them.
Attachment #592986 - Flags: review?(gal) → review+
(In reply to Andreas Gal :gal from comment #3) > Comment on attachment 592986 [details] [diff] [review] > Once a function proxy has been frozen, operating on it should not cause its > trap handlers to be called. > > Those are some pretty tests. Made my day to read them. For a one-line change, too. :) Thanks for the review! https://hg.mozilla.org/integration/mozilla-inbound/rev/cface840992d That changeset log message omits the r=gal; apologies, folks.
Target Milestone: --- → mozilla13
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: