[Pkg-mozext-commits] [firebug] 27/82: Some naming changes
David Prévot
taffit at moszumanska.debian.org
Mon Mar 31 22:45:38 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 91468d5c143e892b1592114a0eff89a5b77924e6
Author: Simon Lindholm <simon.lindholm10 at gmail.com>
Date: Sat Dec 29 17:41:45 2012 +0100
Some naming changes
---
.../content/firebug/console/closureInspector.js | 26 +++++++++++-----------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/extension/content/firebug/console/closureInspector.js b/extension/content/firebug/console/closureInspector.js
index 659ec2d..bbe9388 100644
--- a/extension/content/firebug/console/closureInspector.js
+++ b/extension/content/firebug/console/closureInspector.js
@@ -2,7 +2,8 @@
/*jshint esnext:true, es5:true, curly:false */
/*global FBTrace:true, Components:true, Proxy:true, define:true */
-// A note on terminology: here a "closure" is generally thought of as a container of "scopes".
+// A note on terminology: here a "closure"/"environment" is generally thought
+// of as a container of "scopes".
define([
"firebug/lib/object",
@@ -15,7 +16,6 @@ function(Obj, Firebug, Wrapper) {
// ********************************************************************************************* //
// Constants
-const Ci = Components.interfaces;
const Cu = Components.utils;
const ScopeProxy = function() {};
@@ -58,21 +58,21 @@ var ClosureInspector =
return dbg;
},
- getVariableOrOptimizedAway: function(env, name)
+ getVariableOrOptimizedAway: function(scope, name)
{
try
{
- var ret = env.getVariable(name);
+ var ret = scope.getVariable(name);
if (ret !== undefined)
return ret;
// The variable is either optimized away or actually set to undefined.
// Optimized-away ones are apparantly not settable, so try to detect
// them by that (it seems rather safe).
- env.setVariable(name, 0);
- if (env.getVariable(name) === undefined)
+ scope.setVariable(name, 0);
+ if (scope.getVariable(name) === undefined)
return OptimizedAway;
- env.setVariable(name, undefined);
+ scope.setVariable(name, undefined);
return undefined;
}
catch (exc)
@@ -104,9 +104,9 @@ var ClosureInspector =
return global._firebugUnwrappedDebuggerObject;
},
- scopeIsInteresting: function(env)
+ isScopeInteresting: function(scope)
{
- return !!env.parent;
+ return !!scope.parent;
},
getFunctionFromObject: function(obj)
@@ -152,7 +152,7 @@ var ClosureInspector =
for (var j = 0; j < toTest.length; ++j)
{
var f = toTest[j];
- if (f && f.environment && this.scopeIsInteresting(f.environment))
+ if (f && f.environment && this.isScopeInteresting(f.environment))
return f;
}
}
@@ -193,7 +193,7 @@ var ClosureInspector =
if (typeof obj === "object")
dobj = this.getFunctionFromObject(dobj);
- if (!dobj || !dobj.environment || !this.scopeIsInteresting(dobj.environment))
+ if (!dobj || !dobj.environment || !this.isScopeInteresting(dobj.environment))
throw new Error("missing closure");
return dobj.environment;
@@ -220,7 +220,7 @@ var ClosureInspector =
// defined through the console. Hide it for a nicer display.
break;
}
- if (!this.scopeIsInteresting(scope))
+ if (!this.isScopeInteresting(scope))
break;
ret.push.apply(ret, scope.names());
@@ -308,7 +308,7 @@ var ClosureInspector =
scope = Object.getPrototypeOf(obj).scope.parent;
else
scope = this.getEnvironmentForObject(win, obj, context);
- if (!scope || !this.scopeIsInteresting(scope))
+ if (!scope || !this.isScopeInteresting(scope))
return;
}
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