Backed out changesets 84899036528a and 620464bdbdff (bug 1300036) for browser_dbg_pretty-print-11.js timeouts.
authorRyan VanderMeulen <ryanvm@gmail.com>
Tue, 27 Sep 2016 22:16:02 -0400
changeset 350444 ab97d0cfa0a34814b2e6f5ed0c0ba67cd6c81c75
parent 350443 fde985997af66449563b52413832d77d02d475c7
child 350445 5eb0a600c3917cab96f6e31f3dcc66d99dccddc0
push id1230
push userjlund@mozilla.com
push dateMon, 31 Oct 2016 18:13:35 +0000
treeherdermozilla-release@5e06e3766db2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1300036
milestone50.0
backs out84899036528a2504b2da757c25f1d79bebf0c6b5
620464bdbdfff5eeea1eb2b1194934cecb879c54
Backed out changesets 84899036528a and 620464bdbdff (bug 1300036) for browser_dbg_pretty-print-11.js timeouts.
devtools/client/debugger/test/mochitest/browser_dbg_breakpoints-reload.js
devtools/client/debugger/test/mochitest/browser_dbg_location-changes-03-new.js
devtools/client/debugger/test/mochitest/browser_dbg_pretty-print-11.js
devtools/server/actors/script.js
devtools/shared/client/main.js
--- a/devtools/client/debugger/test/mochitest/browser_dbg_breakpoints-reload.js
+++ b/devtools/client/debugger/test/mochitest/browser_dbg_breakpoints-reload.js
@@ -22,18 +22,19 @@ var test = Task.async(function* () {
 
   const sources = panel.panelWin.DebuggerView.Sources;
   yield actions.addBreakpoint({
     actor: sources.selectedValue,
     line: 10 // "break on me" string
   });
 
   const paused = waitForThreadEvents(panel, "paused");
-  yield reloadActiveTab(panel, panel.panelWin.EVENTS.SOURCE_SHOWN);
+  reloadActiveTab(panel);
   const packet = yield paused;
 
   is(packet.why.type, "breakpoint",
      "Should have hit the breakpoint after the reload");
   is(packet.frame.where.line, 10,
      "Should have stopped at line 10, where we set the breakpoint");
 
+  yield waitForDebuggerEvents(panel, panel.panelWin.EVENTS.SOURCE_SHOWN);
   yield resumeDebuggerThenCloseAndFinish(panel);
 });
--- a/devtools/client/debugger/test/mochitest/browser_dbg_location-changes-03-new.js
+++ b/devtools/client/debugger/test/mochitest/browser_dbg_location-changes-03-new.js
@@ -27,17 +27,17 @@ function test() {
 
     Task.spawn(function* () {
       let onCaretUpdated = waitForCaretUpdated(gPanel, 14);
       callInTab(gTab, "simpleCall");
       yield onCaretUpdated;
 
       const startedLoading = waitForNextDispatch(gDebugger.DebuggerController,
                                                  constants.LOAD_SOURCE_TEXT);
-      navigateActiveTabTo(gPanel, TAB_URL_2, gDebugger.EVENTS.SOURCE_SHOWN);
+      navigateActiveTabTo(gPanel, TAB_URL_2);
       yield startedLoading;
 
       isnot(gDebugger.gThreadClient.state, "paused",
             "Should not be paused after a tab navigation.");
       is(gFrames.itemCount, 0,
          "Should have no frames.");
       is(gSources.itemCount, 1,
          "Found the expected number of entries in the sources widget.");
--- a/devtools/client/debugger/test/mochitest/browser_dbg_pretty-print-11.js
+++ b/devtools/client/debugger/test/mochitest/browser_dbg_pretty-print-11.js
@@ -26,18 +26,18 @@ function test() {
     gSources = gDebugger.DebuggerView.Sources;
 
     testSourceIsUgly();
     const finished = waitForCaretUpdated(gPanel, 7);
     clickPrettyPrintButton();
     finished.then(testSourceIsPretty)
       .then(() => {
         const finished = waitForCaretUpdated(gPanel, 7);
-        const reloaded = reloadActiveTab(gPanel, gDebugger.EVENTS.SOURCE_SHOWN);
-        return Promise.all([finished, reloaded]);
+        reloadActiveTab(gPanel);
+        return finished;
       })
       .then(testSourceIsPretty)
       .then(() => resumeDebuggerThenCloseAndFinish(gPanel))
       .then(null, aError => {
         ok(false, "Got an error: " + DevToolsUtils.safeErrorString(aError));
       });
   });
 }
--- a/devtools/server/actors/script.js
+++ b/devtools/server/actors/script.js
@@ -977,18 +977,17 @@ const ThreadActor = ActorClassWithSpec(t
   /**
    * Handle a protocol request to resume execution of the debuggee.
    */
   onResume: function (aRequest) {
     if (this._state !== "paused") {
       return {
         error: "wrongState",
         message: "Can't resume when debuggee isn't paused. Current state is '"
-          + this._state + "'",
-        state: this._state
+          + this._state + "'"
       };
     }
 
     // In case of multiple nested event loops (due to multiple debuggers open in
     // different tabs or multiple debugger clients connected to the same tab)
     // only allow resumption in a LIFO order.
     if (this._nestedEventLoops.size && this._nestedEventLoops.lastPausedUrl
         && (this._nestedEventLoops.lastPausedUrl !== this._parent.url
--- a/devtools/shared/client/main.js
+++ b/devtools/shared/client/main.js
@@ -139,18 +139,17 @@ function eventSource(aProto) {
 
 /**
  * Set of protocol messages that affect thread state, and the
  * state the actor is in after each message.
  */
 const ThreadStateTypes = {
   "paused": "paused",
   "resumed": "attached",
-  "detached": "detached",
-  "running": "attached"
+  "detached": "detached"
 };
 
 /**
  * Set of protocol messages that are sent by the server without a prior request
  * by the client.
  */
 const UnsolicitedNotifications = {
   "consoleAPICall": "consoleAPICall",
@@ -1730,42 +1729,34 @@ ThreadClient.prototype = {
     type: "resume",
     resumeLimit: args(0)
   }, {
     before: function (aPacket) {
       this._assertPaused("resume");
 
       // Put the client in a tentative "resuming" state so we can prevent
       // further requests that should only be sent in the paused state.
-      this._previousState = this._state;
       this._state = "resuming";
 
       if (this._pauseOnExceptions) {
         aPacket.pauseOnExceptions = this._pauseOnExceptions;
       }
       if (this._ignoreCaughtExceptions) {
         aPacket.ignoreCaughtExceptions = this._ignoreCaughtExceptions;
       }
       if (this._pauseOnDOMEvents) {
         aPacket.pauseOnDOMEvents = this._pauseOnDOMEvents;
       }
       return aPacket;
     },
     after: function (aResponse) {
-      if (aResponse.error && this._state == "resuming") {
-        // There was an error resuming, update the state to the new one
-        // reported by the server, if given (only on wrongState), otherwise
-        // reset back to the previous state.
-        if (aResponse.state) {
-          this._state = ThreadStateTypes[aResponse.state];
-        } else {
-          this._state = this._previousState;
-        }
+      if (aResponse.error) {
+        // There was an error resuming, back to paused state.
+        this._state = "paused";
       }
-      delete this._previousState;
       return aResponse;
     },
   }),
 
   /**
    * Reconfigure the thread actor.
    *
    * @param object aOptions