Closed
Bug 776760
Opened 12 years ago
Closed 12 years ago
ecma_5/extensions/cross-global-getPrototypeOf.js always fails
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
mozilla17
People
(Reporter: jorendorff, Assigned: luke)
Details
(Whiteboard: [js:p1])
Attachments
(1 file)
2.55 KB,
patch
|
jorendorff
:
review+
|
Details | Diff | Splinter Review |
It reduces to this: var g = newGlobal(); g.evaluate("var a = { a: 1 }; " + "var obj = Object.create(a);"); assertEq(Object.getPrototypeOf(g.obj), g.a); g.evaluate("var b = { b: 1 }; " + "obj.__proto__ = b;"); assertEq(Object.getPrototypeOf(g.obj), g.b); Weirdly, if you comment out the first assert, which ought not to have any side effects, the second one passes. I'll flip Terrence for this one. (Note that we *could* just add "fails" to the magic comment at the top of the file and wait for Waldo to get back.)
Updated•12 years ago
|
Whiteboard: [js:t]
Comment 1•12 years ago
|
||
(In reply to Jason Orendorff [:jorendorff] from comment #0) > It reduces to this: > > var g = newGlobal(); > g.evaluate("var a = { a: 1 }; " + > "var obj = Object.create(a);"); > assertEq(Object.getPrototypeOf(g.obj), g.a); > g.evaluate("var b = { b: 1 }; " + > "obj.__proto__ = b;"); > assertEq(Object.getPrototypeOf(g.obj), g.b); > > Weirdly, if you comment out the first assert, which ought not to have any > side effects, the second one passes. > > I'll flip Terrence for this one. > > (Note that we *could* just add "fails" to the magic comment at the top of > the file and wait for Waldo to get back.) Do we know which patch caused it? We should just back out if possible.
Updated•12 years ago
|
Whiteboard: [js:t] → [js:p1]
Comment 2•12 years ago
|
||
It comes from bug 770344, which is also where the test was added.
Assignee | ||
Comment 3•12 years ago
|
||
It looks like the failing test was actually added by bug 770344. The Math.sin() call right before the failing assertEq would seem to indicate that Waldo was working on this and the fix was somehow accidentally lost. I actually remember talking to Waldo about this problem and I think this patch is the intended solution (at least for now; hopefully we can remove the scripted proxy handler disjunct after the direct proxy work).
Reporter | ||
Comment 4•12 years ago
|
||
Comment on attachment 645832 [details] [diff] [review] fix Review of attachment 645832 [details] [diff] [review]: ----------------------------------------------------------------- Looks reasonable to me. (It still doesn't make any sense to me for Object.prototype to call the __proto__ getter. Instead, both should call the same C++ function. But yeah, let's land this.)
Attachment #645832 -
Flags: review?(jorendorff) → review+
Assignee | ||
Comment 5•12 years ago
|
||
Well, it would seem that my patch causes orange: https://tbpl.mozilla.org/?tree=Try&rev=137102959e2d Since this bug existed before bug 770344 (filed as bug 764307), I think we should just remove the offending assert.
Assignee | ||
Comment 6•12 years ago
|
||
Removed: https://hg.mozilla.org/integration/mozilla-inbound/rev/3238a5e6e0d8
Comment 7•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/3238a5e6e0d8
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
You need to log in
before you can comment on or make changes to this bug.
Description
•