Bug 712975 - Observe plugin pref changes (mergefix). r=josh

--HG--
extra : rebase_source : 44693edf12c879c551b95378bc0e1aa218e8d464
This commit is contained in:
Brian Nicholson 2012-01-05 16:02:51 -08:00
parent 37963d7cc9
commit b0f708a3ee

View File

@ -3281,6 +3281,15 @@ NS_IMETHODIMP nsPluginHost::Observe(nsISupports *aSubject,
UnloadPlugins();
sInst->Release();
}
if (!nsCRT::strcmp(NS_PREFBRANCH_PREFCHANGE_TOPIC_ID, aTopic)) {
mPluginsDisabled = Preferences::GetBool("plugin.disable", false);
// Unload or load plugins as needed
if (mPluginsDisabled) {
UnloadPlugins();
} else {
LoadPlugins();
}
}
#ifdef MOZ_WIDGET_ANDROID
if (!nsCRT::strcmp("application-background", aTopic)) {
for(PRUint32 i = 0; i < mInstances.Length(); i++) {