]> khamidou — GitHub mirrors - electron.git/commitdiff
Fix using BrowserWindow as parameter for ipc.sendChannel.
authorCheng Zhao <zcbenz@gmail.com>
Mon, 17 Feb 2014 07:24:42 +0000 (15:24 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Mon, 17 Feb 2014 07:24:42 +0000 (15:24 +0800)
browser/api/lib/auto-updater.coffee
browser/api/lib/ipc.coffee

index 53d06726777779b6a6e04c5f501dff640ac52073..39097314978dcba4f4fb081a285da8b570d6bff4 100644 (file)
@@ -23,6 +23,6 @@ autoUpdater.quitAndInstall = ->
 
   # Tell all windows to remove beforeunload handler and then close itself.
   ipc = require 'ipc'
-  ipc.sendChannel win.getProcessId(), win.getRoutingId(), 'ATOM_SHELL_SILENT_CLOSE' for win in windows
+  ipc.sendChannel win, 'ATOM_SHELL_SILENT_CLOSE' for win in windows
 
 module.exports = autoUpdater
index 11377ec28300a6b6c3a98f98dbf9f61f4d92483e..c93ed4f205765adee5fccc750132f71a67cbf718 100644 (file)
@@ -5,6 +5,7 @@ sendWrap = (channel, processId, routingId, args...) ->
   BrowserWindow = require 'browser-window'
   if processId?.constructor is BrowserWindow
     window = processId
+    args = [routingId, args...]
     processId = window.getProcessId()
     routingId = window.getRoutingId()