Bug 1518777 - move webConsoleClient.detach to destroy; r=ochameau
authoryulia <ystartsev@mozilla.com>
Thu, 24 Jan 2019 11:50:36 +0000
changeset 515281 b9058c98eccb3427fec10fcfea7f87482ea33490
parent 515280 e7cd613e6bfb2423c7ba506826524bb45c49d462
child 515282 c150452665f1a1f5c2d2aa3ec2fb2650b083ca32
push id1953
push userffxbld-merge
push dateMon, 11 Mar 2019 12:10:20 +0000
treeherdermozilla-release@9c35dcbaa899 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersochameau
bugs1518777
milestone66.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 1518777 - move webConsoleClient.detach to destroy; r=ochameau Differential Revision: https://phabricator.services.mozilla.com/D16681
devtools/shared/client/debugger-client.js
devtools/shared/webconsole/client.js
--- a/devtools/shared/client/debugger-client.js
+++ b/devtools/shared/client/debugger-client.js
@@ -324,16 +324,21 @@ DebuggerClient.prototype = {
         // All clients detached.
         cleanup();
         return;
       }
       if (client.detach) {
         client.detach(detachClients);
         return;
       }
+      if (client.destroy) {
+        client.destroy();
+        detachClients();
+        return;
+      }
       detachClients();
     };
     detachClients();
 
     return deferred.promise;
   },
 
   /**
--- a/devtools/shared/webconsole/client.js
+++ b/devtools/shared/webconsole/client.js
@@ -696,30 +696,29 @@ WebConsoleClient.prototype = {
   },
 
   /**
    * Close the WebConsoleClient.
    *
    * @param function onResponse
    *        Function to invoke when the server response is received.
    */
-  detach: function(onResponse) {
+  destroy: function() {
     this._client.removeListener("evaluationResult", this.onEvaluationResult);
     this._client.removeListener("networkEvent", this.onNetworkEvent);
     this._client.removeListener("networkEventUpdate",
                                 this.onNetworkEventUpdate);
     this._client.removeListener("inspectObject", this.onInspectObject);
     this._client.removeListener("documentEvent", this.onDocEvent);
     this._longStrings = null;
     this._client = null;
     this.pendingEvaluationResults.clear();
     this.pendingEvaluationResults = null;
     this.clearNetworkRequests();
     this._networkRequests = null;
-    onResponse();
   },
 
   clearNetworkRequests: function() {
     this._networkRequests.clear();
   },
 
   /**
    * Fetches the full text of a LongString.