Bug 1151156 - remove unused b2g code in debugger-client onPacket;r=jryans draft
authorJulian Descottes <jdescottes@mozilla.com>
Wed, 13 Dec 2017 17:56:14 -0600
changeset 711704 dd90da67ebd3def595095f0445b6206ba7316a1b
parent 711347 7884508f508a65ab9ff9c05b64596b864aead881
child 711737 17d2e4be1891d4c20b81495a371da6a1546f3564
push id93111
push userjdescottes@mozilla.com
push dateThu, 14 Dec 2017 14:52:48 +0000
reviewersjryans
bugs1151156
milestone59.0a1
Bug 1151156 - remove unused b2g code in debugger-client onPacket;r=jryans MozReview-Commit-ID: IWyGUCKCFAM
devtools/server/actors/root.js
devtools/shared/client/debugger-client.js
--- a/devtools/server/actors/root.js
+++ b/devtools/server/actors/root.js
@@ -163,19 +163,16 @@ RootActor.prototype = {
     noBlackBoxing: false,
     noPrettyPrinting: false,
     // Whether the page style actor implements the getUsedFontFaces method
     // that returns the font faces used on a node
     getUsedFontFaces: true,
     // Trait added in Gecko 38, indicating that all features necessary for
     // grabbing allocations from the MemoryActor are available for the performance tool
     memoryActorAllocations: true,
-    // Added in Gecko 40, indicating that the backend isn't stupid about
-    // sending resumption packets on tab navigation.
-    noNeedToFakeResumptionOnNavigation: true,
     // Added in Firefox 40. Indicates that the backend supports registering custom
     // commands through the WebConsoleCommands API.
     webConsoleCommands: true,
     // Whether root actor exposes tab actors and access to any window.
     // If allowChromeProcess is true, you can:
     // * get a ChromeActor instance to debug chrome and any non-content
     //   resource via getProcess requests
     // * get a WindowActor instance to debug windows which could be chrome,
--- a/devtools/shared/client/debugger-client.js
+++ b/devtools/shared/client/debugger-client.js
@@ -905,30 +905,16 @@ DebuggerClient.prototype = {
 
     // Packets that indicate thread state changes get special treatment.
     if (packet.type in ThreadStateTypes &&
         this._clients.has(packet.from) &&
         typeof this._clients.get(packet.from)._onThreadState == "function") {
       this._clients.get(packet.from)._onThreadState(packet);
     }
 
-    // TODO: Bug 1151156 - Remove once Gecko 40 is on b2g-stable.
-    if (!this.traits.noNeedToFakeResumptionOnNavigation) {
-      // On navigation the server resumes, so the client must resume as well.
-      // We achieve that by generating a fake resumption packet that triggers
-      // the client's thread state change listeners.
-      if (packet.type == UnsolicitedNotifications.tabNavigated &&
-          this._clients.has(packet.from) &&
-          this._clients.get(packet.from).thread) {
-        let thread = this._clients.get(packet.from).thread;
-        let resumption = { from: thread._actor, type: "resumed" };
-        thread._onThreadState(resumption);
-      }
-    }
-
     // Only try to notify listeners on events, not responses to requests
     // that lack a packet type.
     if (packet.type) {
       this.emit(packet.type, packet);
     }
 
     if (activeRequest) {
       let emitReply = () => activeRequest.emit("json-reply", packet);