Closed Bug 684016 Opened 13 years ago Closed 11 years ago

gBrowser.addProgressListener call with a 2nd argument throws uninformative error

Categories

(Firefox :: General, defect)

9 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 26

People

(Reporter: a2414578, Assigned: dao)

References

Details

(Keywords: regression)

Attachments

(1 file)

When gBrowser.addProgressListener gets called with 2nd argument, we get an uninformative error in the error console:

Error: gBrowser.addProgressListener was called with a second argument, which is not supported. See bug 608628.
Source File: chrome://browser/content/tabbrowser.xml
Line: 1871

How am I supposed to know who was the caller?

var caller = Components.stack.caller;
throw new Error(
	"...",
	caller.filename,
	caller.lineNumber
);

or Components.utils.reportError(new Error( ... ));
Blocks: 608628
NS_ASSERT actually displays the stack in non-release builds:
http://mxr.mozilla.org/mozilla-central/source/toolkit/content/debug.js#95
But couldn't you make that error itself in the error console be more informative and make it tell who was the caller?
How I'm tired of these errors!
Error: gBrowser.addProgressListener was called with a second argument, which is not supported. See bug 608628.
Source File: chrome://browser/content/tabbrowser.xml
Line: 1877

And how the f- do I get know who called that gBrowser.addProgressListener with a f-ing second argument? How am I supposed to investigate that f-ing error?
Why this bug is still UNCO?
bump
There's still no meaningful error message for this. Took me half an hour to find out which extension caused this error. Playing the "half enabled, half disabled"-game with 50+ extension is really funny...
Blocks: 644645
No longer blocks: 608628
Keywords: regression
Blocks: 905477
Severity: major → normal
Attached patch patchSplinter Review
Assignee: nobody → dao
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Attachment #791314 - Flags: review?(gavin.sharp)
Attachment #791314 - Flags: review?(gavin.sharp) → review+
https://hg.mozilla.org/mozilla-central/rev/541db4a9ecbe
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 26
You need to log in before you can comment on or make changes to this bug.