mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 671564 - Initialize NS_XPCOM_LIBRARY_FILE from NS_GRE_DIR. r=bsmedberg
This commit is contained in:
parent
f2e4962345
commit
cb537f7367
@ -422,34 +422,33 @@ NS_InitXPCOM2(nsIServiceManager* *result,
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
|
||||
nsCOMPtr<nsIFile> xpcomLib;
|
||||
|
||||
PRBool value;
|
||||
|
||||
if (binDirectory)
|
||||
{
|
||||
rv = binDirectory->IsDirectory(&value);
|
||||
|
||||
if (NS_SUCCEEDED(rv) && value) {
|
||||
nsDirectoryService::gService->Set(NS_XPCOM_INIT_CURRENT_PROCESS_DIR, binDirectory);
|
||||
binDirectory->Clone(getter_AddRefs(xpcomLib));
|
||||
}
|
||||
}
|
||||
else {
|
||||
nsDirectoryService::gService->Get(NS_XPCOM_CURRENT_PROCESS_DIR,
|
||||
NS_GET_IID(nsIFile),
|
||||
getter_AddRefs(xpcomLib));
|
||||
|
||||
if (appFileLocationProvider) {
|
||||
rv = nsDirectoryService::gService->RegisterProvider(appFileLocationProvider);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIFile> xpcomLib;
|
||||
|
||||
nsDirectoryService::gService->Get(NS_GRE_DIR,
|
||||
NS_GET_IID(nsIFile),
|
||||
getter_AddRefs(xpcomLib));
|
||||
|
||||
if (xpcomLib) {
|
||||
xpcomLib->AppendNative(nsDependentCString(XPCOM_DLL));
|
||||
nsDirectoryService::gService->Set(NS_XPCOM_LIBRARY_FILE, xpcomLib);
|
||||
}
|
||||
|
||||
if (appFileLocationProvider) {
|
||||
rv = nsDirectoryService::gService->RegisterProvider(appFileLocationProvider);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
}
|
||||
|
||||
NS_TIME_FUNCTION_MARK("Next: Omnijar init");
|
||||
|
||||
if (!mozilla::Omnijar::IsInitialized()) {
|
||||
|
Loading…
Reference in New Issue
Block a user