From 5fe07a9c31e56f2ffc71ffd622ca52db3ce327a6 Mon Sep 17 00:00:00 2001 From: Monica Chew Date: Mon, 9 Mar 2015 17:44:31 -0700 Subject: [PATCH] Bug 1141363: Check to see we can get UrlClassifierDBService before using it (r=sworkman) --- toolkit/components/downloads/ApplicationReputation.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/toolkit/components/downloads/ApplicationReputation.cpp b/toolkit/components/downloads/ApplicationReputation.cpp index bc4eff4aad3..536beaea17c 100644 --- a/toolkit/components/downloads/ApplicationReputation.cpp +++ b/toolkit/components/downloads/ApplicationReputation.cpp @@ -296,6 +296,8 @@ PendingDBLookup::LookupSpecInternal(const nsACString& aSpec) LOG(("Checking DB service for principal %s [this = %p]", mSpec.get(), this)); nsCOMPtr dbService = do_GetService(NS_URLCLASSIFIERDBSERVICE_CONTRACTID, &rv); + NS_ENSURE_SUCCESS(rv, rv); + nsAutoCString tables; nsAutoCString allowlist; Preferences::GetCString(PREF_DOWNLOAD_ALLOW_TABLE, &allowlist);