Skip to content

Commit

Permalink
node: fix throws before timer module is loaded
Browse files Browse the repository at this point in the history
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: nodejs/node-v0.x-archive#8110
Signed-off-by: Trevor Norris <[email protected]>
Reviewed-by: Fedor Indutny <[email protected]>
Reviewed-by: Alexis Campailla <[email protected]>
Reviewed-by: Julien Gilli <[email protected]>
  • Loading branch information
trevnorris authored and piscisaureus committed Dec 9, 2014
1 parent a1da024 commit 8f41db6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 8f41db6

Please sign in to comment.