Fix bug 928008 - Make inspector and style editor work for remote chrome windows. r=mconley
authorPhilipp Kewisch <mozilla@kewis.ch>
Thu, 17 Oct 2013 20:44:37 +0200
changeset 16861 71bcb1c5da5d0abb0f7adcf23c71fa2ffbfd864a
parent 16860 6e39f5e0dfd62bb512d4adb04ad83f1aed64ee2d
child 16862 853899c3a88cb639e93277cbaf14afc4593a455f
push id1074
push userbugzilla@standard8.plus.com
push dateMon, 03 Feb 2014 22:47:23 +0000
treeherdercomm-beta@6b791b5369ed [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmconley
bugs928008
Fix bug 928008 - Make inspector and style editor work for remote chrome windows. r=mconley
mail/components/devtools/content/dbg-messenger-overlay.js
mail/components/devtools/extension/bootstrap.js
--- a/mail/components/devtools/content/dbg-messenger-overlay.js
+++ b/mail/components/devtools/content/dbg-messenger-overlay.js
@@ -10,16 +10,20 @@ Components.utils.import("resource://gre/
  * remote-enabled preference of the debugger and starts the debugger if needed.
  */
 function toggleDebugger() {
   let shouldEnable = document.getElementById("devtoolsDebugger").getAttribute("checked") == "true";
   Services.prefs.setBoolPref("devtools.debugger.remote-enabled", shouldEnable);
 
   RemoteDebuggerServer.extraInit = function(DebuggerServer) {
     DebuggerServer.addActors("resource://gre/modules/XULRootActor.js");
+
+    // Bug 915444 - Devtools won't make style editor and inspector global, but we want it!
+    DebuggerServer.addGlobalActor(DebuggerServer.InspectorActor, "inspectorActor");
+    DebuggerServer.addGlobalActor(DebuggerServer.StyleEditorActor, "styleEditorActor");
   };
   RemoteDebuggerServer.startstop(shouldEnable);
 }
 
 /**
  * Intialize the checked state, to be used when the view menu is opened.
  */
 function initDebuggerToolsMenu() {
--- a/mail/components/devtools/extension/bootstrap.js
+++ b/mail/components/devtools/extension/bootstrap.js
@@ -14,16 +14,20 @@ function startup(aData, aReasion) {
   resource.setSubstitution("dbgserver", aData.resourceURI);
 
   // Load the debug server and start it if enabled.
   Cu.import("resource://dbgserver/modules/RemoteDebuggerServer.jsm");
   let remoteEnabled = Services.prefs.getBoolPref("devtools.debugger.remote-enabled");
 
   RemoteDebuggerServer.extraInit = function(DebuggerServer) {
     DebuggerServer.addActors("resource://dbgserver/modules/XULRootActor.js");
+
+    // Bug 915444 - Devtools won't make style editor and inspector global, but we want it!
+    DebuggerServer.addGlobalActor(DebuggerServer.InspectorActor, "inspectorActor");
+    DebuggerServer.addGlobalActor(DebuggerServer.StyleEditorActor, "styleEditorActor");
   };
   RemoteDebuggerServer.startstop(remoteEnabled);
 }
 
 function shutdown(aData, aReason) {
   if (aReason == APP_SHUTDOWN) return;
 
   // Make sure to stop the debug server on disable and uninstall