We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7e4997d commit 2fed4e3Copy full SHA for 2fed4e3
src/ecma-debugger/stop_at.js
@@ -47,16 +47,15 @@ cls.EcmascriptDebugger["6.0"].StopAt = function()
47
var reformat_condition =
48
[
49
"var MAX_LINE_LENGTH = 160;",
50
- "var re = /(?:\\n|$)/g;",
51
"var last = 0;",
52
- "var m = null;",
53
- "while (m = re.exec(scriptData))",
+ "var index = 0;",
+ "while ((index = scriptData.indexOf(\"\n\"), last) > -1)",
54
"{",
55
- " if (m.index - last > MAX_LINE_LENGTH)",
+ " if (index - last > MAX_LINE_LENGTH)",
56
" return true;",
57
- " last = m.index;",
+ " last = index + 1;",
58
"}",
59
- "return false;"
+ "return scriptData.length - last > MAX_LINE_LENGTH;"
60
].join("");
61
62
var self = this;
0 commit comments