Closed
Bug 1268806
Opened 9 years ago
Closed 9 years ago
The SyntaxTreeVisitor in Parser.jsm fails to process computed names for object properties
Categories
(DevTools :: Debugger, defect)
DevTools
Debugger
Tracking
(firefox49 fixed)
RESOLVED
FIXED
Firefox 49
| Tracking | Status | |
|---|---|---|
| firefox49 | --- | fixed |
People
(Reporter: jsnajdr, Assigned: jsnajdr)
Details
Attachments
(1 file)
|
47.64 KB,
patch
|
fitzgen
:
review+
|
Details | Diff | Splinter Review |
Steps to reproduce:
1. Try to debug a script like this:
let o = {
[1 + 2]: 3
};
2. Do something that involves running the SyntaxTreeVisitor. Either mouseover a variable name to trigger variable bubble view, or search in function names (@something).
Actual result:
SyntaxTreeVisitor throws an error because it doesn't have a handler for ComputedName type:
TypeError: this[key.type] is not a function
| Assignee | ||
Comment 1•9 years ago
|
||
- added a handler for ComputedName AST type (that's the main part of the patch)
- converted methods to ES6 form, to fix ESLint errors about missing spaces between "function" and "()"
- added a mochitest
| Assignee | ||
Updated•9 years ago
|
Assignee: nobody → jsnajdr
| Assignee | ||
Comment 2•9 years ago
|
||
| Assignee | ||
Updated•9 years ago
|
Attachment #8746972 -
Flags: review?(nfitzgerald)
Comment 3•9 years ago
|
||
Comment on attachment 8746972 [details] [diff] [review]
The SyntaxTreeVisitor in Parser.jsm fails to process computed names for object properties
Review of attachment 8746972 [details] [diff] [review]:
-----------------------------------------------------------------
In the future *please* split out separate changes (like `foo: function () { ... }` => `foo() { ... }`) into separate patches. It makes reviewing patches a lot easier, since it makes it clear whether a given hunk is related to the stated change in functionality or not. In this case, there are more unrelated changes than related changes. This might not seem like a big deal, but for a reviewer who only touched this file maybe one time a couple years ago, it makes a big difference. Thanks!
Attachment #8746972 -
Flags: review?(nfitzgerald) → review+
| Assignee | ||
Comment 4•9 years ago
|
||
(In reply to Nick Fitzgerald [:fitzgen] [⏰PDT; UTC-7] from comment #3)
> In the future *please* split out separate changes into separate patches.
Thanks for the review Nick and sorry for making your job harder. I usually split patches into multiple ones, but this time I thought it's simple enough to be merged into one. I'll always split them in the future.
Keywords: checkin-needed
Keywords: checkin-needed
Comment 6•9 years ago
|
||
| bugherder | ||
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 49
Updated•7 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•