Closed Bug 866950 Opened 11 years ago Closed 11 years ago

Errors from files loaded through loader.js not showing source in browser console

Categories

(DevTools :: Console, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 24

People

(Reporter: rcampbell, Assigned: msucan)

References

Details

Attachments

(1 file)

Fallout from bug 855914.

Error messages in files loaded through jetpack's loader are not showing source when clicking on the location.

e.g., [18:35:26.937] ReferenceError: console is not defined @ 
                resource://gre/modules/commonjs/toolkit/loader.js -> 
                resource:///modules/devtools/framework/toolbox.js:795
How is this error logged? console.error() call or is it an nsIScriptError? What is the message source?
Looks like an nsIScriptError to me. Here is how we treat these URLs in the debugger frontend:

http://mxr.mozilla.org/mozilla-central/source/browser/devtools/debugger/debugger-panes.js#104
Investigated the problem. The |sourceName| holds " -> ". It seems we need to split on that, and always use the last item. Thanks Panos for the pointer to that code.
Assignee: nobody → mihai.sucan
Status: NEW → ASSIGNED
OS: Mac OS X → All
Hardware: x86 → All
Version: unspecified → Trunk
This is probably not a regression. The Web/Browser Console never handled script errors with multiple sourceNames joined together with " -> ".
Keywords: regression
See Also: → 764333
Attached patch proposed patchSplinter Review
Straight-forward fix.

Try push: https://tbpl.mozilla.org/?tree=Try&rev=6c2b9c444d9b
Attachment #756131 - Flags: review?(rcampbell)
Blocks: 877778
Comment on attachment 756131 [details] [diff] [review]
proposed patch

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

yes!
Attachment #756131 - Flags: review?(rcampbell) → review+
Thanks!
Whiteboard: [land-in-fx-team]
https://hg.mozilla.org/mozilla-central/rev/c0054eccfbac
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 24
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.