From 8f41db6104deca82d74f55501a7f2689357fb45d Mon Sep 17 00:00:00 2001 From: Trevor Norris Date: Wed, 12 Nov 2014 16:35:48 -0800 Subject: [PATCH] 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 Reviewed-by: Fedor Indutny Reviewed-by: Alexis Campailla Reviewed-by: Julien Gilli --- src/node.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node.js b/src/node.js index bedc6e025c..a00c5f32ea 100644 --- a/src/node.js +++ b/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;