fix(page): page.createIsolatedWorld error catching has been added (#7848)

Co-authored-by: DimaShustal <dzmitry.shustal@gmail.com>
Co-authored-by: Alex Rudenko <OrKoN@users.noreply.github.com>
This commit is contained in:
Dima 2022-03-02 15:03:44 +03:00 committed by Alex Rudenko
parent 608d944012
commit 309e8b80da

View File

@ -16,7 +16,7 @@
import { EventEmitter } from './EventEmitter.js';
import { assert } from './assert.js';
import { helper } from './helper.js';
import { helper, debugError } from './helper.js';
import { ExecutionContext, EVALUATION_SCRIPT_URL } from './ExecutionContext.js';
import {
LifecycleWatcher,
@ -393,11 +393,13 @@ export class FrameManager extends EventEmitter {
this.frames()
.filter((frame) => frame._client === session)
.map((frame) =>
session.send('Page.createIsolatedWorld', {
frameId: frame._id,
worldName: name,
grantUniveralAccess: true,
})
session
.send('Page.createIsolatedWorld', {
frameId: frame._id,
worldName: name,
grantUniveralAccess: true,
})
.catch(debugError)
)
);
}