From 3be5cdcd439c5c4f96fc88e8a7c37402a4f36d48 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sat, 4 Jun 2016 11:24:14 -0700 Subject: [PATCH] debugger: remove obsolete setTimeout Remove obsolete `setTimeout()` introduced in 3148f1400. The fix for the problem is in b266074347. (For the record, I mostly don't know what I'm talking about here but am summarizing from an IRC #node-dev conversation with @indutny on 04-Jun-2016.) PR-URL: https://github.com/nodejs/node/pull/7154 Reviewed-By: Fedor Indutny Reviewed-By: Colin Ihrig --- lib/_debugger.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/lib/_debugger.js b/lib/_debugger.js index a5d3f6e872..6d1043dda9 100644 --- a/lib/_debugger.js +++ b/lib/_debugger.js @@ -825,13 +825,7 @@ function Interface(stdin, stdout, args) { // Run script automatically this.pause(); - // XXX Need to figure out why we need this delay - setTimeout(function() { - - self.run(function() { - self.resume(); - }); - }, 10); + setImmediate(() => { this.run(); }); }