Bug 1541631 - Part 6: Remove unused action return values. r=jlast
☠☠ backed out by db9aaec44445 ☠ ☠
authorLogan Smyth <loganfsmyth@gmail.com>
Thu, 15 Aug 2019 16:28:51 +0000
changeset 488270 6db731f26958d5f6ab2f6b3166a3d77e4cfeacaa
parent 488269 9f928da98d32a29631d35fd6787c6c36bb038bef
child 488271 696e24030686ebe58588d5415b932077a6af0c11
push id113906
push userncsoregi@mozilla.com
push dateFri, 16 Aug 2019 04:07:24 +0000
treeherdermozilla-inbound@d887276421d3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjlast
bugs1541631
milestone70.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 1541631 - Part 6: Remove unused action return values. r=jlast Differential Revision: https://phabricator.services.mozilla.com/D42031
devtools/client/debugger/src/actions/breakpoints/breakpointPositions.js
devtools/client/debugger/src/actions/sources/loadSourceText.js
devtools/client/debugger/src/actions/sources/symbols.js
devtools/client/debugger/src/utils/memoizableAction.js
--- a/devtools/client/debugger/src/actions/breakpoints/breakpointPositions.js
+++ b/devtools/client/debugger/src/actions/breakpoints/breakpointPositions.js
@@ -173,18 +173,16 @@ async function _setBreakpointPositions(c
   }
 
   dispatch({
     type: "ADD_BREAKPOINT_POSITIONS",
     cx,
     source: source,
     positions,
   });
-
-  return positions;
 }
 
 function generatedSourceActorKey(state, sourceId) {
   const generatedSource = getSource(
     state,
     isOriginalId(sourceId) ? originalToGeneratedId(sourceId) : sourceId
   );
   const actors = generatedSource
--- a/devtools/client/debugger/src/actions/sources/loadSourceText.js
+++ b/devtools/client/debugger/src/actions/sources/loadSourceText.js
@@ -119,18 +119,16 @@ async function loadSourceTextPromise(
 
     await dispatch(setBreakableLines(cx, source.id));
     // Update the text in any breakpoints for this source by re-adding them.
     const breakpoints = getBreakpointsForSource(getState(), source.id);
     for (const { location, options, disabled } of breakpoints) {
       await dispatch(addBreakpoint(cx, location, options, disabled));
     }
   }
-
-  return newSource;
 }
 
 export function loadSourceById(cx: Context, sourceId: string) {
   return ({ getState, dispatch }: ThunkArgs) => {
     const source = getSourceFromId(getState(), sourceId);
     return dispatch(loadSourceText({ cx, source }));
   };
 }
--- a/devtools/client/debugger/src/actions/sources/symbols.js
+++ b/devtools/client/debugger/src/actions/sources/symbols.js
@@ -29,18 +29,16 @@ async function doSetSymbols(cx, source, 
     sourceId,
     [PROMISE]: parser.getSymbols(sourceId),
   });
 
   const symbols = getSymbols(getState(), source);
   if (symbols && symbols.framework) {
     dispatch(updateTab(source, symbols.framework));
   }
-
-  return symbols;
 }
 
 type Args = { cx: Context, source: Source };
 
 export const setSymbols: MemoizedAction<Args, ?Symbols> = memoizeableAction(
   "setSymbols",
   {
     hasValue: ({ source }, { getState }) =>
--- a/devtools/client/debugger/src/utils/memoizableAction.js
+++ b/devtools/client/debugger/src/utils/memoizableAction.js
@@ -6,17 +6,17 @@
 
 import type { ThunkArgs } from "../actions/types";
 
 export type MemoizedAction<Args, Result> = Args => ThunkArgs => Promise<Result>;
 type MemoizableActionParams<Args, Result> = {
   hasValue: (args: Args, thunkArgs: ThunkArgs) => boolean,
   getValue: (args: Args, thunkArgs: ThunkArgs) => Result,
   createKey: (args: Args, thunkArgs: ThunkArgs) => string,
-  action: (args: Args, thunkArgs: ThunkArgs) => Promise<Result>,
+  action: (args: Args, thunkArgs: ThunkArgs) => Promise<mixed>,
 };
 
 /*
  * memoizableActon is a utility for actions that should only be performed
  * once per key. It is useful for loading sources, parsing symbols ...
  *
  * @hasValue - checks to see if the result is in the redux store
  * @getValue - gets the result from the redux store