Backout b82653e56ec9 (bug 1128027). r=bgrins a=lsblakk
authorJ. Ryan Stinnett <jryans@gmail.com>
Sun, 01 Mar 2015 19:08:00 -0600
changeset 250134 85ca6f646762
parent 250133 eed281422403
child 250135 21120474140d
push id4511
push userjryans@gmail.com
push date2015-03-02 01:11 +0000
treeherdermozilla-beta@e49cd895e078 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbgrins, lsblakk
bugs1128027
milestone37.0
backs outb82653e56ec9
Backout b82653e56ec9 (bug 1128027). r=bgrins a=lsblakk
toolkit/devtools/server/protocol.js
--- a/toolkit/devtools/server/protocol.js
+++ b/toolkit/devtools/server/protocol.js
@@ -1104,19 +1104,18 @@ let Front = Class({
       this.form(form, detail, context);
     }
   },
 
   destroy: function() {
     // Reject all outstanding requests, they won't make sense after
     // the front is destroyed.
     while (this._requests && this._requests.length > 0) {
-      let { deferred, to, type } = this._requests.shift();
-      deferred.reject(new Error("Connection closed, pending request to " + to +
-                                ", type " + type + " failed"));
+      let deferred = this._requests.shift();
+      deferred.reject(new Error("Connection closed, pending request not sent"));
     }
     Pool.prototype.destroy.call(this);
     this.actorID = null;
   },
 
   manage: function(front) {
     if (!front.actorID) {
       throw new Error("Can't manage front without an actor ID.\n" +
@@ -1153,23 +1152,17 @@ let Front = Class({
     }
   },
 
   /**
    * Send a two-way request on the connection.
    */
   request: function(packet) {
     let deferred = promise.defer();
-    // Save packet basics for debugging
-    let { to, type } = packet;
-    this._requests.push({
-      deferred,
-      to: to || this.actorID,
-      type
-    });
+    this._requests.push(deferred);
     this.send(packet);
     return deferred.promise;
   },
 
   /**
    * Handler for incoming packets from the client's actor.
    */
   onPacket: function(packet) {
@@ -1195,17 +1188,17 @@ let Front = Class({
     // Remaining packets must be responses.
     if (this._requests.length === 0) {
       let msg = "Unexpected packet " + this.actorID + ", " + JSON.stringify(packet);
       let err = Error(msg);
       console.error(err);
       throw err;
     }
 
-    let { deferred } = this._requests.shift();
+    let deferred = this._requests.shift();
     if (packet.error) {
       // "Protocol error" is here to avoid TBPL heuristics. See also
       // https://mxr.mozilla.org/webtools-central/source/tbpl/php/inc/GeneralErrorFilter.php
       let message;
       if (packet.error && packet.message) {
         message = "Protocol error (" + packet.error + "): " + packet.message;
       } else {
         message = packet.error;