diff --git a/xpinstall/src/nsInstall.cpp b/xpinstall/src/nsInstall.cpp index c21dcb7e951f..1a22b59ba6b6 100644 --- a/xpinstall/src/nsInstall.cpp +++ b/xpinstall/src/nsInstall.cpp @@ -1216,10 +1216,9 @@ nsInstall::CurrentUserNode(nsString& userRegNode) int len = MAXREGNAMELEN; nsIPref * prefs; - nsresult rv = nsComponentManager::CreateInstance(kPrefsIID, - nsnull, - kPrefsCID, - (void**) &prefs); + nsresult rv = nsServiceManager::GetService(kPrefsCID, + kPrefsIID, + (nsISupports**) &prefs); if ( NS_SUCCEEDED(rv) ) diff --git a/xpinstall/src/nsInstallTrigger.cpp b/xpinstall/src/nsInstallTrigger.cpp index 8177ea8dae83..c47961a3516b 100644 --- a/xpinstall/src/nsInstallTrigger.cpp +++ b/xpinstall/src/nsInstallTrigger.cpp @@ -132,10 +132,9 @@ nsInstallTrigger::UpdateEnabled(PRBool* aReturn) { nsIPref * prefs; - nsresult rv = nsComponentManager::CreateInstance(kPrefsIID, - nsnull, - kPrefsCID, - (void**) &prefs); + nsresult rv = nsServiceManager::GetService(kPrefsCID, + kPrefsIID, + (nsISupports**) &prefs); if ( NS_SUCCEEDED(rv) )