Bug 1598285 - Stop ongoing search after reload. r=Honza a=pascalc
authorDuncan Dean <duncangleeddean@gmail.com>
Fri, 22 Nov 2019 10:55:34 +0000
changeset 563487 e93478316b37754dbeb14aebb6bf6552796c85e0
parent 563486 c49da39eaf2966633dcec6d5476989e687e2ba32
child 563488 6614a42629896754f6d027a4227c3e4869c673e4
push id2197
push userccoroiu@mozilla.com
push dateMon, 25 Nov 2019 19:28:40 +0000
treeherdermozilla-release@8d030709fd14 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersHonza, pascalc
bugs1598285
milestone71.0
Bug 1598285 - Stop ongoing search after reload. r=Honza a=pascalc Differential Revision: https://phabricator.services.mozilla.com/D54180
devtools/client/netmonitor/src/actions/search.js
devtools/client/netmonitor/src/connector/firefox-connector.js
--- a/devtools/client/netmonitor/src/actions/search.js
+++ b/devtools/client/netmonitor/src/actions/search.js
@@ -294,9 +294,10 @@ module.exports = {
   openSearch,
   clearSearchResults,
   addSearchQuery,
   toggleSearchPanel,
   navigate,
   setTargetSearchResult,
   toggleCaseSensitiveSearch,
   clearSearchResultAndCancel,
+  stopOngoingSearch,
 };
--- a/devtools/client/netmonitor/src/connector/firefox-connector.js
+++ b/devtools/client/netmonitor/src/connector/firefox-connector.js
@@ -204,22 +204,27 @@ class FirefoxConnector {
         this.actions.batchReset();
         this.actions.clearRequests();
       } else {
         // If the log is persistent, just clear all accumulated timing markers.
         this.actions.clearTimingMarkers();
       }
     }
 
-    // Resume is done automatically on page reload/navigation.
     if (this.actions && this.getState) {
       const state = this.getState();
+      // Resume is done automatically on page reload/navigation.
       if (!state.requests.recording) {
         this.actions.toggleRecording();
       }
+
+      // Stop any ongoing search.
+      if (state.search.ongoingSearch) {
+        this.actions.stopOngoingSearch();
+      }
     }
   }
 
   navigate() {
     if (this.dataProvider.isPayloadQueueEmpty()) {
       this.onReloaded();
       return;
     }