mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-10 09:19:28 +00:00
fixing a potential crash if prefs do not exist. need to set rv. npodb
This commit is contained in:
parent
d6c2b9b884
commit
81f1a86c0d
@ -105,7 +105,7 @@ nsSpatialNavigationService::Observe(nsISupports *aSubject, const char *aTopic, c
|
|||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
windowWatcher->RegisterNotification(this);
|
windowWatcher->RegisterNotification(this);
|
||||||
|
|
||||||
nsCOMPtr<nsIPrefBranch2> prefBranch = do_GetService(NS_PREFSERVICE_CONTRACTID);
|
nsCOMPtr<nsIPrefBranch2> prefBranch = do_GetService(NS_PREFSERVICE_CONTRACTID, &rv);
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
|
|
||||||
prefBranch->AddObserver("snav.", this, PR_FALSE);
|
prefBranch->AddObserver("snav.", this, PR_FALSE);
|
||||||
@ -186,7 +186,6 @@ nsSpatialNavigationService::Observe(nsISupports *aSubject, const char *aTopic, c
|
|||||||
|
|
||||||
#define SpatialNavigationService_ContractID "@mozilla.org/spatialnavigation/service"
|
#define SpatialNavigationService_ContractID "@mozilla.org/spatialnavigation/service"
|
||||||
|
|
||||||
|
|
||||||
static NS_METHOD SpatialNavigationServiceRegistration(nsIComponentManager *aCompMgr,
|
static NS_METHOD SpatialNavigationServiceRegistration(nsIComponentManager *aCompMgr,
|
||||||
nsIFile *aPath,
|
nsIFile *aPath,
|
||||||
const char *registryLocation,
|
const char *registryLocation,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user