Closed Bug 795119 Opened 12 years ago Closed 12 years ago

[jsdbg2] Debugger.Object.prototype.evalInGlobal fails to unwrap referent

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla19

People

(Reporter: jimb, Assigned: jimb)

References

Details

Attachments

(1 file, 1 obsolete file)

If the 'this' value given to Debugger.Object.prototype.evalInGlobal is a Debugger.Object referring to a global via a wrapper, evalInGlobal will complain that its 'this' is "does not refer to a global object". It should evaluate its argument using the wrapper's target as the global.
Will r? when it passes try...
Assignee: general → jimb
Status: NEW → ASSIGNED
By the way, this patch's tests use functions added in bug 794726.
Depends on: 794726
Attachment #665672 - Flags: review?(jorendorff)
Blocks: 743311
Attachment #665672 - Attachment is patch: true
Comment on attachment 665672 [details] [diff] [review]
Dereference wrapped 'this' referents in Debugger.Object.prototype.evalInGlobal.

Review of attachment 665672 [details] [diff] [review]:
-----------------------------------------------------------------

I think we may have agreed that evalInGlobal should to stay picky on this. r?me again if you disagree.
Attachment #665672 - Flags: review?(jorendorff)
Yes, I agree it should. We should make sure the error thrown makes sense, though, so I may put a new patch to that effect here.
No longer blocks: 743311
Try: https://tbpl.mozilla.org/?tree=Try&rev=ea525136085a

Will r? if it looks good.
Try does not look good. But I am given to understand that one may expect improved results if one takes care to resolve patch conflicts before submitting one's efforts.

With great optimism:
https://tbpl.mozilla.org/?tree=Try&rev=a5eb7f21b40e
Attachment #669792 - Flags: review?(jorendorff)
Comment on attachment 669792 [details] [diff] [review]
Complain coherently when evalInGlobal{,withBindings} is passed a CCW to a global, not a global.

Stealing at jimb's request.  Friendly error message and nice test case; r+
Attachment #669792 - Flags: review?(jorendorff) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/f67e5b827cdf
Flags: in-testsuite+
Target Milestone: --- → mozilla19
https://hg.mozilla.org/mozilla-central/rev/f67e5b827cdf
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: