Merge pull request #7587 from electron/update-standard
Update standard to v8 to be inline with standard-markdown
This commit is contained in:
commit
0756aa663b
4 changed files with 5 additions and 5 deletions
|
@ -279,7 +279,7 @@ ipcMain.on('ELECTRON_BROWSER_CONSTRUCTOR', function (event, id, args) {
|
||||||
|
|
||||||
// Call new with array of arguments.
|
// Call new with array of arguments.
|
||||||
// http://stackoverflow.com/questions/1606797/use-of-apply-with-new-operator-is-this-possible
|
// 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)
|
event.returnValue = valueToMeta(event.sender, obj)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
event.returnValue = exceptionToMeta(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]
|
let constructor = objectsRegistry.get(id)[method]
|
||||||
|
|
||||||
// Call new with array of arguments.
|
// 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)
|
event.returnValue = valueToMeta(event.sender, obj)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
event.returnValue = exceptionToMeta(error)
|
event.returnValue = exceptionToMeta(error)
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
"electabul": "~0.0.4",
|
"electabul": "~0.0.4",
|
||||||
"electron-docs-linter": "^1.8.2",
|
"electron-docs-linter": "^1.8.2",
|
||||||
"request": "*",
|
"request": "*",
|
||||||
"standard": "^7.1.2",
|
"standard": "^8.4.0",
|
||||||
"standard-markdown": "^2.1.1"
|
"standard-markdown": "^2.1.1"
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
|
|
|
@ -45,7 +45,7 @@ describe('ipc module', function () {
|
||||||
assert.equal(a.bar, 1234)
|
assert.equal(a.bar, 1234)
|
||||||
assert.equal(a.anonymous.constructor.name, '')
|
assert.equal(a.anonymous.constructor.name, '')
|
||||||
assert.equal(a.getConstructorName(Object.create(null)), '')
|
assert.equal(a.getConstructorName(Object.create(null)), '')
|
||||||
assert.equal(a.getConstructorName(new (class {})), '')
|
assert.equal(a.getConstructorName(new (class {})()), '')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('should search module from the user app', function () {
|
it('should search module from the user app', function () {
|
||||||
|
|
2
spec/fixtures/module/no-prototype.js
vendored
2
spec/fixtures/module/no-prototype.js
vendored
|
@ -4,7 +4,7 @@ foo.baz = false
|
||||||
module.exports = {
|
module.exports = {
|
||||||
foo: foo,
|
foo: foo,
|
||||||
bar: 1234,
|
bar: 1234,
|
||||||
anonymous: new (class {}),
|
anonymous: new (class {})(),
|
||||||
getConstructorName: function (value) {
|
getConstructorName: function (value) {
|
||||||
return value.constructor.name
|
return value.constructor.name
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue