mirror of
https://github.com/microsoft/playwright.git
synced 2025-01-01 23:58:17 +03:00
parent
0160c18f7a
commit
18e690e234
@ -1,2 +1,2 @@
|
||||
1296
|
||||
Changed: lushnikov@chromium.org Thu 14 Oct 2021 12:01:09 PM PDT
|
||||
1297
|
||||
Changed: lushnikov@chromium.org Fri Oct 15 18:52:51 PDT 2021
|
||||
|
@ -540,6 +540,11 @@ class NetworkRequest {
|
||||
|
||||
// nsIStreamListener
|
||||
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),
|
||||
// we do not get onResponse normally, but we do get nsIStreamListener notifications.
|
||||
this._sendOnResponse(false);
|
||||
@ -562,6 +567,11 @@ class NetworkRequest {
|
||||
|
||||
// nsIStreamListener
|
||||
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 {
|
||||
this._originalListener.onStartRequest(aRequest);
|
||||
} catch (e) {
|
||||
@ -571,6 +581,11 @@ class NetworkRequest {
|
||||
|
||||
// nsIStreamListener
|
||||
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 {
|
||||
this._originalListener.onStopRequest(aRequest, aStatusCode);
|
||||
} catch (e) {
|
||||
|
@ -1,2 +1,2 @@
|
||||
1296
|
||||
Changed: lushnikov@chromium.org Wed Oct 13 15:47:14 PDT 2021
|
||||
1297
|
||||
Changed: lushnikov@chromium.org Fri Oct 15 18:51:16 PDT 2021
|
||||
|
@ -540,6 +540,11 @@ class NetworkRequest {
|
||||
|
||||
// nsIStreamListener
|
||||
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),
|
||||
// we do not get onResponse normally, but we do get nsIStreamListener notifications.
|
||||
this._sendOnResponse(false);
|
||||
@ -562,6 +567,11 @@ class NetworkRequest {
|
||||
|
||||
// nsIStreamListener
|
||||
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 {
|
||||
this._originalListener.onStartRequest(aRequest);
|
||||
} catch (e) {
|
||||
@ -571,6 +581,11 @@ class NetworkRequest {
|
||||
|
||||
// nsIStreamListener
|
||||
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 {
|
||||
this._originalListener.onStopRequest(aRequest, aStatusCode);
|
||||
} catch (e) {
|
||||
|
Loading…
Reference in New Issue
Block a user