Use create function instead of IDWeakMap constructor
This commit is contained in:
parent
c708ae8eb5
commit
04d59991b0
4 changed files with 14 additions and 18 deletions
|
@ -1,10 +1,11 @@
|
|||
'use strict'
|
||||
|
||||
const electron = require('electron')
|
||||
const ipcMain = electron.ipcMain
|
||||
const objectsRegistry = require('./objects-registry')
|
||||
const v8Util = process.atomBinding('v8_util')
|
||||
const IDWeakMap = process.atomBinding('id_weak_map').IDWeakMap
|
||||
const {ipcMain} = electron
|
||||
const {createIDWeakMap} = process.atomBinding('id_weak_map')
|
||||
|
||||
const objectsRegistry = require('./objects-registry')
|
||||
|
||||
// The internal properties of Function.
|
||||
const FUNCTION_PROPERTIES = [
|
||||
|
@ -13,7 +14,7 @@ const FUNCTION_PROPERTIES = [
|
|||
|
||||
// The remote functions in renderer processes.
|
||||
// id => Function
|
||||
let rendererFunctions = new IDWeakMap()
|
||||
let rendererFunctions = createIDWeakMap()
|
||||
|
||||
// Merge two IDs together.
|
||||
let mergeIds = function (webContentsId, metaId) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue