]> khamidou — GitHub mirrors - electron.git/commitdiff
Make remote.getCurrentWindow work for devtools.
authorCheng Zhao <zcbenz@gmail.com>
Fri, 4 Apr 2014 14:28:47 +0000 (22:28 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Fri, 4 Apr 2014 14:28:47 +0000 (22:28 +0800)
atom/browser/lib/rpc-server.coffee

index 6e072b6618645ea3646cbaedcd44510de2be5a79..e10f875328e3fe21ff27a783410b051dd8f5338f 100644 (file)
@@ -98,6 +98,7 @@ ipc.on 'ATOM_BROWSER_CURRENT_WINDOW', (event, processId, routingId) ->
   try
     BrowserWindow = require 'browser-window'
     window = BrowserWindow.fromProcessIdAndRoutingId processId, routingId
+    window = BrowserWindow.fromDevTools processId, routingId unless window?
     event.returnValue = valueToMeta processId, routingId, window
   catch e
     event.returnValue = errorToMeta e