Closed
Bug 655112
Opened 13 years ago
Closed 12 years ago
Object.freeze(functionProxy) does not call the function proxy handler's fix() trap
Categories
(Core :: JavaScript Engine, defect, P2)
Tracking
()
RESOLVED
INVALID
People
(Reporter: jdm, Assigned: jdm)
References
Details
Attachments
(1 file)
(deleted),
patch
|
Details | Diff | Splinter Review |
+++ This bug was initially created as a clone of Bug #600677 +++ Tom van Cutsem 2011-04-28 06:30:07 PDT The current patch doesn't seem to fix the issue for function proxies: Testcase: var handler = { get: function(rcvr, name) { if (name === 'isTrapping') return true; }, fix: function() { return { isTrapping: { value: false } }; } }; var p = Proxy.createFunction(handler, function(){}, function(){}); assert(p.isTrapping); Object.preventExtensions(p); assert(! p.isTrapping); The call to preventExtensions still fails. It works fine for object proxies though (replace Proxy.createFunction by Proxy.create)
Assignee | ||
Comment 1•13 years ago
|
||
Ok, this gets the the correct results for p.isTrapping for both checks in Tom's testcase. However, I'm worried about this output from the same test:
>js> Object.preventExtensions(p)
>Function.prototype.toString called on incompatible object
Is this something I need to be investigating, or is this separate bug fodder?
Assignee: general → josh
Comment 2•13 years ago
|
||
That seems odd. It seems Function.prototype.toString is incompatible with fixed function proxies? On non-fixed function proxies |fp| with call trap argument |ct|, |Function.prototype.toString.call(fp)| is equivalent to |Function.prototype.toString.call(ct)| This behavior should remain the same for fixed function proxies.
Updated•13 years ago
|
Blocks: harmony:proxies
Updated•13 years ago
|
Blocks: harmony:proxy
Updated•13 years ago
|
No longer blocks: harmony:proxy
Comment 3•12 years ago
|
||
Marking this bug as invalid since there is no fix trap with the direct proxies design. Feel free to change the status if I'm mistaken.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•