Bug 1126450 - When Flash has a blocklist entry, we should keep protected-mode on, no matter the value of the pref setting. r=aklotz
--- a/dom/plugins/ipc/PluginModuleParent.cpp
+++ b/dom/plugins/ipc/PluginModuleParent.cpp
@@ -407,16 +407,17 @@ PluginModuleChromeParent::LoadModule(con
bool launched = parent->mSubprocess->Launch(Move(onLaunchedRunnable),
enableSandbox);
if (!launched) {
// We never reached open
parent->mShutdown = true;
return nullptr;
}
parent->mIsFlashPlugin = aPluginTag->mIsFlashPlugin;
+ parent->mIsBlocklisted = aPluginTag->GetBlocklistState() != 0;
if (!parent->mIsStartingAsync) {
int32_t launchTimeoutSecs = Preferences::GetInt(kLaunchTimeoutPref, 0);
if (!parent->mSubprocess->WaitUntilConnected(launchTimeoutSecs * 1000)) {
parent->mShutdown = true;
return nullptr;
}
}
TimeStamp launchEnd = TimeStamp::Now();
@@ -465,17 +466,17 @@ PluginModuleChromeParent::OnProcessLaunc
{ // Scope for lock
mozilla::MutexAutoLock lock(mCrashReporterMutex);
mCrashReporter = CrashReporter();
}
#endif
#endif
#ifdef XP_WIN
- if (mIsFlashPlugin &&
+ if (!mIsBlocklisted && mIsFlashPlugin &&
Preferences::GetBool("dom.ipc.plugins.flash.disable-protected-mode", false)) {
SendDisableFlashProtectedMode();
}
#endif
if (mInitOnAsyncConnect) {
mInitOnAsyncConnect = false;
#if defined(XP_WIN)
--- a/dom/plugins/ipc/PluginModuleParent.h
+++ b/dom/plugins/ipc/PluginModuleParent.h
@@ -511,14 +511,15 @@ private:
friend class LaunchedTask;
bool mInitOnAsyncConnect;
nsresult mAsyncInitRv;
NPError mAsyncInitError;
dom::ContentParent* mContentParent;
nsCOMPtr<nsIObserver> mOfflineObserver;
bool mIsFlashPlugin;
+ bool mIsBlocklisted;
};
} // namespace plugins
} // namespace mozilla
#endif // mozilla_plugins_PluginModuleParent_h