Bug 1278553 - Switch Instantbird to use the Browser Console instead of the deprecated Error Console. r=aleth
authorPatrick Cloke <clokep@gmail.com>
Mon, 27 Jun 2016 16:41:49 -0400
changeset 25323 f6655db25f65079ad848a35dfc19fba1109f66f4
parent 25322 7ba75deff65acb944b7ee4ad85cb3f0ae746cc66
child 25324 8c9f1c7a0889ece32113b26b94350c766b099bb1
push id1725
push userclokep@gmail.com
push dateMon, 19 Sep 2016 17:35:08 +0000
treeherdercomm-beta@6ead1abf3817 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersaleth
bugs1278553
Bug 1278553 - Switch Instantbird to use the Browser Console instead of the deprecated Error Console. r=aleth
im/app/profile/all-instantbird.js
im/confvars.sh
im/content/menus.js
im/installer/package-manifest.in
--- a/im/app/profile/all-instantbird.js
+++ b/im/app/profile/all-instantbird.js
@@ -198,16 +198,21 @@ pref("browser.search.order.2",          
 pref("browser.search.update", true);
 
 // disable logging for the search service update system by default
 pref("browser.search.update.log", false);
 
 // Check whether we need to perform engine updates every 6 hours
 pref("browser.search.updateinterval", 6);
 
+// Developer Tools related preferences
+pref("devtools.debugger.log", false);
+pref("devtools.chrome.enabled", true);
+pref("devtools.selfxss.count", 5);
+
 // Blocklist preferences
 pref("extensions.blocklist.enabled", true);
 // Controls what level the blocklist switches from warning about items to forcibly
 // blocking them.
 pref("extensions.blocklist.level", 2);
 
 // Kinto blocklist preferences
 pref("services.kinto.update_enabled", false);
--- a/im/confvars.sh
+++ b/im/confvars.sh
@@ -18,8 +18,10 @@ MOZ_APP_VERSION=`cat $MOZ_APP_VERSION_TX
 INSTANTBIRD_VERSION=$MOZ_APP_VERSION
 
 MOZ_BRANDING_DIRECTORY=im/branding/nightly
 MOZ_OFFICIAL_BRANDING_DIRECTORY=other-licenses/branding/instantbird
 MOZ_APP_ID={33cb9019-c295-46dd-be21-8c4936574bee}
 # Enable generational GC on desktop.
 JSGC_GENERATIONAL=1
 NSS_EXTRA_SYMBOLS_FILE=../../../../chat/nss-purple.symbols
+
+MOZ_DEVTOOLS=all
--- a/im/content/menus.js
+++ b/im/content/menus.js
@@ -1,17 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 var addBuddyWindow = "chrome://instantbird/content/addbuddy.xul";
 var joinChatWindow = "chrome://instantbird/content/joinchat.xul";
 var aboutWindow = "chrome://instantbird/content/aboutDialog.xul";
-var errorConsoleWindow = "chrome://global/content/console.xul";
-var preferencesWindow = "chrome://instantbird/content/preferences/preferences.xul";
 
 if (!("Services" in window))
   Components.utils.import("resource:///modules/imServices.jsm");
 if (!("Core" in window))
   Components.utils.import("resource:///modules/ibCore.jsm");
 
 var menus = {
   supportsCommand: aCmd =>
@@ -52,18 +50,19 @@ var menus = {
     Core.showPreferences();
   },
 
   addons: function menu_addons() {
     Core.showAddons();
   },
 
   errors: function debug_errors() {
-    Core.showWindow("global:console", errorConsoleWindow, "Errors",
-                    "chrome,extrachrome,menubar,resizable,scrollbars,status,toolbar");
+    let { require } = Components.utils.import("resource://devtools/shared/Loader.jsm", {});
+    let HUDService = require("devtools/client/webconsole/hudservice");
+    HUDService.openBrowserConsoleOrFocus();
   },
 
   updates: function menu_updates() {
     Core.showUpdates();
   },
 
   displayUpdateStatus: function menu_displayUpdateStatus() {
     // copied from buildHelpMenu in mozilla/browser/base/content/utilityOverlay.js
--- a/im/installer/package-manifest.in
+++ b/im/installer/package-manifest.in
@@ -303,16 +303,19 @@
 
 ; misson control, autoconfig
 @RESPATH@/defaults/autoconfig/prefcalls.js
 @RESPATH@/components/autoconfig.xpt
 
 ; DevTools
 @RESPATH@/chrome/devtools@JAREXT@
 @RESPATH@/chrome/devtools.manifest
+@RESPATH@/@PREF_DIR@/devtools.js
+@RESPATH@/components/devtools-startup.manifest
+@RESPATH@/components/devtools-startup.js
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ; Base Package Files
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
 ; xpconnect
 @RESPATH@/components/xpconnect.xpt
 
@@ -626,18 +629,16 @@
 @RESPATH@/components/Push.js
 @RESPATH@/components/Push.manifest
 @RESPATH@/components/PushComponents.js
 @RESPATH@/components/contentAreaDropListener.js
 @RESPATH@/components/contentAreaDropListener.manifest
 @RESPATH@/components/PackagedAppUtils.manifest
 @RESPATH@/components/PackagedAppUtils.js
 @RESPATH@/components/directory.xpt
-@RESPATH@/components/jsconsole-clhandler.js
-@RESPATH@/components/jsconsole-clhandler.manifest
 @RESPATH@/components/layout_xul_tree.xpt
 @RESPATH@/components/mozfind.xpt
 @RESPATH@/components/mimetype.xpt
 @RESPATH@/components/parentalcontrols.xpt
 #ifdef MOZ_WEBRTC
 @RESPATH@/components/peerconnection.xpt
 #endif
 @RESPATH@/components/exthandler.xpt