Can't set __proto__ on DOM proxies

RESOLVED FIXED in mozilla29

Status

()

Core
JavaScript Engine
RESOLVED FIXED
5 years ago
4 years ago

People

(Reporter: bz, Assigned: efaust)

Tracking

(Blocks: 1 bug)

unspecified
mozilla29
x86
Mac OS X
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [qa-], URL)

See bug 694775 comment 4 and following.

Jeff, see bug 694775 comment 11 in particular.
Flags: needinfo?(jwalden+bmo)
Yeah, I don't understand how this is supposed to work. We need to implement nativeCall and then detect TestProtoSetterThis and ProtoSetterImpl and call our own instead? And then we need to reimplement whatever checks the engine is doing in those? That seem pretty brittle.
Why exactly can't the engine do this itself? It knows exactly where the proto object is stored in the proxy object after all.

Comment 2

5 years ago
There's an argument that nativeCall is not well-adapted to this problem, certainly.  In the original case, it made plenty of sense in that it meant that all proxy objects, that weren't recognized by the setter function as acceptable this-values, would be rejected.  Generally there weren't many proxies that *wanted* settable protos, tho, so that part was perhaps somewhat vague.

Probably what's most desirable here is making the prototype part of the proxy API, as in the getInheritance/setInheritance stuff from the latest ES6 drafts.  That would make very clear to proxies how they could implement prototypy stuff.
Flags: needinfo?(jwalden+bmo)
Duplicate of this bug: 913420
Eric, do you have the bandwidth to maybe look into this?
Assignee: nobody → general
Component: DOM → JavaScript Engine
Flags: needinfo?(efaustbmo)
(Assignee)

Updated

5 years ago
Depends on: 888969
(Assignee)

Updated

5 years ago
Depends on: 926012
(Assignee)

Comment 5

5 years ago
This should just be fixed when 926012 lands. It no longer relies on implementing the extra machinery. If we want a backport, we can do that much more simply, but we wanted to take a step forward as we did this.
No longer depends on: 888969
Flags: needinfo?(efaustbmo)
Fixed by the patch in bug 926012.
Assignee: general → efaustbmo
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29

Updated

4 years ago
Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.