Closed Bug 853188 Opened 11 years ago Closed 11 years ago

We don't report line numbers for async errors caught in window.onerror

Categories

(Remote Protocol :: Marionette, defect)

defect
Not set
normal

Tracking

(firefox23 fixed, b2g18 fixed, b2g18-v1.0.0 wontfix, b2g18-v1.0.1 fixed)

RESOLVED FIXED
mozilla23
Tracking Status
firefox23 --- fixed
b2g18 --- fixed
b2g18-v1.0.0 --- wontfix
b2g18-v1.0.1 --- fixed

People

(Reporter: jgriffin, Assigned: jgriffin)

References

Details

Attachments

(1 file)

We catch errors reported to window.onerror during async execute calls, but don't report the line number:

510   originalOnError = curWindow.onerror;
511   curWindow.onerror = function errHandler(errMsg, url, line) {
512     sandbox.asyncComplete(errMsg, 17, null, asyncTestCommandId);
513     curWindow.onerror = originalOnError;
514   };

We should be reporting as much of the stack trace as we can get.
Blocks: b2g-testing
This seems like the right thing to do, although as I mentioned, I couldn't actually write a test for this.
Attachment #731971 - Flags: review?(mdas)
Comment on attachment 731971 [details] [diff] [review]
Use the url and line number passed to window.onerror,

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

Hmm, I couldn't figure one out either, but if there is a way to catch it, then this is what we should return.
Attachment #731971 - Flags: review?(mdas) → review+
https://hg.mozilla.org/mozilla-central/rev/1d77d2aaabf9
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
(In reply to Malini Das [:mdas] from comment #5)
> https://hg.mozilla.org/releases/mozilla-b2g18/rev/8565e79f6e54

thanks, you beat me to it!
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: