Skip to content

Commit 0ed052f

Browse files
authored
browser(firefox): expose internal request cause along with external one (#2383)
1 parent 3f97a9f commit 0ed052f

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

browser_patches/firefox/BUILD_NUMBER

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1097
1+
1098

browser_patches/firefox/patches/bootstrap.diff

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1466,10 +1466,10 @@ index 0000000000000000000000000000000000000000..2b1fe7fa712ae210af3ebbccda084041
14661466
+
14671467
diff --git a/juggler/NetworkObserver.js b/juggler/NetworkObserver.js
14681468
new file mode 100644
1469-
index 0000000000000000000000000000000000000000..f803071bea317e4d3ce7341573622f6bddaaf547
1469+
index 0000000000000000000000000000000000000000..5a9c3232769729fc127c43b24e88713042e577c3
14701470
--- /dev/null
14711471
+++ b/juggler/NetworkObserver.js
1472-
@@ -0,0 +1,794 @@
1472+
@@ -0,0 +1,796 @@
14731473
+"use strict";
14741474
+
14751475
+const {EventEmitter} = ChromeUtils.import('resource://gre/modules/EventEmitter.jsm');
@@ -1843,6 +1843,7 @@ index 0000000000000000000000000000000000000000..f803071bea317e4d3ce7341573622f6b
18431843
+ if (!pageNetwork)
18441844
+ return;
18451845
+ const causeType = httpChannel.loadInfo ? httpChannel.loadInfo.externalContentPolicyType : Ci.nsIContentPolicy.TYPE_OTHER;
1846+
+ const internalCauseType = httpChannel.loadInfo ? httpChannel.loadInfo.internalContentPolicyType : Ci.nsIContentPolicy.TYPE_OTHER;
18461847
+ const requestId = this._requestId(httpChannel);
18471848
+ const redirectedFrom = this._redirectMap.get(requestId);
18481849
+ this._redirectMap.delete(requestId);
@@ -1856,6 +1857,7 @@ index 0000000000000000000000000000000000000000..f803071bea317e4d3ce7341573622f6b
18561857
+ method: httpChannel.requestMethod,
18571858
+ navigationId: httpChannel.isMainDocumentChannel ? this._requestIdBeforeAuthentication(httpChannel) || this._requestId(httpChannel) : undefined,
18581859
+ cause: causeTypeToString(causeType),
1860+
+ internalCause: causeTypeToString(internalCauseType),
18591861
+ });
18601862
+ }
18611863
+
@@ -6822,10 +6824,10 @@ index 0000000000000000000000000000000000000000..78b6601b91d0b7fcda61114e6846aa07
68226824
+this.EXPORTED_SYMBOLS = ['t', 'checkScheme'];
68236825
diff --git a/juggler/protocol/Protocol.js b/juggler/protocol/Protocol.js
68246826
new file mode 100644
6825-
index 0000000000000000000000000000000000000000..e6bb9a8d5b553531a2ee22e27e693dd0569bda22
6827+
index 0000000000000000000000000000000000000000..71649c3462f82d8b327b5913570612a3d99495b8
68266828
--- /dev/null
68276829
+++ b/juggler/protocol/Protocol.js
6828-
@@ -0,0 +1,845 @@
6830+
@@ -0,0 +1,846 @@
68296831
+const {t, checkScheme} = ChromeUtils.import('chrome://juggler/content/protocol/PrimitiveTypes.js');
68306832
+
68316833
+// Protocol-specific types.
@@ -7231,6 +7233,7 @@ index 0000000000000000000000000000000000000000..e6bb9a8d5b553531a2ee22e27e693dd0
72317233
+ method: t.String,
72327234
+ navigationId: t.Optional(t.String),
72337235
+ cause: t.String,
7236+
+ internalCause: t.String,
72347237
+ },
72357238
+ 'responseReceived': {
72367239
+ securityDetails: t.Nullable(networkTypes.SecurityDetails),

0 commit comments

Comments
 (0)