Merge branch 'master' into native-window-open

This commit is contained in:
Ryohei Ikegami 2017-03-23 23:53:13 +09:00
commit 6f9dbd4e04
50 changed files with 517 additions and 102 deletions

View file

@ -179,7 +179,15 @@ const proxyFunctionProperties = function (remoteMemberFunction, metaId, name) {
},
get: (target, property, receiver) => {
if (!target.hasOwnProperty(property)) loadRemoteProperties()
return target[property]
const value = target[property]
// Bind toString to target if it is a function to avoid
// Function.prototype.toString is not generic errors
if (property === 'toString' && typeof value === 'function') {
return value.bind(target)
}
return value
},
ownKeys: (target) => {
loadRemoteProperties()

View file

@ -6,7 +6,7 @@ const Module = require('module')
const resolvePromise = Promise.resolve.bind(Promise)
// We modified the original process.argv to let node.js load the
// atom-renderer.js, we need to restore it here.
// init.js, we need to restore it here.
process.argv.splice(1, 1)
// Clear search paths.