Bug 1598285 - Stop ongoing search after reload. r=Honza
authorDuncan Dean <duncangleeddean@gmail.com>
Fri, 22 Nov 2019 10:55:34 +0000
changeset 503338 e45f7a33212692820239bd1fe21ac639af6f17ef
parent 503337 beee726e70e28bfe3f1f0b4f0e4278fbc0eeb175
child 503339 0ae41aa8997b2432ff017ec15dd65e737887a9da
push id36833
push userbtara@mozilla.com
push dateFri, 22 Nov 2019 21:40:53 +0000
treeherdermozilla-central@2c912e46295e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersHonza
bugs1598285
milestone72.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 1598285 - Stop ongoing search after reload. r=Honza 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;
     }