Closed Bug 1041756 Opened 10 years ago Closed 10 years ago

ES6 Proxies: |new p| should throw for Scripted proxies with non-constructable targets

Categories

(Core :: JavaScript: Standard Library, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 929467

People

(Reporter: efaust, Unassigned)

References

Details

We've got it half right:

js> var handler = {}; 
js> var p = new Proxy(Math.sin, handler);
js> new p;
typein:3:0 TypeError: p is not a constructor
js> handler.construct = function () { return {}; }
(function () { return {}; })
js> new p;
({})

That last construct invocation should throw, just like the first one.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.