Bug 1475283: Fix DEAD_STORE reported by infer in nsTypeAheadFind.cpp. r=froydnj
authorRobert Bartlensky <rbartlensky@mozilla.com>
Mon, 16 Jul 2018 18:38:16 +0100
changeset 427487 9649aefe9a6b245c04206080d2338e7b92da6cdf
parent 427486 69529e9693b081a458261f38c1c433d84970a2a5
child 427488 d22727e8db06829fa086a23ced8740a42882a898
push id34306
push usercsabou@mozilla.com
push dateFri, 20 Jul 2018 21:41:18 +0000
treeherdermozilla-central@d6a5e8aea651 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1475283
milestone63.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 1475283: Fix DEAD_STORE reported by infer in nsTypeAheadFind.cpp. r=froydnj MozReview-Commit-ID: 720l6iKMVGl
toolkit/components/typeaheadfind/nsTypeAheadFind.cpp
--- a/toolkit/components/typeaheadfind/nsTypeAheadFind.cpp
+++ b/toolkit/components/typeaheadfind/nsTypeAheadFind.cpp
@@ -111,16 +111,17 @@ nsTypeAheadFind::Init(nsIDocShell* aDocS
     return NS_ERROR_FAILURE;
 
   SetDocShell(aDocShell);
 
   if (!mDidAddObservers) {
     mDidAddObservers = true;
     // ----------- Listen to prefs ------------------
     nsresult rv = prefInternal->AddObserver("accessibility.browsewithcaret", this, true);
+    NS_ENSURE_SUCCESS(rv, rv);
     rv = prefInternal->AddObserver("accessibility.typeaheadfind", this, true);
     NS_ENSURE_SUCCESS(rv, rv);
 
     // ----------- Get initial preferences ----------
     PrefsReset();
 
     nsCOMPtr<nsIObserverService> os = mozilla::services::GetObserverService();
     if (os) {