Bug 1529680 - [release 127] Make search result code a bit more compact (#7995). r=dwalsh
authorDavid Walsh <davidwalsh83@gmail.com>
Mon, 25 Feb 2019 09:59:09 -0500
changeset 461081 ba061047b9a0349d86f79834659f5b87f988958e
parent 461080 302cfcce2693364cc169895a7172aed43c6c40b1
child 461082 71adfc4d2e58ba2fc20dbece687005e7f6dad441
push id35618
push usershindli@mozilla.com
push dateTue, 26 Feb 2019 16:54:44 +0000
treeherdermozilla-central@d326a9d5f77b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdwalsh
bugs1529680
milestone67.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 1529680 - [release 127] Make search result code a bit more compact (#7995). r=dwalsh
devtools/client/debugger/new/src/actions/file-search.js
--- a/devtools/client/debugger/new/src/actions/file-search.js
+++ b/devtools/client/debugger/new/src/actions/file-search.js
@@ -168,19 +168,18 @@ export function traverseResults(rev: boo
     const { matches } = getFileSearchResults(getState());
 
     if (query === "") {
       dispatch(setActiveSearch("file"));
     }
 
     if (modifiers) {
       const matchedLocations = matches || [];
-      const results = rev
-        ? findPrev(ctx, query, true, modifiers.toJS())
-        : findNext(ctx, query, true, modifiers.toJS());
+      const findArgs = [ctx, query, true, modifiers.toJS()];
+      const results = rev ? findPrev(...findArgs) : findNext(...findArgs);
 
       if (!results) {
         return;
       }
       const { ch, line } = results;
       dispatch(updateSearchResults(ch, line, matchedLocations));
     }
   };