mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
Roll chromium to r494365 (#271)
This patch: - rolls chromium to r494365 - starts using Runtime.evaluate(awaitPromise: true), with new semantic we can avoid additional Runtime.awaitPromise call - stops resolving promises for Console event
This commit is contained in:
committed by
Andrey Lushnikov
parent
1e5d9fd8c0
commit
56eab00fa7
@@ -51,7 +51,7 @@ class ElementHandle {
|
||||
stringifiedArgs.push(...args.map(x => JSON.stringify(x)));
|
||||
let functionDeclaration = `function() { return (${pageFunction})(${stringifiedArgs.join(',')}) }`;
|
||||
const objectId = this._remoteObject.objectId;
|
||||
let { exceptionDetails, result: remoteObject } = await this._client.send('Runtime.callFunctionOn', { objectId, functionDeclaration, returnByValue: false});
|
||||
let { exceptionDetails, result: remoteObject } = await this._client.send('Runtime.callFunctionOn', { objectId, functionDeclaration, returnByValue: false, awaitPromise: true});
|
||||
if (exceptionDetails)
|
||||
throw new Error('Evaluation failed: ' + helper.getExceptionMessage(exceptionDetails));
|
||||
return await helper.serializeRemoteObject(this._client, remoteObject);
|
||||
|
||||
Reference in New Issue
Block a user