Browse Source

node: fix throws before timer module is loaded

An edge case could occur when the setImmediate() in _fatalException()
would fire before the timers module had been loaded globally, causing
Node to crash.

PR-URL: https://github.com/joyent/node/pull/8110
Signed-off-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-by: Fedor Indutny <fedor@indutny.com>
Reviewed-by: Alexis Campailla <alexis@janeasystems.com>
Reviewed-by: Julien Gilli <julien.gilli@joyent.com>
archived-io.js-v0.12
Trevor Norris 10 years ago
committed by Bert Belder
parent
commit
8f41db6104
  1. 2
      src/node.js

2
src/node.js

@ -255,7 +255,7 @@
// if we handled an error, then make sure any ticks get processed
} else {
var t = setImmediate(process._tickCallback);
NativeModule.require('timers').setImmediate(process._tickCallback);
}
return caught;

Loading…
Cancel
Save