Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/inspectorObserver.js

Issue 29340697: Issue 3962 - Update developer tools module paths in Element Hiding Helper (Closed)
Patch Set: Created April 20, 2016, 5:53 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« chrome/content/processScript.js ('K') | « chrome/content/processScript.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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));
},
« chrome/content/processScript.js ('K') | « chrome/content/processScript.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld