Allow remote member functions to be deleted
This commit is contained in:
parent
610a503188
commit
f460d81dd0
2 changed files with 3 additions and 0 deletions
|
@ -111,6 +111,7 @@ let setObjectMembers = function(object, metaId, members) {
|
|||
}
|
||||
};
|
||||
descriptor.writable = true;
|
||||
descriptor.configurable = true;
|
||||
descriptor.value = remoteMemberFunction;
|
||||
} else if (member.type === 'get') {
|
||||
descriptor.get = function() {
|
||||
|
|
|
@ -70,6 +70,8 @@ describe('ipc module', function() {
|
|||
|
||||
remoteFunctions.aFunction = function () { return 1234; };
|
||||
assert.equal(remoteFunctions.aFunction(), 1234);
|
||||
|
||||
assert.equal(delete remoteFunctions.aFunction, true);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue