[Pkg-mozext-commits] [firebug] 50/82: Don't do anything risky to "object" scopes either

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 7a2a9b0323dbf4baa1e5148f8ee23c25d4398d1b
Author: Simon Lindholm <simon.lindholm10 at gmail.com>
Date:   Fri Jan 4 16:57:35 2013 +0100

    Don't do anything risky to "object" scopes either
---
 .../content/firebug/console/closureInspector.js    | 24 ++++++++++------------
 1 file changed, 11 insertions(+), 13 deletions(-)

diff --git a/extension/content/firebug/console/closureInspector.js b/extension/content/firebug/console/closureInspector.js
index 831af93..1aaf94a 100644
--- a/extension/content/firebug/console/closureInspector.js
+++ b/extension/content/firebug/console/closureInspector.js
@@ -65,19 +65,17 @@ var ClosureInspector =
             if (ret !== undefined)
                 return ret;
 
-            // With scopes are based on real objects - don't try anything fancy.
-            // (Object properties probably don't get optimized away anyway, and
-            // "with" tends to inhibit optimizations).
-            if (scope.type === "with")
-                return undefined;
-
-            // The variable is either optimized away or actually set to undefined.
-            // Optimized-away ones are apparently not settable, so try to detect
-            // them by that (it seems rather safe).
-            scope.setVariable(name, 0);
-            if (scope.getVariable(name) === undefined)
-                return OptimizedAway;
-            scope.setVariable(name, undefined);
+            if (scope.type === "declarative")
+            {
+                // The variable is either optimized away or actually set to
+                // undefined. Optimized-away ones are apparently not settable,
+                // so try to detect them by that (it seems rather safe).
+                scope.setVariable(name, 0);
+                if (scope.getVariable(name) === undefined)
+                    return OptimizedAway;
+                scope.setVariable(name, undefined);
+            }
+
             return undefined;
         }
         catch (exc)

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