Closed
Bug 722551
Opened 13 years ago
Closed 13 years ago
Freezing function proxies doesn't work.
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
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!
$
Assignee | ||
Comment 1•13 years ago
|
||
Assignee | ||
Comment 2•13 years ago
|
||
Assignee | ||
Updated•13 years ago
|
Attachment #592911 -
Attachment is obsolete: true
Assignee | ||
Updated•13 years ago
|
Status: NEW → ASSIGNED
Flags: in-testsuite+
Assignee | ||
Updated•13 years ago
|
Assignee: general → jimb
Assignee | ||
Updated•13 years ago
|
Attachment #592986 -
Flags: review?(gal)
Comment 3•13 years ago
|
||
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+
Assignee | ||
Comment 4•13 years ago
|
||
(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
Comment 5•13 years ago
|
||
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.
Description
•