Backed out changeset 60085ea6ff72 (bug 1543753) for causing debugger perma failures. CLOSED TREE
authorRazvan Maries <rmaries@mozilla.com>
Tue, 14 May 2019 03:20:20 +0300
changeset 532520 22a3a17e5a419109cb17d83d1803ae652145b6a7
parent 532519 3c5ff599ce3c6f922b8bb31f2344c199b82889e2
child 532521 f1c35e8e84f6218ea00f81fd5fd849cdd1fc79e5
push id11268
push usercsabou@mozilla.com
push dateTue, 14 May 2019 15:24:22 +0000
treeherdermozilla-beta@5fb7fcd568d6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1543753
milestone68.0a1
backs out60085ea6ff728115e1f61568702fd2348c15814d
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
Backed out changeset 60085ea6ff72 (bug 1543753) for causing debugger perma failures. CLOSED TREE
devtools/client/debugger/panel.js
devtools/client/debugger/src/reducers/sources.js
devtools/client/shared/view-source.js
--- a/devtools/client/debugger/panel.js
+++ b/devtools/client/debugger/panel.js
@@ -157,20 +157,16 @@ DebuggerPanel.prototype = {
     return this._actions.selectSourceURL(cx, url, { line, column });
   },
 
   selectSource(sourceId, line, column) {
     const cx = this._selectors.getContext(this._getState());
     return this._actions.selectSource(cx, sourceId, { line, column });
   },
 
-  canLoadSource(sourceId) {
-    return this._selectors.canLoadSource(this._getState(), sourceId);
-  },
-
   getSourceByActorId(sourceId) {
     return this._selectors.getSourceByActorId(this._getState(), sourceId);
   },
 
   getSourceByURL(sourceURL) {
     return this._selectors.getSourceByURL(this._getState(), sourceURL);
   },
 
--- a/devtools/client/debugger/src/reducers/sources.js
+++ b/devtools/client/debugger/src/reducers/sources.js
@@ -883,32 +883,16 @@ export function getSourceActorsForSource
   const actors = state.sources.actors[id];
   if (!actors) {
     return [];
   }
 
   return getSourceActors(state, actors);
 }
 
-export function canLoadSource(state: OuterState, sourceId: string) {
-  // Return false if we know that loadSourceText() will fail if called on this
-  // source. This is used to avoid viewing such sources in the debugger.
-  const source = getSource(state, sourceId);
-  if (!source) {
-    return false;
-  }
-
-  if (isOriginalSource(source)) {
-    return true;
-  }
-
-  const actors = getSourceActorsForSource(state, sourceId);
-  return actors.length != 0;
-}
-
 export function getBreakpointPositions(
   state: OuterState
 ): BreakpointPositionsMap {
   return state.sources.breakpointPositions;
 }
 
 export function getBreakpointPositionsForSource(
   state: OuterState,
--- a/devtools/client/shared/view-source.js
+++ b/devtools/client/shared/view-source.js
@@ -58,17 +58,17 @@ exports.viewSourceInDebugger = async fun
   sourceLine,
   sourceColumn,
   sourceId,
   reason = "unknown"
 ) {
   const dbg = await toolbox.loadTool("jsdebugger");
   const source =
     sourceId ? dbg.getSourceByActorId(sourceId) : dbg.getSourceByURL(sourceURL);
-  if (source && dbg.canLoadSource(source.id)) {
+  if (source) {
     await toolbox.selectTool("jsdebugger", reason);
     try {
       await dbg.selectSource(source.id, sourceLine, sourceColumn);
     } catch (err) {
       console.error("Failed to view source in debugger", err);
       return false;
     }
     return true;