Browse Source

fix: activate the uv_loop on incoming IPC messages (#19467)

* fix: activate the uv_loop on incoming IPC messages

* chore: guess at a fix for process not being defined
trop[bot] 5 years ago
parent
commit
c0e9761b4b
1 changed files with 2 additions and 0 deletions
  1. 2 0
      lib/renderer/init.ts

+ 2 - 0
lib/renderer/init.ts

@@ -45,10 +45,12 @@ const ipcInternalEmitter = new EventEmitter()
 v8Util.setHiddenValue(global, 'ipc', ipcEmitter)
 v8Util.setHiddenValue(global, 'ipc-internal', ipcInternalEmitter)
 
+const savedProcess = process
 v8Util.setHiddenValue(global, 'ipcNative', {
   onMessage (internal: boolean, channel: string, args: any[], senderId: number) {
     const sender = internal ? ipcInternalEmitter : ipcEmitter
     sender.emit(channel, { sender, senderId }, ...args)
+    savedProcess.activateUvLoop()
   }
 })