Closed
Bug 975167
Opened 11 years ago
Closed 11 years ago
Traceback in autocompletion while debugging
Categories
(DevTools :: Console, defect)
Tracking
(firefox29 fixed, firefox30 fixed)
RESOLVED
FIXED
Firefox 30
People
(Reporter: canuckistani, Assigned: msucan)
References
Details
Attachments
(1 file)
|
3.01 KB,
patch
|
past
:
review+
Sylvestre
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
STR:
1. go to any bugzilla bug, for example this one
2. open the debugger, go to comments.js and put a breakpoint on line 53 ( in toggle_all_comments() )
3. open the split console and type in this:
var x = [[1, 2, 3, 4], [1, 2, 3, 4], [1, 2, 3, 4]]
4. try to get completion on one of the nested arrays, eg
x[0].
I get these tracebacks:
error occurred while processing 'autocomplete: TypeError: aName is not an identifier
Stack: DebuggerEnvironmentSupport.getProperty@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/toolkit/webconsole/utils.js:1046
getExactMatch_impl@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/toolkit/webconsole/utils.js:978
getVariableInEnvironment@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/toolkit/webconsole/utils.js:884
JSPropertyProvider@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/toolkit/webconsole/utils.js:827
WCA_onAutocomplete@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/main.js -> resource://gre/modules/devtools/server/actors/webconsole.js:732
DSC_onPacket@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/main.js:1023
LDT_send/<@resource://gre/modules/devtools/dbg-client.jsm -> resource://gre/modules/devtools/server/transport.js:258
makeInfallible/<@resource://gre/modules/devtools/DevToolsUtils.jsm -> resource://gre/modules/devtools/DevToolsUtils.js:80
Line: 1046, column: 0
onPacket threw an exception: Error: Server did not specify an actor, dropping packet: {"error":"unknownError","message":"error occurred while processing 'autocomplete: TypeError: aName is not an identifier\nStack: DebuggerEnvironmentSupport.getProperty@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/toolkit/webconsole/utils.js:1046\ngetExactMatch_impl@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/toolkit/webconsole/utils.js:978\ngetVariableInEnvironment@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/toolkit/webconsole/utils.js:884\nJSPropertyProvider@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/toolkit/webconsole/utils.js:827\nWCA_onAutocomplete@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/main.js -> resource://gre/modules/devtools/server/actors/webconsole.js:732\nDSC_onPacket@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/main.js:1024\nLDT_send/<@resource://gre/modules/devtools/dbg-client.jsm -> resource://gre/modules/devtools/server/transport.js:258\nmakeInfallible/<@resource://gre/modules/devtools/DevToolsUtils.jsm -> resource://gre/modules/devtools/DevToolsUtils.js:80\nLine: 1046, column: 0"}
Stack: DebuggerClient.prototype.onPacket/<@resource://gre/modules/devtools/dbg-client.jsm:655
resolve@resource://gre/modules/commonjs/sdk/core/promise.js:118
then@resource://gre/modules/commonjs/sdk/core/promise.js:43
then@resource://gre/modules/commonjs/sdk/core/promise.js:153
DebuggerClient.prototype.onPacket@resource://gre/modules/devtools/dbg-client.jsm:705
LDT_send/<@resource://gre/modules/devtools/dbg-client.jsm -> resource://gre/modules/devtools/server/transport.js:258
makeInfallible/<@resource://gre/modules/devtools/DevToolsUtils.jsm -> resource://gre/modules/devtools/DevToolsUtils.js:80
Line: 655, column: 0
| Assignee | ||
Comment 1•11 years ago
|
||
The problem is we try getVariable() with aName set to 'foo[whatever]'. We do not parse the string, we just split on '.', thus aName is an invalid identifier. We should, in the future, support at least array indexes.
Try push: https://tbpl.mozilla.org/?tree=Try&rev=ef7246501a15
Comment 2•11 years ago
|
||
Comment on attachment 8379922 [details] [diff] [review]
bug975167-1.diff
Review of attachment 8379922 [details] [diff] [review]:
-----------------------------------------------------------------
OK, let's just make sure a followup is filed for autocompleting array indexes.
Attachment #8379922 -
Flags: review?(past) → review+
| Assignee | ||
Comment 3•11 years ago
|
||
(In reply to Panos Astithas [:past] from comment #2)
> Comment on attachment 8379922 [details] [diff] [review]
> bug975167-1.diff
>
> Review of attachment 8379922 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> OK, let's just make sure a followup is filed for autocompleting array
> indexes.
Thanks! We already have bug 943586 for that issue.
| Assignee | ||
Comment 5•11 years ago
|
||
Whiteboard: [fixed-in-fx-team]
| Assignee | ||
Updated•11 years ago
|
OS: Mac OS X → All
Hardware: x86 → All
| Assignee | ||
Comment 6•11 years ago
|
||
Comment on attachment 8379922 [details] [diff] [review]
bug975167-1.diff
[Approval Request Comment]
Bug caused by (feature/regressing bug #): bug 842682.
User impact if declined: the console stops working if you try to use array indexes or if you try to access properties using the obj['propName'] notation, while debugging a script.
Testing completed (on m-c, etc.): landed in fx-team, a test is included, and a green try push.
Risk to taking this patch (and alternatives if risky): minimal, it's just a try-catch around a debugger API call.
String or IDL/UUID changes made by this patch: none.
Attachment #8379922 -
Flags: approval-mozilla-aurora?
Comment 7•11 years ago
|
||
I will approve it once it reached m-c. thanks.
Comment 8•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 30
Updated•11 years ago
|
Attachment #8379922 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Comment 9•11 years ago
|
||
status-firefox29:
--- → fixed
status-firefox30:
--- → fixed
Updated•11 years ago
|
QA Whiteboard: [qa-]
Updated•7 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•