Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Commit 82e10ce

Browse files
committed
Do not override DOM's global functions in renderer.
1 parent 02a6357 commit 82e10ce

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/node.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,26 @@
2222

2323
process.EventEmitter = EventEmitter; // process.EventEmitter is deprecated
2424

25+
var isRenderer = process.argv[2] == '--type=renderer';
26+
2527
startup.setupProcessObject();
2628

2729
// do this good and early, since it handles errors.
2830
startup.processFatal();
2931

3032
startup.globalVariables();
33+
if (!isRenderer) { // No indent to minimize diff.
3134
startup.globalTimeouts();
3235
startup.globalConsole();
36+
} // not isRenderer
3337

3438
startup.processAssert();
3539
startup.processConfig();
3640
startup.processNextTick();
3741
startup.processPromises();
3842
startup.processStdio();
3943
startup.processKillAndExit();
44+
if (!isRenderer) { // No indent to minimize diff.
4045
startup.processSignalHandlers();
4146

4247
// Do not initialize channel in debugger agent, it deletes env variable
@@ -45,6 +50,7 @@
4550
startup.processChannel();
4651

4752
startup.processRawDebug();
53+
} // not isRenderer
4854

4955
process.argv[0] = process.execPath;
5056

0 commit comments

Comments
 (0)