mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
parent
0160c18f7a
commit
18e690e234
@ -1,2 +1,2 @@
|
|||||||
1296
|
1297
|
||||||
Changed: lushnikov@chromium.org Thu 14 Oct 2021 12:01:09 PM PDT
|
Changed: lushnikov@chromium.org Fri Oct 15 18:52:51 PDT 2021
|
||||||
|
|||||||
@ -540,6 +540,11 @@ class NetworkRequest {
|
|||||||
|
|
||||||
// nsIStreamListener
|
// nsIStreamListener
|
||||||
onDataAvailable(aRequest, aInputStream, aOffset, aCount) {
|
onDataAvailable(aRequest, aInputStream, aOffset, aCount) {
|
||||||
|
// Turns out webcompat shims might redirect to
|
||||||
|
// SimpleChannel, so we get requests from a different channel.
|
||||||
|
// See https://github.com/microsoft/playwright/issues/9418#issuecomment-944836244
|
||||||
|
if (aRequest !== this.httpChannel)
|
||||||
|
return;
|
||||||
// For requests with internal redirect (e.g. intercepted by Service Worker),
|
// For requests with internal redirect (e.g. intercepted by Service Worker),
|
||||||
// we do not get onResponse normally, but we do get nsIStreamListener notifications.
|
// we do not get onResponse normally, but we do get nsIStreamListener notifications.
|
||||||
this._sendOnResponse(false);
|
this._sendOnResponse(false);
|
||||||
@ -562,6 +567,11 @@ class NetworkRequest {
|
|||||||
|
|
||||||
// nsIStreamListener
|
// nsIStreamListener
|
||||||
onStartRequest(aRequest) {
|
onStartRequest(aRequest) {
|
||||||
|
// Turns out webcompat shims might redirect to
|
||||||
|
// SimpleChannel, so we get requests from a different channel.
|
||||||
|
// See https://github.com/microsoft/playwright/issues/9418#issuecomment-944836244
|
||||||
|
if (aRequest !== this.httpChannel)
|
||||||
|
return;
|
||||||
try {
|
try {
|
||||||
this._originalListener.onStartRequest(aRequest);
|
this._originalListener.onStartRequest(aRequest);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
@ -571,6 +581,11 @@ class NetworkRequest {
|
|||||||
|
|
||||||
// nsIStreamListener
|
// nsIStreamListener
|
||||||
onStopRequest(aRequest, aStatusCode) {
|
onStopRequest(aRequest, aStatusCode) {
|
||||||
|
// Turns out webcompat shims might redirect to
|
||||||
|
// SimpleChannel, so we get requests from a different channel.
|
||||||
|
// See https://github.com/microsoft/playwright/issues/9418#issuecomment-944836244
|
||||||
|
if (aRequest !== this.httpChannel)
|
||||||
|
return;
|
||||||
try {
|
try {
|
||||||
this._originalListener.onStopRequest(aRequest, aStatusCode);
|
this._originalListener.onStopRequest(aRequest, aStatusCode);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|||||||
@ -1,2 +1,2 @@
|
|||||||
1296
|
1297
|
||||||
Changed: lushnikov@chromium.org Wed Oct 13 15:47:14 PDT 2021
|
Changed: lushnikov@chromium.org Fri Oct 15 18:51:16 PDT 2021
|
||||||
|
|||||||
@ -540,6 +540,11 @@ class NetworkRequest {
|
|||||||
|
|
||||||
// nsIStreamListener
|
// nsIStreamListener
|
||||||
onDataAvailable(aRequest, aInputStream, aOffset, aCount) {
|
onDataAvailable(aRequest, aInputStream, aOffset, aCount) {
|
||||||
|
// Turns out webcompat shims might redirect to
|
||||||
|
// SimpleChannel, so we get requests from a different channel.
|
||||||
|
// See https://github.com/microsoft/playwright/issues/9418#issuecomment-944836244
|
||||||
|
if (aRequest !== this.httpChannel)
|
||||||
|
return;
|
||||||
// For requests with internal redirect (e.g. intercepted by Service Worker),
|
// For requests with internal redirect (e.g. intercepted by Service Worker),
|
||||||
// we do not get onResponse normally, but we do get nsIStreamListener notifications.
|
// we do not get onResponse normally, but we do get nsIStreamListener notifications.
|
||||||
this._sendOnResponse(false);
|
this._sendOnResponse(false);
|
||||||
@ -562,6 +567,11 @@ class NetworkRequest {
|
|||||||
|
|
||||||
// nsIStreamListener
|
// nsIStreamListener
|
||||||
onStartRequest(aRequest) {
|
onStartRequest(aRequest) {
|
||||||
|
// Turns out webcompat shims might redirect to
|
||||||
|
// SimpleChannel, so we get requests from a different channel.
|
||||||
|
// See https://github.com/microsoft/playwright/issues/9418#issuecomment-944836244
|
||||||
|
if (aRequest !== this.httpChannel)
|
||||||
|
return;
|
||||||
try {
|
try {
|
||||||
this._originalListener.onStartRequest(aRequest);
|
this._originalListener.onStartRequest(aRequest);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
@ -571,6 +581,11 @@ class NetworkRequest {
|
|||||||
|
|
||||||
// nsIStreamListener
|
// nsIStreamListener
|
||||||
onStopRequest(aRequest, aStatusCode) {
|
onStopRequest(aRequest, aStatusCode) {
|
||||||
|
// Turns out webcompat shims might redirect to
|
||||||
|
// SimpleChannel, so we get requests from a different channel.
|
||||||
|
// See https://github.com/microsoft/playwright/issues/9418#issuecomment-944836244
|
||||||
|
if (aRequest !== this.httpChannel)
|
||||||
|
return;
|
||||||
try {
|
try {
|
||||||
this._originalListener.onStopRequest(aRequest, aStatusCode);
|
this._originalListener.onStopRequest(aRequest, aStatusCode);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user