Bug 1326245: Tell the child processes when we're in safe mode. r=smaug

MozReview-Commit-ID: EiuULIb5L6A

--HG--
extra : rebase_source : deee93731ec6635340cf7c3d665833c306912691
This commit is contained in:
Dave Townsend 2017-02-08 15:45:01 -08:00
parent 11c1660445
commit b7916539a5
2 changed files with 7 additions and 0 deletions

View File

@ -1870,6 +1870,10 @@ ContentParent::LaunchSubprocess(ProcessPriority aInitialPriority /* = PROCESS_PR
extraArgs.push_back("-stringPrefs");
extraArgs.push_back(stringPrefs.str());
if (gSafeMode) {
extraArgs.push_back("-safeMode");
}
if (!mSubprocess->LaunchAndWaitForProcessHandle(extraArgs)) {
MarkAsDead();
return false;

View File

@ -197,6 +197,9 @@ ContentProcess::Init(int aArgc, char* aArgv[])
SET_PREF_PHASE(END_INIT_PREFS);
foundStringPrefs = true;
}
else if (!strcmp(aArgv[idx], "-safeMode")) {
gSafeMode = true;
}
#if defined(XP_MACOSX) && defined(MOZ_CONTENT_SANDBOX)
else if (!strcmp(aArgv[idx], "-profile")) {