Bug 1544436 - The secondary pane should not open when paused. r=davidwalsh
☠☠ backed out by 9c2a65500d3a ☠ ☠
authorJason Laster <jlaster@mozilla.com>
Mon, 15 Apr 2019 16:47:39 +0000
changeset 469528 f057b78337e7
parent 469527 8ea3101cfbad
child 469529 82ec6a86a2bc
push id35873
push userccoroiu@mozilla.com
push dateMon, 15 Apr 2019 21:36:26 +0000
treeherdermozilla-central@b8f49a14c458 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdavidwalsh
bugs1544436
milestone68.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 1544436 - The secondary pane should not open when paused. r=davidwalsh Differential Revision: https://phabricator.services.mozilla.com/D27518
devtools/client/debugger/src/actions/pause/paused.js
devtools/client/debugger/src/utils/sources-tree/addToTree.js
devtools/client/debugger/src/utils/sources-tree/createTree.js
devtools/client/debugger/src/utils/sources-tree/tests/addToTree.spec.js
devtools/client/debugger/src/utils/sources-tree/updateTree.js
--- a/devtools/client/debugger/src/actions/pause/paused.js
+++ b/devtools/client/debugger/src/actions/pause/paused.js
@@ -2,25 +2,23 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
 
 // @flow
 import {
   getHiddenBreakpoint,
   isEvaluatingExpression,
   getSelectedFrame,
-  wasStepping,
   getThreadContext
 } from "../../selectors";
 
 import { mapFrames } from ".";
 import { removeBreakpoint } from "../breakpoints";
 import { evaluateExpressions } from "../expressions";
 import { selectLocation } from "../sources";
-import { togglePaneCollapse } from "../ui";
 import assert from "../../utils/assert";
 
 import { fetchScopes } from "./fetchScopes";
 
 import type { Pause } from "../../types";
 import type { ThunkArgs } from "../types";
 
 /**
@@ -55,20 +53,16 @@ export function paused(pauseInfo: Pause)
 
     await dispatch(mapFrames(cx));
 
     const selectedFrame = getSelectedFrame(getState(), thread);
     if (selectedFrame) {
       await dispatch(selectLocation(cx, selectedFrame.location));
     }
 
-    if (!wasStepping(getState(), thread)) {
-      dispatch(togglePaneCollapse("end", false));
-    }
-
     await dispatch(fetchScopes(cx));
 
     // Run after fetching scoping data so that it may make use of the sourcemap
     // expression mappings for local variables.
     const atException = why.type == "exception";
     if (!atException || !isEvaluatingExpression(getState(), thread)) {
       await dispatch(evaluateExpressions(cx));
     }
--- a/devtools/client/debugger/src/utils/sources-tree/addToTree.js
+++ b/devtools/client/debugger/src/utils/sources-tree/addToTree.js
@@ -152,18 +152,17 @@ function addSourceToNode(
 
 /**
  * @memberof utils/sources-tree
  * @static
  */
 export function addToTree(
   tree: TreeDirectory,
   source: Source,
-  debuggeeHost: ?string,
-  projectRoot: string
+  debuggeeHost: ?string
 ) {
   const url = getURL(source, debuggeeHost);
 
   if (isInvalidUrl(url, source)) {
     return;
   }
 
   const finalNode = traverseTree(url, tree, debuggeeHost);
--- a/devtools/client/debugger/src/utils/sources-tree/createTree.js
+++ b/devtools/client/debugger/src/utils/sources-tree/createTree.js
@@ -9,27 +9,26 @@ import { collapseTree } from "./collapse
 import { createDirectoryNode, createParentMap } from "./utils";
 import { getDomain } from "./treeOrder";
 
 import type { SourcesMap } from "../../reducers/types";
 import type { TreeDirectory } from "./types";
 
 type Params = {
   sources: SourcesMap,
-  debuggeeUrl: string,
-  projectRoot: string
+  debuggeeUrl: string
 };
 
-export function createTree({ sources, debuggeeUrl, projectRoot }: Params) {
+export function createTree({ sources, debuggeeUrl }: Params) {
   const uncollapsedTree = createDirectoryNode("root", "", []);
   const debuggeeHost = getDomain(debuggeeUrl);
 
   for (const sourceId in sources) {
     const source = sources[sourceId];
-    addToTree(uncollapsedTree, source, debuggeeHost, projectRoot);
+    addToTree(uncollapsedTree, source, debuggeeHost);
   }
 
   const sourceTree = collapseTree((uncollapsedTree: TreeDirectory));
 
   return {
     uncollapsedTree,
     sourceTree,
     parentMap: createParentMap(sourceTree)
--- a/devtools/client/debugger/src/utils/sources-tree/tests/addToTree.spec.js
+++ b/devtools/client/debugger/src/utils/sources-tree/tests/addToTree.spec.js
@@ -101,16 +101,17 @@ describe("sources-tree", () => {
       const source1 = makeMockSource(
         `https://example.com/foo/${sourceName}`,
         "actor1"
       );
 
       const tree = createDirectoryNode("root", "", []);
 
       addToTree(tree, source1, "http://example.com/", "");
+      console.log(formatTree(tree));
       expect(formatTree(tree)).toMatchSnapshot();
     });
 
     it("does not attempt to add two of the same directory", () => {
       const sources = [
         {
           id: "server1.conn13.child1/39",
           url: "https://davidwalsh.name/wp-content/prism.js"
--- a/devtools/client/debugger/src/utils/sources-tree/updateTree.js
+++ b/devtools/client/debugger/src/utils/sources-tree/updateTree.js
@@ -29,25 +29,24 @@ type Params = {
   debuggeeUrl: string,
   projectRoot: string
 };
 
 export function updateTree({
   newSources,
   prevSources,
   debuggeeUrl,
-  projectRoot,
   uncollapsedTree,
   sourceTree
 }: Params) {
   const newSet = newSourcesSet(newSources, prevSources);
   const debuggeeHost = getDomain(debuggeeUrl);
 
   for (const source of newSet) {
-    addToTree(uncollapsedTree, source, debuggeeHost, projectRoot);
+    addToTree(uncollapsedTree, source, debuggeeHost);
   }
 
   const newSourceTree = collapseTree(uncollapsedTree);
 
   return {
     uncollapsedTree,
     sourceTree: newSourceTree,
     parentMap: createParentMap(newSourceTree)