Closed
Bug 1303118
Opened 9 years ago
Closed 9 years ago
Webconsole isn't evaluating at selected frame when paused
Categories
(DevTools :: Console, defect, P1)
Tracking
(firefox50 unaffected, firefox51+ fixed, firefox52 fixed)
RESOLVED
FIXED
Firefox 52
Tracking | Status | |
---|---|---|
firefox50 | --- | unaffected |
firefox51 | + | fixed |
firefox52 | --- | fixed |
People
(Reporter: bgrins, Assigned: shu)
References
Details
(Keywords: regression)
Attachments
(1 file)
2.31 KB,
patch
|
efaust
:
review+
gchang
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
STR:
Open data:text/html,<script>var foo = { bar: function() { console.log(this); debugger; }}; foo.bar()</script>
Open debugger and reload page to pause
Evaluate 'this' in console
Expected:
The 'foo' object is returned
Actual:
The window object is returned
This appears to be working in Dev Edition 50 and flipping the old debugger back on doesn't seem to resolve it
Reporter | ||
Comment 1•9 years ago
|
||
Based on regression tracking by :jlast this seems to have started in bug 1263355:
11:57 17:02.81 INFO: Last good revision: 181336fdda6625d8ffa5e5764b817cc3da1f9659
11:57 17:02.81 INFO: First bad revision: bd702fa23037799ab4dd266d8a2b59d021f6cfa8
11:57 17:02.81 INFO: Pushlog:
11:57 https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=181336fdda6625d8ffa5e5764b817cc3da1f9659&tochange=bd702fa23037799ab4dd266d8a2b59d021f6cfa8
11:57 17:04.04 INFO: Looks like the following bug has the changes which introduced the regression:
11:57 https://bugzilla.mozilla.org/show_bug.cgi?id=1263355
Shu, can you please check into this and see why debugger evaluation at a frame isn't working in this case? The relevant call to frame.evalWithBindings is here: https://dxr.mozilla.org/mozilla-central/source/devtools/server/actors/webconsole.js#1321-1323.
Blocks: 1263355
Flags: needinfo?(shu)
Reporter | ||
Updated•9 years ago
|
Reporter | ||
Comment 2•9 years ago
|
||
Requesting tracking since this causes inaccurate console evaluations when the debugger is paused
Comment 3•9 years ago
|
||
Tracking 51+ for this regression - Brian's reasoning in Comment 2 makes sense.
Assignee | ||
Comment 4•9 years ago
|
||
Attachment #8791808 -
Flags: review?(efaustbmo)
Assignee | ||
Updated•9 years ago
|
Flags: needinfo?(shu)
Comment 5•9 years ago
|
||
Comment on attachment 8791808 [details] [diff] [review]
Fix 'this' computation for Debugger.Frame.evalWithBindings.
Review of attachment 8791808 [details] [diff] [review]:
-----------------------------------------------------------------
::: js/src/frontend/Parser.cpp
@@ +288,5 @@
> // Debugger.Frame is a function frame. Recompute the this binding if we
> // are such an eval.
> + if (enclosingEnv && enclosingScope->kind() == ScopeKind::NonSyntactic) {
> + // For Debugger.Frame.eval with bindings, the environment chain may
> + // have more than the DebugEnvironmentProxy. Find that proxy.
I don't understand the last sentence here. This loops isn't really looking for the proxy, just handling it as if it were a environment object, right?
Attachment #8791808 -
Flags: review?(efaustbmo) → review+
Pushed by shu@rfrn.org:
https://hg.mozilla.org/integration/mozilla-inbound/rev/c9f2cb674778
Fix 'this' computation for Debugger.Frame.evalWithBindings. (r=efaust)
Comment 7•9 years ago
|
||
Pushed by shu@rfrn.org:
https://hg.mozilla.org/integration/mozilla-inbound/rev/1a89a84c1b7d
Fix 'this' computation for Debugger.Frame.evalWithBindings. (r=efaust)
![]() |
||
Comment 9•9 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox52:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 52
![]() |
||
Comment 10•9 years ago
|
||
bugherder |
![]() |
||
Comment 11•9 years ago
|
||
Hi :shu,
Since this bug is a regression and also affects 51, do you consider to uplift this for 51 if this patch is not too risky?
Flags: needinfo?(shu)
Assignee | ||
Comment 12•9 years ago
|
||
Comment on attachment 8791808 [details] [diff] [review]
Fix 'this' computation for Debugger.Frame.evalWithBindings.
Approval Request Comment
[Feature/regressing bug #]: 1263355
[User impact if declined]: Incorrect behavior in webconsole sometimes when evaluating 'this'
[Describe test coverage new/current, TreeHerder]: On m-c, TH
[Risks and why]: Low
[String/UUID change made/needed]: None
Flags: needinfo?(shu)
Attachment #8791808 -
Flags: approval-mozilla-aurora?
![]() |
||
Comment 13•9 years ago
|
||
Comment on attachment 8791808 [details] [diff] [review]
Fix 'this' computation for Debugger.Frame.evalWithBindings.
Fix a regression related to webconsole. Take it in 51 aurora.
Attachment #8791808 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Comment 14•9 years ago
|
||
I have reproduced this bug with Nightly 51.0a1 (2016-09-15) (64-bit) on Windows 7 , 64 Bit !
This bug's fix is verified with latest Nightly
Build ID : 20160928030201
User Agent : Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:52.0) Gecko/20100101 Firefox/52.0
[bugday-20160928]
Comment 15•9 years ago
|
||
bugherder uplift |
Updated•9 years ago
|
Assignee: nobody → shu
Version: unspecified → 51 Branch
Updated•7 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•