fix: correctly handle IPC for promise-based methods (#16433)

This commit is contained in:
Shelley Vohr 2019-01-17 12:08:54 -08:00 committed by GitHub
parent 4d0b2ac9be
commit 720197f9c8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 44 additions and 8 deletions

View file

@ -50,18 +50,20 @@ exports.syncMethods = new Set([
'setZoomLevel'
])
exports.asyncMethods = new Set([
exports.asyncCallbackMethods = new Set([
'insertCSS',
'insertText',
'send',
'sendInputEvent',
'setLayoutZoomLevelLimits',
'setVisualZoomLevelLimits',
// with callback
'capturePage',
'executeJavaScript',
'getZoomFactor',
'getZoomLevel',
'print',
'printToPDF'
])
exports.asyncPromiseMethods = new Set([
'capturePage',
'executeJavaScript'
])