Skip to content

Commit

Permalink
Bug 1880160 - [bidi] Ignore file channels in BiDi network listener r=…
Browse files Browse the repository at this point in the history
…webdriver-reviewers,Sasha

File channels do not support the same APIs as other channels and make the NetworkEventRecord throw.
Support should be added in Bug 1826210.

Differential Revision: https://phabricator.services.mozilla.com/D202558
  • Loading branch information
juliandescottes committed Feb 23, 2024
1 parent 6786a45 commit 876d309
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions remote/shared/listeners/NetworkListener.sys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,12 @@ export class NetworkListener {
}

#ignoreChannelFunction = channel => {
// Bug 1826210: Ignore file channels which don't support the same APIs as
// regular HTTP channels.
if (channel instanceof Ci.nsIFileChannel) {
return true;
}

// Ignore chrome-privileged or DevTools-initiated requests
if (
channel.loadInfo?.loadingDocument === null &&
Expand Down

0 comments on commit 876d309

Please sign in to comment.