Bug 1528276 - Set DebuggerServer.keepAlive for RemoteDebugger and GeckoViewRemoteDebugger;r=ochameau
authorJulian Descottes <jdescottes@mozilla.com>
Wed, 27 Feb 2019 17:09:05 +0000
changeset 519408 de6dc58f6f51caf627274eef936c7dbd2df69823
parent 519407 64aa07723c846dc9927b3e259fa2006854e1a071
child 519409 169c6e292149904e7e1afb3456cb7b8ba253500c
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersochameau
bugs1528276
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1528276 - Set DebuggerServer.keepAlive for RemoteDebugger and GeckoViewRemoteDebugger;r=ochameau Depends on D20831 Differential Revision: https://phabricator.services.mozilla.com/D20832
mobile/android/chrome/content/RemoteDebugger.js
mobile/android/modules/geckoview/GeckoViewRemoteDebugger.jsm
--- a/mobile/android/chrome/content/RemoteDebugger.js
+++ b/mobile/android/chrome/content/RemoteDebugger.js
@@ -210,16 +210,18 @@ var RemoteDebugger = {
     // Add browser and Fennec specific actors
     DebuggerServer.registerAllActors();
     const { createRootActor } = require("resource://gre/modules/dbg-browser-actors.js");
     DebuggerServer.setRootActor(createRootActor);
 
     // Allow debugging of chrome for any process
     DebuggerServer.allowChromeProcess = true;
     DebuggerServer.chromeWindowType = this._windowType;
+    // Force the Server to stay alive even if there are no connections at the moment.
+    DebuggerServer.keepAlive = true;
   },
 };
 
 RemoteDebugger.allowConnection =
   RemoteDebugger.allowConnection.bind(RemoteDebugger);
 RemoteDebugger.receiveOOB =
   RemoteDebugger.receiveOOB.bind(RemoteDebugger);
 
--- a/mobile/android/modules/geckoview/GeckoViewRemoteDebugger.jsm
+++ b/mobile/android/modules/geckoview/GeckoViewRemoteDebugger.jsm
@@ -75,16 +75,18 @@ var GeckoViewRemoteDebugger = {
 
     debug `onEnable`;
     DebuggerServer.init();
     DebuggerServer.registerAllActors();
     const { createRootActor } = require("resource://gre/modules/dbg-browser-actors.js");
     DebuggerServer.setRootActor(createRootActor);
     DebuggerServer.allowChromeProcess = true;
     DebuggerServer.chromeWindowType = "navigator:geckoview";
+    // Force the Server to stay alive even if there are no connections at the moment.
+    DebuggerServer.keepAlive = true;
 
     // Socket address for USB remote debugger expects
     // @ANDROID_PACKAGE_NAME/firefox-debugger-socket.
     // In /proc/net/unix, it will be outputed as
     // @org.mozilla.geckoview_example/firefox-debugger-socket
     //
     // If package name isn't available, it will be "@firefox-debugger-socket".