mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset 763cc10e0bb1 (bug 1144127) for B2G reftest bustage.
This commit is contained in:
parent
70285ec3f2
commit
78913c4393
@ -113,11 +113,12 @@ nsXREDirProvider::Initialize(nsIFile *aXULAppDir,
|
||||
if (app) {
|
||||
bool per = false;
|
||||
app->GetFile(NS_APP_USER_PROFILE_50_DIR, &per, getter_AddRefs(mProfileDir));
|
||||
NS_ASSERTION(per, "NS_APP_USER_PROFILE_50_DIR must be persistent!");
|
||||
NS_ASSERTION(mProfileDir, "NS_APP_USER_PROFILE_50_DIR not defined! This shouldn't happen!");
|
||||
NS_ASSERTION(per, "NS_APP_USER_PROFILE_50_DIR must be persistent!");
|
||||
NS_ASSERTION(mProfileDir, "NS_APP_USER_PROFILE_50_DIR not defined! This shouldn't happen!");
|
||||
}
|
||||
}
|
||||
|
||||
LoadAppBundleDirs();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@ -643,6 +644,36 @@ nsXREDirProvider::LoadExtensionBundleDirectories()
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
nsXREDirProvider::LoadAppBundleDirs()
|
||||
{
|
||||
nsCOMPtr<nsIFile> dir;
|
||||
bool persistent = false;
|
||||
nsresult rv = GetFile(XRE_APP_DISTRIBUTION_DIR, &persistent, getter_AddRefs(dir));
|
||||
if (NS_FAILED(rv))
|
||||
return;
|
||||
|
||||
dir->AppendNative(NS_LITERAL_CSTRING("bundles"));
|
||||
|
||||
nsCOMPtr<nsISimpleEnumerator> e;
|
||||
rv = dir->GetDirectoryEntries(getter_AddRefs(e));
|
||||
if (NS_FAILED(rv))
|
||||
return;
|
||||
|
||||
nsCOMPtr<nsIDirectoryEnumerator> files = do_QueryInterface(e);
|
||||
if (!files)
|
||||
return;
|
||||
|
||||
nsCOMPtr<nsIFile> subdir;
|
||||
while (NS_SUCCEEDED(files->GetNextFile(getter_AddRefs(subdir))) && subdir) {
|
||||
mAppBundleDirectories.AppendObject(subdir);
|
||||
|
||||
nsCOMPtr<nsIFile> manifest =
|
||||
CloneAndAppend(subdir, "chrome.manifest");
|
||||
XRE_AddManifestLocation(NS_COMPONENT_LOCATION, manifest);
|
||||
}
|
||||
}
|
||||
|
||||
static const char *const kAppendPrefDir[] = { "defaults", "preferences", nullptr };
|
||||
|
||||
#ifdef DEBUG_bsmedberg
|
||||
|
@ -127,6 +127,9 @@ protected:
|
||||
// Calculate and register extension and theme bundle directories.
|
||||
void LoadExtensionBundleDirectories();
|
||||
|
||||
// Calculate and register app-bundled extension directories.
|
||||
void LoadAppBundleDirs();
|
||||
|
||||
void Append(nsIFile* aDirectory);
|
||||
|
||||
nsCOMPtr<nsIDirectoryServiceProvider> mAppProvider;
|
||||
|
Loading…
Reference in New Issue
Block a user