diff --git a/devtools/client/webconsole/test/browser_webconsole_console_trace_async.js b/devtools/client/webconsole/test/browser_webconsole_console_trace_async.js index 4f04ee5df61c..2d9f74666b5b 100644 --- a/devtools/client/webconsole/test/browser_webconsole_console_trace_async.js +++ b/devtools/client/webconsole/test/browser_webconsole_console_trace_async.js @@ -51,7 +51,7 @@ add_task(function* runTest() { }, { asyncCause: "promise callback", - columnNumber: 1, + columnNumber: 3, filename: TEST_URI, functionName: "time1", language: 2, diff --git a/dom/bindings/test/test_exception_options_from_jsimplemented.html b/dom/bindings/test/test_exception_options_from_jsimplemented.html index 1e77718a8e97..8a98a8fb63d5 100644 --- a/dom/bindings/test/test_exception_options_from_jsimplemented.html +++ b/dom/bindings/test/test_exception_options_from_jsimplemented.html @@ -20,7 +20,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1107592 /* Async parent frames from pushPrefEnv don't show up in e10s. */ var isE10S = !SpecialPowers.isMainProcess(); if (!isE10S && SpecialPowers.getBoolPref("javascript.options.asyncstack")) { - asyncFrame = `Async*@${file}:153:1 + asyncFrame = `Async*@${file}:153:3 `; } else { asyncFrame = ""; diff --git a/dom/bindings/test/test_promise_rejections_from_jsimplemented.html b/dom/bindings/test/test_promise_rejections_from_jsimplemented.html index daad01904324..187922474235 100644 --- a/dom/bindings/test/test_promise_rejections_from_jsimplemented.html +++ b/dom/bindings/test/test_promise_rejections_from_jsimplemented.html @@ -41,7 +41,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1107592 var isE10S = !SpecialPowers.isMainProcess(); var asyncStack = SpecialPowers.getBoolPref("javascript.options.asyncstack"); var ourFile = location.href; - var parentFrame = (asyncStack && !isE10S) ? `Async*@${ourFile}:121:1 + var parentFrame = (asyncStack && !isE10S) ? `Async*@${ourFile}:121:3 ` : ""; Promise.all([ diff --git a/js/src/jsscript.cpp b/js/src/jsscript.cpp index 7f69df123543..7f91978d2b5c 100644 --- a/js/src/jsscript.cpp +++ b/js/src/jsscript.cpp @@ -3243,21 +3243,17 @@ js::PCToLineNumber(unsigned startLine, jssrcnote* notes, jsbytecode* code, jsbyt ptrdiff_t target = pc - code; for (jssrcnote* sn = notes; !SN_IS_TERMINATOR(sn); sn = SN_NEXT(sn)) { offset += SN_DELTA(sn); - SrcNoteType type = (SrcNoteType) SN_TYPE(sn); - if (type == SRC_SETLINE) { - if (offset <= target) - lineno = unsigned(GetSrcNoteOffset(sn, 0)); - column = 0; - } else if (type == SRC_NEWLINE) { - if (offset <= target) - lineno++; - column = 0; - } - if (offset > target) break; - if (type == SRC_COLSPAN) { + SrcNoteType type = (SrcNoteType) SN_TYPE(sn); + if (type == SRC_SETLINE) { + lineno = unsigned(GetSrcNoteOffset(sn, 0)); + column = 0; + } else if (type == SRC_NEWLINE) { + lineno++; + column = 0; + } else if (type == SRC_COLSPAN) { ptrdiff_t colspan = SN_OFFSET_TO_COLSPAN(GetSrcNoteOffset(sn, 0)); MOZ_ASSERT(ptrdiff_t(column) + colspan >= 0); column += colspan;