Fix places where Window should be BrowserWindow.
This commit is contained in:
parent
06142aa2e8
commit
64a8664ffe
2 changed files with 3 additions and 2 deletions
|
@ -67,7 +67,7 @@ module.exports =
|
||||||
selectFileWrap args..., 4, 'Open Files'
|
selectFileWrap args..., 4, 'Open Files'
|
||||||
|
|
||||||
showMessageBox: (window, options) ->
|
showMessageBox: (window, options) ->
|
||||||
throw new TypeError('Need Window object') unless window.constructor is Window
|
throw new TypeError('Need Window object') unless window.constructor is BrowserWindow
|
||||||
|
|
||||||
options = {} unless options?
|
options = {} unless options?
|
||||||
options.type = options.type ? module.exports.MESSAGE_BOX_NONE
|
options.type = options.type ? module.exports.MESSAGE_BOX_NONE
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
BrowserWindow = require 'browser_window'
|
||||||
IDWeakMap = require 'id_weak_map'
|
IDWeakMap = require 'id_weak_map'
|
||||||
|
|
||||||
class ObjectsStore
|
class ObjectsStore
|
||||||
|
@ -54,7 +55,7 @@ process.on 'ATOM_BROWSER_INTERNAL_NEW', (obj) ->
|
||||||
objectsWeakMap.add obj
|
objectsWeakMap.add obj
|
||||||
|
|
||||||
# Also remember all windows.
|
# Also remember all windows.
|
||||||
windowsWeakMap.add obj if obj.constructor.name is 'Window'
|
windowsWeakMap.add obj if obj.constructor is BrowserWindow
|
||||||
|
|
||||||
exports.add = (processId, routingId, obj) ->
|
exports.add = (processId, routingId, obj) ->
|
||||||
# Some native objects may already been added to objectsWeakMap, be care not
|
# Some native objects may already been added to objectsWeakMap, be care not
|
||||||
|
|
Loading…
Reference in a new issue