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.writable = true;
|
||||||
|
descriptor.configurable = true;
|
||||||
descriptor.value = remoteMemberFunction;
|
descriptor.value = remoteMemberFunction;
|
||||||
} else if (member.type === 'get') {
|
} else if (member.type === 'get') {
|
||||||
descriptor.get = function() {
|
descriptor.get = function() {
|
||||||
|
|
|
@ -70,6 +70,8 @@ describe('ipc module', function() {
|
||||||
|
|
||||||
remoteFunctions.aFunction = function () { return 1234; };
|
remoteFunctions.aFunction = function () { return 1234; };
|
||||||
assert.equal(remoteFunctions.aFunction(), 1234);
|
assert.equal(remoteFunctions.aFunction(), 1234);
|
||||||
|
|
||||||
|
assert.equal(delete remoteFunctions.aFunction, true);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue