[Pkg-mozext-commits] [firebug] 52/82: Issue 6184: Closure Inspector: named function expression scopes are duplicated

David Prévot taffit at moszumanska.debian.org
Mon Mar 31 22:45:40 UTC 2014


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

taffit pushed a commit to tag fbtest-1.11.2
in repository firebug.

commit 09363af0f7a4d5dc8d2443b85ea260d5476afcbe
Author: Simon Lindholm <simon.lindholm10 at gmail.com>
Date:   Sun Jan 13 19:14:16 2013 +0100

    Issue 6184: Closure Inspector: named function expression scopes are duplicated
    
    http://code.google.com/p/fbug/issues/detail?id=6184
---
 extension/content/firebug/console/closureInspector.js | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/extension/content/firebug/console/closureInspector.js b/extension/content/firebug/console/closureInspector.js
index 1aaf94a..a124dea 100644
--- a/extension/content/firebug/console/closureInspector.js
+++ b/extension/content/firebug/console/closureInspector.js
@@ -358,6 +358,16 @@ var ClosureInspector =
             lazyCreateNames = function() {};
             names = scope.names();
 
+            // Due to weird Firefox behavior, we sometimes have to skip over duplicate
+            // scopes (see issue 6184).
+            if (names.length === 1 && scope.type === "declarative" &&
+                scope.parent && scope.parent.type === "declarative")
+            {
+                var par = scope.parent, parNames = par.names();
+                if (parNames.length === 1 && parNames[0] === names[0])
+                    scopeDataHolder.scope = scope = par;
+            }
+
             // "arguments" is almost always present and optimized away, so hide it
             // for a nicer display.
             var ind = names.indexOf("arguments");

-- 
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