Closed Bug 1428094 Opened 6 years ago Closed 6 years ago

Exception raised from a webRequest blocking listener should report the original error message and filename

Categories

(WebExtensions :: Request Handling, defect, P3)

defect

Tracking

(firefox59 verified)

VERIFIED FIXED
mozilla59
Tracking Status
firefox59 --- verified

People

(Reporter: rpl, Assigned: rpl)

Details

(Whiteboard: [webRequest])

Attachments

(2 files)

When a blocking listener raises an exception, the raised exception is currently reported as "[Object]", instead of being reported with the exception error message and stack trace.

e.g. the multi-account-containers exception is currently experiencing this issue (https://github.com/mozilla/multi-account-containers) and the following error message is logged in the browser console:

```
[object Object] WebRequest.jsm:806
	applyChanges resource://gre/modules/WebRequest.jsm:806:13
	throw self-hosted:1203:9
```
Component: WebExtensions: Untriaged → WebExtensions: Request Handling
Priority: -- → P3
Whiteboard: [webRequest]
Assignee: nobody → lgreco
Status: NEW → ASSIGNED
Attachment #8939893 - Flags: review?(mixedpuppy)
Comment on attachment 8939893 [details]
Bug 1428094 - Exception raised from a webRequest blocking listener should report the original error message and filename.

https://reviewboard.mozilla.org/r/210202/#review216896

::: toolkit/components/extensions/test/mochitest/test_ext_webrequest_suspend.html:262
(Diff revision 2)
> +
> +      browser.test.sendMessage("background-ready");
> +    },
> +  });
> +
> +  // TODO(rpl): this could use the chrome console helpers

use "TODO BUG #: comment" for followups
Attachment #8939893 - Flags: review?(mixedpuppy) → review+
Comment on attachment 8939893 [details]
Bug 1428094 - Exception raised from a webRequest blocking listener should report the original error message and filename.

https://reviewboard.mozilla.org/r/210202/#review216896

> use "TODO BUG #: comment" for followups

Bug 1417639 has been landed and merged to mozilla-central, and so I've just rebased this PR and rewritten this part to use the consoleMonitor helper from Bug 1417639 (and so I removed the TODO completely, which is even better :-)).
Pushed by luca.greco@alcacoop.it:
https://hg.mozilla.org/integration/autoland/rev/ef1b83a2f4f4
Exception raised from a webRequest blocking listener should report the original error message and filename. r=mixedpuppy
https://hg.mozilla.org/mozilla-central/rev/ef1b83a2f4f4
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
Attached image Bug1428094.png
I can reproduce this issue on Firefox 57.0.4 (20180103231032) under Win 7 64-bit and Mac OS X 10.13

This issue is verified as fixed on Firefox 59.0a1 (20180115100056) under Win 7 64-bit and Mac OS X 10.13

Please see the attached screenshot.
Status: RESOLVED → VERIFIED
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: