Closed Bug 1269181 Opened 9 years ago Closed 9 years ago

chrome.webRequest.onHeadersReceived doesn't support -1 for tabId value

Categories

(WebExtensions :: Untriaged, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: ntim, Unassigned)

References

Details

(Whiteboard: triaged)

According to the docs: https://developer.chrome.com/extensions/webRequest#event-onHeadersReceived "The ID of the tab in which the request takes place. Set to -1 if the request isn't related to a tab." But Firefox throws: Error: Type error for parameter filter (Error processing tabId: Integer -1 is too small (must be at least 0)) for webRequest.onHeadersReceived.
Priority: -- → P3
Whiteboard: triaged
Priority: P3 → P2
This happens in all `webRequest.on*.addListener` methods. In Chrome, a listener added with {tabId: -1} is called for all requests, just as if `tabId` had been omitted. Can that be right? The documentation is mute [1]. [1] https://developer.chrome.com/extensions/webRequest#type-RequestFilter
I can't seem to reproduce this. Is this still an issue Tim? If so, can you please provide the code that exhibits the problem?
Flags: needinfo?(ntim.bugs)
(In reply to Tomislav Jovanovic :zombie from comment #3) > I can't seem to reproduce this. Is this still an issue Tim? If so, can you > please provide the code that exhibits the problem? I don't have any code to test with right now, but BMfG doesn't seem to have this error anymore.
Flags: needinfo?(ntim.bugs)
Closing then. Feel free to reopen if there is still an issue.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WORKSFORME
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.