Remove sync call in remote module
This commit is contained in:
parent
0282d424bf
commit
353f08e477
5 changed files with 34 additions and 31 deletions
|
@ -1,7 +1,9 @@
|
||||||
# Import common modules.
|
common = require '../../../../common/api/lib/exports/electron'
|
||||||
module.exports = require '../../../../common/api/lib/exports/electron'
|
|
||||||
|
|
||||||
Object.defineProperties module.exports,
|
# Import common modules.
|
||||||
|
common.defineProperties exports
|
||||||
|
|
||||||
|
Object.defineProperties exports,
|
||||||
# Browser side modules, please sort with alphabet order.
|
# Browser side modules, please sort with alphabet order.
|
||||||
app:
|
app:
|
||||||
enumerable: true
|
enumerable: true
|
||||||
|
|
|
@ -219,9 +219,6 @@ ipcMain.on 'ATOM_BROWSER_GUEST_WEB_CONTENTS', (event, guestInstanceId) ->
|
||||||
catch e
|
catch e
|
||||||
event.returnValue = exceptionToMeta e
|
event.returnValue = exceptionToMeta e
|
||||||
|
|
||||||
ipcMain.on 'ATOM_BROWSER_LIST_MODULES', (event) ->
|
|
||||||
event.returnValue = (name for name of electron)
|
|
||||||
|
|
||||||
ipcMain.on 'ATOM_BROWSER_ASYNC_CALL_TO_GUEST_VIEW', (event, guestInstanceId, method, args...) ->
|
ipcMain.on 'ATOM_BROWSER_ASYNC_CALL_TO_GUEST_VIEW', (event, guestInstanceId, method, args...) ->
|
||||||
try
|
try
|
||||||
guestViewManager = require './guest-view-manager'
|
guestViewManager = require './guest-view-manager'
|
||||||
|
|
|
@ -5,6 +5,8 @@ exports.hideInternalModules = ->
|
||||||
# Remove the "common/api/lib" and "browser-or-renderer/api/lib".
|
# Remove the "common/api/lib" and "browser-or-renderer/api/lib".
|
||||||
globalPaths.splice 0, 2
|
globalPaths.splice 0, 2
|
||||||
|
|
||||||
|
# Attaches properties to |exports|.
|
||||||
|
exports.defineProperties = (exports) ->
|
||||||
Object.defineProperties exports,
|
Object.defineProperties exports,
|
||||||
# Common modules, please sort with alphabet order.
|
# Common modules, please sort with alphabet order.
|
||||||
clipboard:
|
clipboard:
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
# Import common modules.
|
common = require '../../../../common/api/lib/exports/electron'
|
||||||
module.exports = require '../../../../common/api/lib/exports/electron'
|
|
||||||
|
|
||||||
Object.defineProperties module.exports,
|
# Import common modules.
|
||||||
|
common.defineProperties exports
|
||||||
|
|
||||||
|
Object.defineProperties exports,
|
||||||
# Renderer side modules, please sort with alphabet order.
|
# Renderer side modules, please sort with alphabet order.
|
||||||
desktopCapturer:
|
desktopCapturer:
|
||||||
enumerable: true
|
enumerable: true
|
||||||
|
|
|
@ -126,9 +126,9 @@ ipcRenderer.on 'ATOM_RENDERER_RELEASE_CALLBACK', (event, id) ->
|
||||||
callbacksRegistry.remove id
|
callbacksRegistry.remove id
|
||||||
|
|
||||||
# List all built-in modules in browser process.
|
# List all built-in modules in browser process.
|
||||||
browserModules = ipcRenderer.sendSync 'ATOM_BROWSER_LIST_MODULES'
|
browserModules = require '../../../browser/api/lib/exports/electron'
|
||||||
# And add a helper receiver for each one.
|
# And add a helper receiver for each one.
|
||||||
for name in browserModules
|
for name of browserModules
|
||||||
do (name) ->
|
do (name) ->
|
||||||
Object.defineProperty exports, name, get: -> exports.getBuiltin name
|
Object.defineProperty exports, name, get: -> exports.getBuiltin name
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue