[Pkg-mozext-commits] [firebug] 61/68: Properly load css-logic module

David Prévot taffit at moszumanska.debian.org
Mon Mar 31 22:45:55 UTC 2014


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

taffit pushed a commit to tag fbtest-1.11.4
in repository firebug.

commit 917a054dd36cefc2afe27c78c60b98c81c6dd7d1
Author: Jan Odvarko <odvarko at gmail.com>
Date:   Wed May 22 09:20:39 2013 +0200

    Properly load css-logic module
---
 extension/content/firebug/css/computedPanel.js | 28 ++++++++++++++++++++++++--
 1 file changed, 26 insertions(+), 2 deletions(-)

diff --git a/extension/content/firebug/css/computedPanel.js b/extension/content/firebug/css/computedPanel.js
index c30cae0..41e998f 100644
--- a/extension/content/firebug/css/computedPanel.js
+++ b/extension/content/firebug/css/computedPanel.js
@@ -32,14 +32,38 @@ const Cu = Components.utils;
 
 const statusClasses = ["cssUnmatched", "cssParentMatch", "cssOverridden", "cssBestMatch"];
 
+//xxxHonza: shell we move this mess to lib?
 try
 {
+    // Firefox 22
+    // xxxHonza: broken by: https://bugzilla.mozilla.org/show_bug.cgi?id=855914
     Cu.import("resource:///modules/devtools/CssLogic.jsm");
 }
 catch (err)
 {
-    if (FBTrace.DBG_ERRORS)
-        FBTrace.sysout("cssComputedPanel: EXCEPTION CssLogic is not available!");
+    try
+    {
+        // Firefox 23
+        var scope = {}
+        Cu.import("resource:///modules/devtools/gDevTools.jsm", scope);
+        var {CssLogic} = scope.devtools.require("devtools/styleinspector/css-logic");
+    }
+    catch (err)
+    {
+        try
+        {
+            // Firefox 24
+            // waiting for: https://bugzilla.mozilla.org/show_bug.cgi?id=867595
+            var scope = {}
+            Cu.import("resource://gre/modules/devtools/Loader.jsm", scope);
+            var {CssLogic} = scope.devtools.require("devtools/styleinspector/css-logic");
+        }
+        catch (e)
+        {
+            if (FBTrace.DBG_ERRORS)
+                FBTrace.sysout("cssComputedPanel: EXCEPTION CssLogic is not available! " + e, e);
+        }
+    }
 }
 
 // ********************************************************************************************* //

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