Index: lib/inspectorObserver.js |
=================================================================== |
--- a/lib/inspectorObserver.js |
+++ b/lib/inspectorObserver.js |
@@ -6,22 +6,31 @@ |
let InspectorObserver = |
{ |
init: function() |
{ |
let gDevTools; |
try |
{ |
- ({gDevTools} = Cu.import("resource:///modules/devtools/gDevTools.jsm", null)); |
+ // Firefox 44+ |
+ ({gDevTools} = Cu.import("resource://devtools/client/framework/gDevTools.jsm", null)); |
} |
- catch(e) |
+ catch (e) |
{ |
- // No developer tools or unsupported version - ignore. |
- return; |
+ try |
+ { |
+ // Older Firefox versions |
+ ({gDevTools} = Cu.import("resource:///modules/devtools/gDevTools.jsm", null)); |
+ } |
+ catch(e) |
+ { |
+ // No developer tools or unsupported version - ignore. |
+ return; |
+ } |
} |
gDevTools.on("inspector-ready", this.inspectorReady); |
onShutdown.add(function() |
{ |
gDevTools.off("inspector-ready", this.inspectorReady); |
}.bind(this)); |
}, |