Remote object's members should reference itself
This commit is contained in:
parent
f36851fcff
commit
4ebb01f8c9
1 changed files with 9 additions and 2 deletions
|
@ -109,9 +109,16 @@ let setObjectMembers = function (object, metaId, members) {
|
|||
return metaToValue(ret)
|
||||
}
|
||||
}
|
||||
descriptor.writable = true
|
||||
descriptor.get = function () {
|
||||
remoteMemberFunction.ref = object // The member should reference its object.
|
||||
return remoteMemberFunction
|
||||
}
|
||||
// Enable monkey-patch the method
|
||||
descriptor.set = function (value) {
|
||||
remoteMemberFunction = value
|
||||
return value
|
||||
}
|
||||
descriptor.configurable = true
|
||||
descriptor.value = remoteMemberFunction
|
||||
} else if (member.type === 'get') {
|
||||
descriptor.get = function () {
|
||||
return metaToValue(ipcRenderer.sendSync('ATOM_BROWSER_MEMBER_GET', metaId, member.name))
|
||||
|
|
Loading…
Reference in a new issue