Skip to content

Commit b6b2950

Browse files
authored
feat(chromium): roll Chromium to r686378 (#4841)
This roll includes: - https://crrev.com/685152 - [DevTools] Do not debug worker shadow pages - https://crrev.com/683391 - [CSP] Check inline script CSP in prepare-a-script - https://chromium-review.googlesource.com/c/v8/v8/+/1707331 - Ignore returnByValue when serializing caught value in promise rejections.
1 parent 01b8880 commit b6b2950

File tree

3 files changed

+6
-13
lines changed

3 files changed

+6
-13
lines changed

lib/Target.js

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
const {Events} = require('./Events');
1818
const {Page} = require('./Page');
1919
const {Worker} = require('./Worker');
20-
const {Connection} = require('./Connection');
2120

2221
class Target {
2322
/**
@@ -84,16 +83,9 @@ class Target {
8483
if (this._targetInfo.type !== 'service_worker' && this._targetInfo.type !== 'shared_worker')
8584
return null;
8685
if (!this._workerPromise) {
87-
this._workerPromise = this._sessionFactory().then(async client => {
88-
// Top level workers have a fake page wrapping the actual worker.
89-
const [targetAttached] = await Promise.all([
90-
new Promise(x => client.once('Target.attachedToTarget', x)),
91-
client.send('Target.setAutoAttach', {autoAttach: true, waitForDebuggerOnStart: false, flatten: true}),
92-
]);
93-
const session = Connection.fromSession(client).session(targetAttached.sessionId);
94-
// TODO(einbinder): Make workers send their console logs.
95-
return new Worker(session, this._targetInfo.url, () => {} /* consoleAPICalled */, () => {} /* exceptionThrown */);
96-
});
86+
// TODO(einbinder): Make workers send their console logs.
87+
this._workerPromise = this._sessionFactory()
88+
.then(client => new Worker(client, this._targetInfo.url, () => {} /* consoleAPICalled */, () => {} /* exceptionThrown */));
9789
}
9890
return this._workerPromise;
9991
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"node": ">=6.4.0"
99
},
1010
"puppeteer": {
11-
"chromium_revision": "682225"
11+
"chromium_revision": "686378"
1212
},
1313
"scripts": {
1414
"unit": "node test/test.js",

test/page.spec.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -903,7 +903,8 @@ module.exports.addTests = function({testRunner, expect, headless, puppeteer, CHR
903903
expect(await page.evaluate(() => __injected)).toBe(35);
904904
});
905905

906-
it_fails_ffox('should throw when added with content to the CSP page', async({page, server}) => {
906+
// @see https://github.com/GoogleChrome/puppeteer/issues/4840
907+
xit('should throw when added with content to the CSP page', async({page, server}) => {
907908
await page.goto(server.PREFIX + '/csp.html');
908909
let error = null;
909910
await page.addScriptTag({ content: 'window.__injected = 35;' }).catch(e => error = e);

0 commit comments

Comments
 (0)