[Pkg-mozext-commits] [firebug] 09/21: GCLI API has changed, avoid exception + comments (related to #7930)

David Prévot taffit at moszumanska.debian.org
Tue Sep 15 16:17:06 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 93c61364e41bdd06ecf29a12ac01b36a2e4793b5
Author: Jan Odvarko <odvarko at gmail.com>
Date:   Thu Aug 6 12:53:09 2015 +0200

    GCLI API has changed, avoid exception + comments (related to #7930)
---
 extension/modules/gcli.js | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/extension/modules/gcli.js b/extension/modules/gcli.js
index 6b8827a..58d2d33 100644
--- a/extension/modules/gcli.js
+++ b/extension/modules/gcli.js
@@ -123,10 +123,23 @@ var commands = [];
 
 function addCommand(command)
 {
+    // API for registering GCLI commands has changed in Firefox 42
+    // The new API are not supported at the moment.
+    // Some pointers:
+    // All modules in
+    // https://dxr.mozilla.org/mozilla-central/source/toolkit/devtools/gcli/commands
+    // export their items, for example:
+    // https://dxr.mozilla.org/mozilla-central/source/toolkit/devtools/gcli/commands/cookie.js#54
+    // And the code that does most of the loading for built-in commands is:
+    // https://dxr.mozilla.org/mozilla-central/source/toolkit/devtools/gcli/commands/index.js
+    // Test with a helper API:
+    // https://dxr.mozilla.org/mozilla-central/source/browser/devtools/commandline/test/helpers.js#469
+
     if (scope.gcli.addCommand)
         scope.gcli.addCommand(command);
-    else
+    else if (scope.gcli.addItems)
         scope.gcli.addItems([command]);
+
     commands.push(command);
 }
 

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