Skip to content

Commit

Permalink
Bug 1819875 - [bidi] Remove isRedirect from the network events base p…
Browse files Browse the repository at this point in the history
…arameters r=webdriver-reviewers,Sasha

Differential Revision: https://phabricator.services.mozilla.com/D171840
  • Loading branch information
juliandescottes committed Mar 7, 2023
1 parent f76818f commit ee0ed5a
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions remote/webdriver-bidi/modules/root/network.sys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ ChromeUtils.defineESModuleGetters(lazy, {
/**
* @typedef {Object} BaseParameters
* @property {string=} context
* @property {boolean} isRedirect
* @property {Navigation=} navigation
* @property {number} redirectCount
* @property {RequestData} request
* @property {number} timestamp
*/
Expand Down Expand Up @@ -189,19 +189,16 @@ class NetworkModule extends Module {
#onBeforeRequestSent = (name, data) => {
const { contextId, requestData, timestamp, redirectCount } = data;

const isRedirect = redirectCount > 0;

// Bug 1805479: Handle the initiator, including stacktrace details.
const initiator = {
type: InitiatorType.Other,
};

const baseParameters = {
context: contextId,
isRedirect,
redirectCount,
// Bug 1805405: Handle the navigation id.
navigation: null,
redirectCount,
request: requestData,
timestamp,
};
Expand All @@ -228,14 +225,11 @@ class NetworkModule extends Module {
redirectCount,
} = data;

const isRedirect = redirectCount > 0;

const baseParameters = {
context: contextId,
isRedirect,
redirectCount,
// Bug 1805405: Handle the navigation id.
navigation: null,
redirectCount,
request: requestData,
timestamp,
};
Expand Down

0 comments on commit ee0ed5a

Please sign in to comment.