fix: send ELECTRON_BROWSER_CONTEXT_RELEASE asynchronously (#20632)

* fix: send ELECTRON_BROWSER_CONTEXT_RELEASE asynchronously

* test: remote references should be able to be cleared for all cases
This commit is contained in:
Milan Burda 2019-10-23 06:44:21 +02:00 committed by Cheng Zhao
parent 2abea22b4b
commit ba8f80267c
5 changed files with 43 additions and 5 deletions

View file

@ -19,7 +19,7 @@ const contextId = v8Util.getHiddenValue(global, 'contextId')
// to guard that situation.
process.on('exit', () => {
const command = 'ELECTRON_BROWSER_CONTEXT_RELEASE'
ipcRendererInternal.sendSync(command, contextId)
ipcRendererInternal.send(command, contextId)
})
// Convert the arguments object into an array of meta data.