mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 05:41:12 +00:00
The new method of autoregistration is really simple. A NULL for the
directory will do the right thing.
This commit is contained in:
parent
a5f317d35d
commit
09c4d8e4fc
@ -128,19 +128,7 @@ get_applocale(void)
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
nsresult NS_AutoregisterComponents()
|
||||
{
|
||||
nsIFileSpec* spec = NS_LocateFileOrDirectory(
|
||||
nsSpecialFileSpec::App_ComponentsDirectory);
|
||||
if (!spec)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
char *componentsDirPath;
|
||||
nsresult rv = spec->GetNSPRPath(&componentsDirPath);
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
|
||||
if (componentsDirPath)
|
||||
rv = nsComponentManager::AutoRegister(nsIComponentManager::NS_Startup, componentsDirPath);
|
||||
NS_RELEASE(spec);
|
||||
nsresult rv = nsComponentManager::AutoRegister(nsIComponentManager::NS_Startup, NULL /* default */);
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user