Allow out of process tabs and plugins to be disabled via prefs or environment variables, and disable them both by default so that unit tests go green.

This commit is contained in:
Ben Turner
2009-07-24 15:21:07 -07:00
parent 81fdea9063
commit 07aa9da2ac
3 changed files with 64 additions and 28 deletions

View File

@@ -1043,7 +1043,19 @@ nsFrameLoader::CheckForRecursiveLoad(nsIURI* aURI)
PRBool
nsFrameLoader::TryNewProcess()
{
if (PR_GetEnv("DISABLE_OOP_IFRAME")) {
if (PR_GetEnv("MOZ_DISABLE_OOP_TABS")) {
return PR_FALSE;
}
nsCOMPtr<nsIPrefBranch> prefs = do_GetService(NS_PREFSERVICE_CONTRACTID);
if (!prefs) {
return PR_FALSE;
}
PRBool oopTabsEnabled = PR_FALSE;
prefs->GetBoolPref("dom.ipc.tabs.enabled", &oopTabsEnabled);
if (!oopTabsEnabled) {
return PR_FALSE;
}