[Pkg-mozext-commits] [firebug] 44/82: Hide __fb_scopedVars also in error message texts

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 e63a7a6816bae01c36ad4eeff79293ab453b7aa2
Author: Simon Lindholm <simon.lindholm10 at gmail.com>
Date:   Wed Jan 2 12:17:16 2013 +0100

    Hide __fb_scopedVars also in error message texts
---
 extension/content/firebug/console/commandLineExposed.js | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/extension/content/firebug/console/commandLineExposed.js b/extension/content/firebug/console/commandLineExposed.js
index 9050595..adb9f39 100644
--- a/extension/content/firebug/console/commandLineExposed.js
+++ b/extension/content/firebug/console/commandLineExposed.js
@@ -227,6 +227,11 @@ function createFirebugCommandLine(context, win)
                 // Lie and show the pre-transformed expression instead.
                 result.fileName = "data:," + encodeURIComponent(origExpr);
 
+                // The error message can also contain post-transform details about the
+                // source, but it's harder to lie about. Make it prettier, at least.
+                if (typeof result.message === "string")
+                    result.message = result.message.replace(/__fb_scopedVars\(/g, "<get closure>(");
+
                 if (!isXPCException)
                     result.name = exc.name;
             }

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