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
@@ -54,16 +54,6 @@ class Helper {
|
||||
* @return {!Promise<!Object>}
|
||||
*/
|
||||
static async serializeRemoteObject(client, remoteObject) {
|
||||
if (remoteObject.subtype === 'promise') {
|
||||
let response = (await client.send('Runtime.awaitPromise', {
|
||||
promiseObjectId: remoteObject.objectId,
|
||||
returnByValue: false
|
||||
}));
|
||||
Helper.releaseObject(client, remoteObject);
|
||||
if (response.exceptionDetails)
|
||||
throw new Error('Evaluation failed: ' + Helper.getExceptionMessage(response.exceptionDetails));
|
||||
remoteObject = response.result;
|
||||
}
|
||||
if (remoteObject.unserializableValue) {
|
||||
switch (remoteObject.unserializableValue) {
|
||||
case '-0':
|
||||
@@ -80,6 +70,8 @@ class Helper {
|
||||
}
|
||||
if (!remoteObject.objectId)
|
||||
return remoteObject.value;
|
||||
if (remoteObject.subtype === 'promise')
|
||||
return remoteObject.description;
|
||||
try {
|
||||
let response = await client.send('Runtime.callFunctionOn', {
|
||||
objectId: remoteObject.objectId,
|
||||
|
||||
Reference in New Issue
Block a user