|
@@ -279,7 +279,7 @@ ipcMain.on('ELECTRON_BROWSER_CONSTRUCTOR', function (event, id, args) {
|
|
|
|
|
|
// Call new with array of arguments.
|
|
|
// http://stackoverflow.com/questions/1606797/use-of-apply-with-new-operator-is-this-possible
|
|
|
- let obj = new (Function.prototype.bind.apply(constructor, [null].concat(args)))
|
|
|
+ let obj = new (Function.prototype.bind.apply(constructor, [null].concat(args)))()
|
|
|
event.returnValue = valueToMeta(event.sender, obj)
|
|
|
} catch (error) {
|
|
|
event.returnValue = exceptionToMeta(error)
|
|
@@ -302,7 +302,7 @@ ipcMain.on('ELECTRON_BROWSER_MEMBER_CONSTRUCTOR', function (event, id, method, a
|
|
|
let constructor = objectsRegistry.get(id)[method]
|
|
|
|
|
|
// Call new with array of arguments.
|
|
|
- let obj = new (Function.prototype.bind.apply(constructor, [null].concat(args)))
|
|
|
+ let obj = new (Function.prototype.bind.apply(constructor, [null].concat(args)))()
|
|
|
event.returnValue = valueToMeta(event.sender, obj)
|
|
|
} catch (error) {
|
|
|
event.returnValue = exceptionToMeta(error)
|