Skip to content

Commit 2c7717d

Browse files
committed
Merge pull request electron#4233 from atom/update-node
Ignore errors happened in Node's stdout/stdin stream
2 parents f87edba + d0587a9 commit 2c7717d

File tree

3 files changed

+17
-7
lines changed

3 files changed

+17
-7
lines changed

Diff for: spec/node-spec.js

+13-6
Original file line numberDiff line numberDiff line change
@@ -190,17 +190,24 @@ describe('node feature', function() {
190190
return assert.equal(Buffer.byteLength(p.innerText), 13);
191191
});
192192
});
193+
193194
describe('process.stdout', function() {
194195
it('should not throw exception', function() {
195-
return process.stdout;
196+
process.stdout;
196197
});
197-
return xit('should have isTTY defined', function() {
198-
return assert.equal(typeof process.stdout.isTTY, 'boolean');
198+
199+
it('should not throw exception when calling write()', function() {
200+
process.stdout.write('test');
201+
});
202+
203+
xit('should have isTTY defined', function() {
204+
assert.equal(typeof process.stdout.isTTY, 'boolean');
199205
});
200206
});
201-
return describe('vm.createContext', function() {
202-
return it('should not crash', function() {
203-
return require('vm').runInNewContext('');
207+
208+
describe('vm.createContext', function() {
209+
it('should not crash', function() {
210+
require('vm').runInNewContext('');
204211
});
205212
});
206213
});

Diff for: spec/static/main.js

+3
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ app.commandLine.appendSwitch('disable-renderer-backgrounding');
2828
// sure we can reproduce it in renderer process.
2929
process.stdout;
3030

31+
// Access console to reproduce #3482.
32+
console;
33+
3134
ipcMain.on('message', function(event, arg) {
3235
event.sender.send('message', arg);
3336
});

Diff for: vendor/node

Submodule node updated 1 file

0 commit comments

Comments
 (0)