Closed
Bug 755769
Opened 13 years ago
Closed 6 years ago
Errors in mozApps onsuccess/onerror functions do not show up in Error Console
Categories
(Core Graveyard :: DOM: Apps, defect)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: ianbicking, Unassigned)
Details
When running code like this, one would expect the error to show up in the Error or Web Console, but it does not:
navigator.mozApps.getSelf().onsuccess = function () {
console.log('In onsuccess');
throw 'Broken';
};
This is demonstrated in http://app1.ianbicking.org/example-error.html if you click on the text "tryError4", or run tryError4() from the Web Console.
In another Bug 755553 I was told:
> I know we do not show in some cases exceptions that happen in synthesized DOM events. They don't even show in the error console.
>
> Does this error show in the Error Console for you? If it does, then it's most-likely an issue with the nsIScriptError that is sent - it might lack the inner/outer window IDs.
>
> For errors to display in the Web Console they need to have the originating inner and outer window IDs.
![]() |
||
Comment 1•13 years ago
|
||
Is this just a case of XPConnect eating the exception because there is script on the stack when the event handler throws? We've certainly had bug reports about that before.
How exactly is the onsuccess handler being invoked on the browser side?
Reporter | ||
Comment 2•13 years ago
|
||
In dom/base/Webapps.js it invokes Services.DOMRequest.fireSuccess(req, aResult). The req object is what getSelf() returns, and is created with Services.DOMRequest.createRequest(window)
![]() |
||
Comment 3•13 years ago
|
||
Hmm. That calls DispatchEvent from C++. Olli, does it need to do some sort of extra context-pushing or JS stack-setting-aside before it does that?
Note that bug 503244 is the bug I was thinking of in comment 1.
Comment 4•13 years ago
|
||
Dispatching events does cx pushing.
Not sure about JS stack handling. I'll test this - and if I don't, please remind me :)
(I'm worried about the performance of JS-stack-setting-aside)
Comment 5•13 years ago
|
||
Though, perhaps if the stack handling is pushed up to nsEventDispatcher, it isn't too bad.
https://bugzilla.mozilla.org/show_bug.cgi?id=503244#c45 could still be valid.
Updated•7 years ago
|
Product: Core → Core Graveyard
Comment 6•6 years ago
|
||
Core Graveyard / DOM: Apps is inactive. Closing all bugs in this component.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•