Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 11 commits into from Mar 2, 2022
14 changes: 8 additions & 6 deletions src/common/FrameManager.ts
Expand Up @@ -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,
Expand Down Expand Up @@ -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)
)
);
}
Expand Down