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

RESOLVED FIXED in Firefox 24

Status

DevTools
Console
RESOLVED FIXED
5 years ago
a month ago

People

(Reporter: rc, Assigned: msucan)

Tracking

Trunk
Firefox 24
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
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
(Assignee)

Comment 1

5 years ago
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
(Assignee)

Comment 3

5 years ago
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)

Updated

5 years ago
Assignee: nobody → mihai.sucan
Status: NEW → ASSIGNED
OS: Mac OS X → All
Hardware: x86 → All
Version: unspecified → Trunk
(Assignee)

Comment 4

5 years ago
This is probably not a regression. The Web/Browser Console never handled script errors with multiple sourceNames joined together with " -> ".
Keywords: regression
(Assignee)

Updated

5 years ago
See Also: → bug 764333
(Assignee)

Comment 5

5 years ago
Created attachment 756131 [details] [diff] [review]
proposed patch

Straight-forward fix.

Try push: https://tbpl.mozilla.org/?tree=Try&rev=6c2b9c444d9b
Attachment #756131 - Flags: review?(rcampbell)
(Assignee)

Updated

5 years ago
Blocks: 877778
(Reporter)

Comment 6

5 years ago
Comment on attachment 756131 [details] [diff] [review]
proposed patch

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

yes!
Attachment #756131 - Flags: review?(rcampbell) → review+
(Assignee)

Comment 7

5 years ago
Thanks!
Whiteboard: [land-in-fx-team]
https://hg.mozilla.org/mozilla-central/rev/c0054eccfbac
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 24
(Assignee)

Updated

5 years ago
Duplicate of this bug: 872097

Updated

a month ago
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.