[Pkg-mozext-commits] [firebug] 41/82: Hide stacks in all the cases...
David Prévot
taffit at moszumanska.debian.org
Mon Mar 31 22:45:39 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 6f22a09564373dade2dd6af6796ef1b0dae20a0b
Author: Simon Lindholm <simon.lindholm10 at gmail.com>
Date: Wed Jan 2 00:26:42 2013 +0100
Hide stacks in all the cases...
---
extension/content/firebug/console/closureInspector.js | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/extension/content/firebug/console/closureInspector.js b/extension/content/firebug/console/closureInspector.js
index 857eba1..bcbc255 100644
--- a/extension/content/firebug/console/closureInspector.js
+++ b/extension/content/firebug/console/closureInspector.js
@@ -235,6 +235,14 @@ var ClosureInspector =
getClosureWrapper: function(obj, win, context)
{
+ function throwUserError(exc)
+ {
+ // Throw an exception into user-land, where we hope it lands
+ // safely in commandLineExposed.js for internals to be hidden.
+ exc._dropFrames = true;
+ throw exc;
+ }
+
var env, dbg, dglobal;
try
{
@@ -245,10 +253,7 @@ var ClosureInspector =
}
catch (exc)
{
- // Throw our exception into user-land, and hope it lands safely in
- // commandLineExposed.js where internals can be hidden.
- exc._dropFrames = true;
- throw exc;
+ throwUserError(exc);
}
// Return a wrapper for its scoped variables.
@@ -298,9 +303,9 @@ var ClosureInspector =
var dvalue = dglobal.makeDebuggeeValue(value);
var scope = env.find(name);
if (!scope)
- throw new Error("can't create new closure variable");
+ throwUserError(new Error("can't create new closure variable"));
if (self.getVariableOrOptimizedAway(scope, name) === OptimizedAway)
- throw new Error("can't set optimized-away closure variable");
+ throwUserError(new Error("can't set optimized-away closure variable"));
scope.setVariable(name, dvalue);
}
};
--
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