fix(webkit): switch to unique loader ids (#454)

This commit is contained in:
Yury Semikhatsky 2020-01-10 15:16:06 -08:00 committed by Dmitry Gozman
parent 3216e4f024
commit fd5c872d7f
3 changed files with 3 additions and 5 deletions

View file

@ -10,7 +10,7 @@
"playwright": { "playwright": {
"chromium_revision": "724623", "chromium_revision": "724623",
"firefox_revision": "1009", "firefox_revision": "1009",
"webkit_revision": "1080" "webkit_revision": "1082"
}, },
"scripts": { "scripts": {
"unit": "node test/test.js", "unit": "node test/test.js",

View file

@ -95,7 +95,7 @@ export class WKNetworkManager {
const frame = this._page._frameManager.frame(event.frameId); const frame = this._page._frameManager.frame(event.frameId);
// TODO(einbinder) this will fail if we are an XHR document request // TODO(einbinder) this will fail if we are an XHR document request
const isNavigationRequest = event.type === 'Document'; const isNavigationRequest = event.type === 'Document';
const documentId = isNavigationRequest ? this._session.sessionId + '::' + event.loaderId : undefined; const documentId = isNavigationRequest ? event.loaderId : undefined;
const request = new InterceptableRequest(this._session, this._page._state.interceptNetwork, frame, event, redirectChain, documentId); const request = new InterceptableRequest(this._session, this._page._state.interceptNetwork, frame, event, redirectChain, documentId);
this._requestIdToRequest.set(event.requestId, request); this._requestIdToRequest.set(event.requestId, request);
this._page._frameManager.requestStarted(request.request); this._page._frameManager.requestStarted(request.request);

View file

@ -195,9 +195,7 @@ export class WKPage implements PageDelegate {
frame._contextDestroyed(context); frame._contextDestroyed(context);
} }
} }
// Append session id to avoid cross-process loaderId clash. this._page._frameManager.frameCommittedNewDocumentNavigation(framePayload.id, framePayload.url, framePayload.name || '', framePayload.loaderId, initial);
const documentId = this._session.sessionId + '::' + framePayload.loaderId;
this._page._frameManager.frameCommittedNewDocumentNavigation(framePayload.id, framePayload.url, framePayload.name || '', documentId, initial);
} }
_onFrameNavigatedWithinDocument(frameId: string, url: string) { _onFrameNavigatedWithinDocument(frameId: string, url: string) {