Closed Bug 1624062 Opened 5 years ago Closed 5 years ago

Cannot register webRequest event from extension page in debug mode

Categories

(WebExtensions :: Request Handling, defect)

defect
Not set
normal

Tracking

(firefox75 fixed, firefox76 fixed)

RESOLVED FIXED
mozilla76
Tracking Status
firefox75 --- fixed
firefox76 --- fixed

People

(Reporter: robwu, Assigned: robwu)

References

Details

Attachments

(1 file)

I ran an extension in debug mode that relied on a webRequest listener in an extension page, and was surprised to see that the webRequest listener was not triggered in debug mode.

When I opened the global JavaScript console, I found the following errors:

can't access property "module", this.persistent is null ExtensionCommon.jsm:2195
can't access property "setUserInput", handler is undefined ExtensionParent.jsm:1186
can't access property "removeListener", handler is undefined ExtensionParent.jsm:1204
can't access property "removeListener", handler is undefined ExtensionParent.jsm:1204

The first error shows the source of my observed bugs. The this.persistent object is cleared before it is dereferenced: https://searchfox.org/mozilla-central/rev/f1f75f0a2d995241fbc454edfab4be1064c544e1/toolkit/components/extensions/ExtensionCommon.jsm#2187,2195

And remove an unused "ext"/"extension parameter from an existing test.

See Also: → 1621935
Flags: qe-verify-
Pushed by rob@robwu.nl: https://hg.mozilla.org/integration/autoland/rev/b61cb05fbfc9 Support webRequest listeners from extension pages in debug mode r=mixedpuppy
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla76

Comment on attachment 9134878 [details]
Bug 1624062 - Support webRequest listeners from extension pages in debug mode

let's get this on beta as well per https://bugzilla.mozilla.org/show_bug.cgi?id=1621935#c10

Attachment #9134878 - Flags: approval-mozilla-beta+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: