Update the Node submodule to use the new module wrapper

See the fixed issue for the context. This pulls in a vendored copy of Node that includes the described patch.

Fixes #8358

Test Plan: Built Electron and verified it loaded the sample app correctly and that the module wrapper is the new one by viewing Node's source code in the Blink Inspector.

Added specs and tested with `npm test -- --grep "global variables"`
This commit is contained in:
James Ide 2017-01-10 19:29:22 -08:00 committed by Kevin Sawicki
parent 6e2f977f7a
commit 0430380de1
4 changed files with 27 additions and 1 deletions

View file

@ -0,0 +1,2 @@
const global = {__global: true}
module.exports = global

View file

@ -0,0 +1,2 @@
const process = require('process')
module.exports = process

View file

@ -47,6 +47,28 @@ describe('third-party module', function () {
})
})
})
describe('global variables', function () {
describe('process', function () {
it('can be declared in a module', function () {
var exportedProcess
assert.doesNotThrow(function () {
exportedProcess = require('./fixtures/module/declare-process')
})
assert.strictEqual(exportedProcess, require('process'))
})
})
describe('global', function () {
it('can be declared in a module', function () {
var exportedGlobal
assert.doesNotThrow(function () {
exportedGlobal = require('./fixtures/module/declare-global')
})
assert.deepEqual(exportedGlobal, {__global: true})
})
})
})
})
describe('Module._nodeModulePaths', function () {

2
vendor/node vendored

@ -1 +1 @@
Subproject commit 494083b740949caa93aca64ce75fe75c31e2034e
Subproject commit 0bf9958c91e7aed26d5d474b4ca59d3dce3e5e05