Closed Bug 1272199 Opened 8 years ago Closed 8 years ago

'cancel' fails in webRequest.onBeforeSendHeaders

Categories

(WebExtensions :: Untriaged, defect)

46 Branch
x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1163862

People

(Reporter: umbecono, Unassigned)

References

Details

Attachments

(1 file)

Attached file bug_cancel_request.xpi (deleted) —
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:46.0) Gecko/20100101 Firefox/46.0
Build ID: 20160425115337

Steps to reproduce:

Return {cancel: true} from an `onBeforeSendHeaders` listener in Firefox 46 on Ubuntu 14.04.


Actual results:

Throws 

NS_ERROR_XPC_NOT_ENOUGH_ARGS: Not enough arguments [nsIHttpChannel.cancel] WebRequest.jsm:366:0

and the load continues.


Expected results:

The load should have been terminated without error.

The attached WebExtension demonstrates the problem. It blocks odd-numbered Bugzilla bug reports in `onBeforeRequest`, and all even-numbered reports in `onBeforeSendHeaders`. Each listener reports whether it blocked or passed each report URL. In Chrome, all reports are blocked. In Firefox, only odd reports are blocked.
OS: Unspecified → Linux
Hardware: Unspecified → x86
Summary: 'cancel' fails in chrome.webRequest.onBeforeSendHeaders → 'cancel' fails in webRequest.onBeforeSendHeaders
I think this was fixed by bug 1163862. Please reopen if you can reproduce on Firefox 47 or newer.
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: