Bug 1188688 - Frequent "TypeError: this._searchSuggestionController is null" when using the location bar. r=ttaubert
authorMarco Bonardo <mbonardo@mozilla.com>
Mon, 03 Aug 2015 18:26:28 +0200
changeset 287577 c2b099fa12eeffe0e5322e19f7f73e7d9e46be39
parent 287576 15da891157bfcbe82c30919c70e5fb0027d14c87
child 287578 203279f9588fa05ef81c2a8c0e9b09210cbd252b
push id5067
push userraliiev@mozilla.com
push dateMon, 21 Sep 2015 14:04:52 +0000
treeherdermozilla-beta@14221ffe5b2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersttaubert
bugs1188688
milestone42.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 1188688 - Frequent "TypeError: this._searchSuggestionController is null" when using the location bar. r=ttaubert
toolkit/components/places/UnifiedComplete.js
--- a/toolkit/components/places/UnifiedComplete.js
+++ b/toolkit/components/places/UnifiedComplete.js
@@ -936,16 +936,19 @@ Search.prototype = {
     this._searchSuggestionController =
       PlacesSearchAutocompleteProvider.getSuggestionController(
         searchString,
         this._inPrivateWindow,
         Prefs.maxRichResults
       );
     let promise = this._searchSuggestionController.fetchCompletePromise
       .then(() => {
+        // The search has been canceled already.
+        if (!this._searchSuggestionController)
+          return;
         if (this._searchSuggestionController.resultsCount >= 0 &&
             this._searchSuggestionController.resultsCount < 2) {
           // The original string is used to properly compare with the next search.
           this._lastLowResultsSearchSuggestion = this._originalSearchString;
         }
         while (this.pending && this._remoteMatchesCount < Prefs.maxRichResults) {
           let [match, suggestion] = this._searchSuggestionController.consume();
           if (!suggestion)