mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 844533 - Add a pref which controls whether we load plugins from the root appdir, default to off, r=glandium
This commit is contained in:
parent
9bbbc377b8
commit
9972ba828c
@ -1784,6 +1784,7 @@ pref("dom.archivereader.enabled", false);
|
||||
// resolved.
|
||||
pref("hangmonitor.timeout", 0);
|
||||
|
||||
pref("plugins.load_appdir_plugins", false);
|
||||
// If true, plugins will be click to play
|
||||
pref("plugins.click_to_play", false);
|
||||
|
||||
|
@ -719,9 +719,19 @@ nsXREDirProvider::GetFilesInternal(const char* aProperty,
|
||||
rv = NS_NewArrayEnumerator(aResult, directories);
|
||||
}
|
||||
else if (!strcmp(aProperty, NS_APP_PLUGINS_DIR_LIST)) {
|
||||
static const char *const kAppendPlugins[] = { "plugins", nullptr };
|
||||
nsCOMArray<nsIFile> directories;
|
||||
|
||||
if (mozilla::Preferences::GetBool("plugins.load_appdir_plugins", false)) {
|
||||
nsCOMPtr<nsIFile> appdir;
|
||||
rv = XRE_GetBinaryPath(gArgv[0], getter_AddRefs(appdir));
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
appdir->SetNativeLeafName(NS_LITERAL_CSTRING("plugins"));
|
||||
directories.AppendObject(appdir);
|
||||
}
|
||||
}
|
||||
|
||||
static const char *const kAppendPlugins[] = { "plugins", nullptr };
|
||||
|
||||
// The root dirserviceprovider does quite a bit for us: we're mainly
|
||||
// interested in xulapp and extension-provided plugins.
|
||||
LoadDirsIntoArray(mAppBundleDirectories,
|
||||
|
Loading…
Reference in New Issue
Block a user