From: Cheng Zhao Date: Mon, 17 Feb 2014 07:24:42 +0000 (+0800) Subject: Fix using BrowserWindow as parameter for ipc.sendChannel. X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=07fc2b41af1e0f963a7e378f3d2565a1c9390386;p=electron.git Fix using BrowserWindow as parameter for ipc.sendChannel. --- diff --git a/browser/api/lib/auto-updater.coffee b/browser/api/lib/auto-updater.coffee index 53d06726..39097314 100644 --- a/browser/api/lib/auto-updater.coffee +++ b/browser/api/lib/auto-updater.coffee @@ -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 diff --git a/browser/api/lib/ipc.coffee b/browser/api/lib/ipc.coffee index 11377ec2..c93ed4f2 100644 --- a/browser/api/lib/ipc.coffee +++ b/browser/api/lib/ipc.coffee @@ -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()