From d6508ac080c6f482ad07c3f71abb0602c84637c7 Mon Sep 17 00:00:00 2001 From: Berkeley Martinez Date: Thu, 3 Dec 2015 17:13:04 -0800 Subject: [PATCH] Increase loop protect timeout --- public/js/lib/loop-protect/loop-protect.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/js/lib/loop-protect/loop-protect.js b/public/js/lib/loop-protect/loop-protect.js index 5050605b9e..1452d9525d 100644 --- a/public/js/lib/loop-protect/loop-protect.js +++ b/public/js/lib/loop-protect/loop-protect.js @@ -20,6 +20,7 @@ if (typeof DEBUG === 'undefined') { DEBUG = true; } var reSingle = /\b(for|while|do)\b/; var labelRe = /\b([a-z_]{1}\w+:)/i; var comments = /(?:\/\*(?:[\s\S]*?)\*\/)|(?:([\s;])+\/\/(?:.*)$)/gm; + var loopTimeout = 500; var loopProtect = rewriteLoops; @@ -404,8 +405,7 @@ if (typeof DEBUG === 'undefined') { DEBUG = true; } } line.hit++; - if ((now - line.time) > 100) {//} && line.hit !== line.last+1) { - // We've spent over 100ms on this loop... smells infinite. + if ((now - line.time) > loopTimeout) {//} && line.hit !== line.last+1) { loopProtect.hit(state.line); // Returning true prevents the loop running again return true;