'cancel' fails in webRequest.onBeforeSendHeaders

RESOLVED DUPLICATE of bug 1163862

Status

defect
RESOLVED DUPLICATE of bug 1163862
3 years ago
Last year

People

(Reporter: umbecono, Unassigned)

Tracking

46 Branch
x86
Linux

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

826 bytes, application/x-xpinstall
Details
Reporter

Description

3 years ago
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.
Reporter

Updated

3 years ago
OS: Unspecified → Linux
Hardware: Unspecified → x86
Reporter

Updated

3 years ago
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: 3 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1163862
Duplicate of this bug: 1272206

Updated

Last year
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.