Closed
Bug 636789
Opened 14 years ago
Closed 8 months ago
Object.defineProperty is not always transparent on proxies
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: dvander, Unassigned)
References
Details
(Whiteboard: js-triage-needed)
Attachments
(1 file)
20.94 KB,
patch
|
Details | Diff | Splinter Review |
Object.defineProperty, on a proxy, goes through external API which doesn't have the right semantics. We should make it go through the right internal API, which is a little tricky since not enough data is passed around.
This patch passes Jeff's Object.defineProperty tests if I make it wrap incoming objects.
Brendan says:
> Could you go slightly further and s/ESPropertyDescriptor/PropDesc/g so we
> wouldn't have yet another such thing (albeit a subtype)? I.e., keep the subtype
> relation but merge the new one into the PropDesc one added to jsobj.* for ES5.
So I'll do that next.
Comment 2•14 years ago
|
||
I hadn't seen this patch, and I went and reproduced about half of the work in jsdbg2 branch. I really should read this patch before landing that.
Btw, it turns out this was actually spec'd with the wrong semantics that we implement; I sent email to es-discuss and they fixed it in the wiki (hence the distinction between ToPropertyDescriptor and ToCompletePropertyDescriptor now).
http://wiki.ecmascript.org/doku.php?id=harmony:proxies_semantics
So this bug was INVALID all this time, but not anymore. :-\
Updated•13 years ago
|
Whiteboard: js-triage-needed
Assignee | ||
Updated•10 years ago
|
Assignee: general → nobody
Updated•2 years ago
|
Severity: normal → S3
Comment 3•8 months ago
|
||
mozilla-unified central passes the Object.defineProperty tests if I patch s/src/tests/non262/object/defineProperty-setup.js line 403 like this:
- Object.defineProperty(obj, propname, propdesc);
+ Object.defineProperty(wrapWithProto(obj, null), propname, propdesc);
So I think this issue has been resolved.
Status: NEW → RESOLVED
Closed: 8 months ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•