Bug 1141363: Check to see we can get UrlClassifierDBService before using it (r=sworkman)

This commit is contained in:
Monica Chew 2015-03-09 17:44:31 -07:00
parent 86ac9ead75
commit 5fe07a9c31

View File

@ -296,6 +296,8 @@ PendingDBLookup::LookupSpecInternal(const nsACString& aSpec)
LOG(("Checking DB service for principal %s [this = %p]", mSpec.get(), this));
nsCOMPtr<nsIUrlClassifierDBService> dbService =
do_GetService(NS_URLCLASSIFIERDBSERVICE_CONTRACTID, &rv);
NS_ENSURE_SUCCESS(rv, rv);
nsAutoCString tables;
nsAutoCString allowlist;
Preferences::GetCString(PREF_DOWNLOAD_ALLOW_TABLE, &allowlist);