Skip to content

Commit ce72198

Browse files
authored
feat(webkit): roll webkit to 1124 (#736)
1 parent 44829d6 commit ce72198

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"playwright": {
1111
"chromium_revision": "733125",
1212
"firefox_revision": "1020",
13-
"webkit_revision": "1120"
13+
"webkit_revision": "1124"
1414
},
1515
"scripts": {
1616
"ctest": "cross-env BROWSER=chromium node test/test.js",

src/webkit/wkPage.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import * as dom from '../dom';
2121
import * as network from '../network';
2222
import { WKSession } from './wkConnection';
2323
import { Events } from '../events';
24-
import { WKExecutionContext, EVALUATION_SCRIPT_URL } from './wkExecutionContext';
24+
import { WKExecutionContext } from './wkExecutionContext';
2525
import { WKInterceptableRequest } from './wkInterceptableRequest';
2626
import { WKWorkers } from './wkWorkers';
2727
import { Page, PageDelegate, Coverage } from '../page';
@@ -101,7 +101,7 @@ export class WKPage implements PageDelegate {
101101
session.send('Page.getResourceTree').then(resourceTreeHandler),
102102
// Resource tree should be received before first execution context.
103103
session.send('Runtime.enable'),
104-
session.send('Page.createIsolatedWorld', { name: UTILITY_WORLD_NAME, source: `//# sourceURL=${EVALUATION_SCRIPT_URL}` }),
104+
session.send('Page.createUserWorld', { name: UTILITY_WORLD_NAME }).catch(_ => {}), // Worlds are per-process
105105
session.send('Console.enable'),
106106
session.send('Page.setInterceptFileChooserDialog', { enabled: true }),
107107
session.send('Network.enable'),
@@ -295,11 +295,11 @@ export class WKPage implements PageDelegate {
295295
return;
296296
const delegate = new WKExecutionContext(this._session, contextPayload.id);
297297
const context = new dom.FrameExecutionContext(delegate, frame);
298-
if (contextPayload.isPageContext)
298+
if (contextPayload.type === 'normal')
299299
frame._contextCreated('main', context);
300-
else if (contextPayload.name === UTILITY_WORLD_NAME)
300+
else if (contextPayload.type === 'user' && contextPayload.name === UTILITY_WORLD_NAME)
301301
frame._contextCreated('utility', context);
302-
if (contextPayload.isPageContext && frame === this._page.mainFrame())
302+
if (contextPayload.type === 'normal' && frame === this._page.mainFrame())
303303
this._mainFrameContextId = contextPayload.id;
304304
this._contextIdToContext.set(contextPayload.id, context);
305305
}

0 commit comments

Comments
 (0)