Closed Bug 795173 Opened 12 years ago Closed 12 years ago

[jsdbg2] Debugger.Object.prototype.evalInGlobalWithBindings passes a bad 'this' value

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla19

People

(Reporter: jimb, Assigned: jimb)

Details

Attachments

(1 file)

If g is a Debugger.Object referring to a global object, then |g.evalInGlobalWithBindings(code, bindings)| should evaluate |code| with g's referent as its 'this' value. Instead, it supplies the bindings scope object as the 'this' value.
This also adds a test for Debugger.Frame.prototype.evalWithBindings, to
make sure it puts new variables on the right object; I couldn't find any
existing tests for the non-strict case (Frame-evalWithBindings-11.js
handles the strict mode case).
Assignee: general → jimb
Status: NEW → ASSIGNED
Try: https://tbpl.mozilla.org/?tree=Try&rev=aa9b73b443c1
(Will r? if it looks good.)
Comment on attachment 665714 [details] [diff] [review]
Make Debugger.Object.prototype.evalInGlobalWithBindings pass the right 'this' value.

Looked good.
Attachment #665714 - Flags: review?(jorendorff)
Comment on attachment 665714 [details] [diff] [review]
Make Debugger.Object.prototype.evalInGlobalWithBindings pass the right 'this' value.

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

Nice. Thanks.
Attachment #665714 - Flags: review?(jorendorff) → review+
https://hg.mozilla.org/mozilla-central/rev/e061305143b6
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla19
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: