[Pkg-mozext-commits] [firebug] 05/16: #7961 Stack traces broken by bug 863089

David Prévot taffit at moszumanska.debian.org
Sun Feb 7 19:14:47 UTC 2016


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository firebug.

commit de15ffbe40b5027ffa1aa0c93632e2fd4ae529f7
Author: Jan Odvarko <odvarko at gmail.com>
Date:   Wed Nov 4 13:25:21 2015 +0100

    #7961 Stack traces broken by bug 863089
---
 extension/content/firebug/console/errorStackTraceObserver.js | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/extension/content/firebug/console/errorStackTraceObserver.js b/extension/content/firebug/console/errorStackTraceObserver.js
index 92c19aa..f42445d 100644
--- a/extension/content/firebug/console/errorStackTraceObserver.js
+++ b/extension/content/firebug/console/errorStackTraceObserver.js
@@ -154,9 +154,17 @@ var ErrorStackTraceObserver = Obj.extend(Module,
             if (!sourceFile)
                 sourceFile = {href: script.url};
 
-            var line = script.getOffsetLocation(state.offsets[i]).lineNumber;
-            var args = state.argCopies[i];
+            var line;
+
+            // getOffsetLocation has been introduced in Firefox 44 (Fx44)
+            // https://bugzilla.mozilla.org/show_bug.cgi?id=863089
+            // https://github.com/firebug/firebug/issues/7961
+            if (typeof script.getOffsetLocation == "function")
+                line = script.getOffsetLocation(state.offsets[i]).lineNumber;
+            else
+                line = script.getOffsetLine(state.offsets[i]);
 
+            var args = state.argCopies[i];
             var stackFrame = new StackFrame(sourceFile, line, state.frameNames[i],
                 args, null, 0, context);
             trace.frames.push(stackFrame);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/firebug.git



More information about the Pkg-mozext-commits mailing list