[Pkg-mozext-commits] [firebug] 02/17: Cope with renamed API evalInGlobal -> executeInGlobal (bug 1193583)

David Prévot taffit at moszumanska.debian.org
Fri Oct 30 19:16:18 UTC 2015


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

taffit pushed a commit to branch master
in repository firebug.

commit 34d4f1c3bb130d65c01830c2cac0d30bbf71d5ff
Author: Simon Lindholm <simon.lindholm10 at gmail.com>
Date:   Sat Aug 29 10:30:53 2015 +0200

    Cope with renamed API evalInGlobal -> executeInGlobal (bug 1193583)
---
 extension/content/firebug/console/commandLineExposed.js | 11 +++++++----
 extension/content/firebug/debugger/debuggerLib.js       |  4 +++-
 2 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/extension/content/firebug/console/commandLineExposed.js b/extension/content/firebug/console/commandLineExposed.js
index dbaa0e7..4b8ebe5 100644
--- a/extension/content/firebug/console/commandLineExposed.js
+++ b/extension/content/firebug/console/commandLineExposed.js
@@ -237,8 +237,8 @@ function evaluateInGlobal(context, win, expr, origExpr, onSuccess, onError, opti
 {
     var dbgGlobal = DebuggerLib.getInactiveDebuggeeGlobal(context, win);
     var evalMethod = options.noCmdLineAPI ?
-                     dbgGlobal.evalInGlobal :
-                     dbgGlobal.evalInGlobalWithBindings;
+                     (dbgGlobal.executeInGlobal || dbgGlobal.evalInGlobal) :
+                     (dbgGlobal.executeInGlobalWithBindings || dbgGlobal.evalInGlobalWithBindings);
 
     var args = [dbgGlobal, evalMethod, dbgGlobal];
     args.push.apply(args, arguments);
@@ -528,8 +528,11 @@ function executeInWindowContext(win, func, args, dbgGlobal)
     var code = "(function() { callback(); })";
     var bindings = Object.create(null);
     bindings.callback = dbgGlobal.makeDebuggeeValue(listener);
-    var listenerInWindow = dbgGlobal.evalInGlobalWithBindings(code, bindings)
-        .return.unsafeDereference();
+    var listenerInWindow = (
+            dbgGlobal.executeInGlobalWithBindings ?
+            dbgGlobal.executeInGlobalWithBindings(code, bindings) :
+            dbgGlobal.evalInGlobalWithBindings(code, bindings)
+        ).return.unsafeDereference();
 
     win.document.addEventListener("firebugCommandLine", listenerInWindow);
 
diff --git a/extension/content/firebug/debugger/debuggerLib.js b/extension/content/firebug/debugger/debuggerLib.js
index 4360ed9..a11b36a 100644
--- a/extension/content/firebug/debugger/debuggerLib.js
+++ b/extension/content/firebug/debugger/debuggerLib.js
@@ -552,7 +552,9 @@ DebuggerLib.breakNow = function(context)
         // but we might want to change what global to use here.
         var global = context.getCurrentGlobal();
         var dbgGlobal = this.getInactiveDebuggeeGlobal(context, global);
-        return dbgGlobal.evalInGlobal("debugger;");
+        return dbgGlobal.executeInGlobal ?
+            dbgGlobal.executeInGlobal("debugger;") :
+            dbgGlobal.evalInGlobal("debugger;");
     }
 };
 

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