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

Unified Diff: chrome/content/processScript.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
« no previous file with comments | « no previous file | lib/inspectorObserver.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/content/processScript.js
===================================================================
--- a/chrome/content/processScript.js
+++ b/chrome/content/processScript.js
@@ -2,18 +2,39 @@
* This Source Code is subject to the terms of the Mozilla Public License
* version 2.0 (the "License"). You can obtain a copy of the License at
* http://mozilla.org/MPL/2.0/.
*/
const Ci = Components.interfaces;
const Cu = Components.utils;
-let {console} = Cu.import("resource://gre/modules/devtools/Console.jsm", {});
-let {DebuggerServer} = Cu.import("resource://gre/modules/devtools/dbg-server.jsm", {});
+let console;
+try
+{
+ // Gecko 44+
+ ({console} = Cu.import("resource://gre/modules/Console.jsm", {}));
+}
+catch (e)
saroyanm 2016/04/21 12:24:13 According to our requirements page we are supporti
Wladimir Palant 2016/04/21 13:05:16 We encourage users to update to newer Firefox vers
+{
+ ({console} = Cu.import("resource://gre/modules/devtools/Console.jsm", {}));
+}
+
+let DebuggerServer;
+try
+{
+ // Firefox 44+
+ let {require} = Cu.import("resource://devtools/shared/Loader.jsm", {});
+ ({DebuggerServer} = require("devtools/server/main"));
+}
+catch (e)
+{
+ ({DebuggerServer} = Cu.import("resource://gre/modules/devtools/dbg-server.jsm", {}));
+}
+
let {Services} = Cu.import("resource://gre/modules/Services.jsm", {});
let processID = Services.appinfo.processID;
let maxNodeID = 0;
let nodes = new Map();
let name = "elemhidehelper";
let actor = {
« no previous file with comments | « no previous file | lib/inspectorObserver.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld