|
|
|
Lines 1117-1147
bool PosixProcessLauncher::DoSetup() {
|
Link Here
|
|---|
|
| 1117 |
|
1117 |
|
| 1118 |
if (pathType == BinPathType::Self) { |
1118 |
if (pathType == BinPathType::Self) { |
| 1119 |
mChildArgv.push_back("-contentproc"); |
1119 |
mChildArgv.push_back("-contentproc"); |
| 1120 |
} |
1120 |
} |
| 1121 |
|
1121 |
|
| 1122 |
mChildArgv.insert(mChildArgv.end(), mExtraOpts.begin(), mExtraOpts.end()); |
1122 |
mChildArgv.insert(mChildArgv.end(), mExtraOpts.begin(), mExtraOpts.end()); |
| 1123 |
|
1123 |
|
| 1124 |
if (mProcessType != GeckoProcessType_GMPlugin) { |
1124 |
if (mProcessType != GeckoProcessType_GMPlugin) { |
|
|
1125 |
#if defined(MOZ_WIDGET_ANDROID) |
| 1125 |
if (Omnijar::IsInitialized()) { |
1126 |
if (Omnijar::IsInitialized()) { |
| 1126 |
// Make sure that child processes can find the omnijar |
1127 |
// Make sure that child processes can find the omnijar |
| 1127 |
// See XRE_InitCommandLine in nsAppRunner.cpp |
1128 |
// See XRE_InitCommandLine in nsAppRunner.cpp |
| 1128 |
nsAutoCString path; |
1129 |
nsAutoCString path; |
| 1129 |
nsCOMPtr<nsIFile> file = Omnijar::GetPath(Omnijar::GRE); |
1130 |
nsCOMPtr<nsIFile> file = Omnijar::GetPath(Omnijar::GRE); |
| 1130 |
if (file && NS_SUCCEEDED(file->GetNativePath(path))) { |
1131 |
if (file && NS_SUCCEEDED(file->GetNativePath(path))) { |
| 1131 |
mChildArgv.push_back("-greomni"); |
1132 |
mChildArgv.push_back("-greomni"); |
| 1132 |
mChildArgv.push_back(path.get()); |
1133 |
mChildArgv.push_back(path.get()); |
| 1133 |
} |
1134 |
} |
| 1134 |
file = Omnijar::GetPath(Omnijar::APP); |
1135 |
file = Omnijar::GetPath(Omnijar::APP); |
| 1135 |
if (file && NS_SUCCEEDED(file->GetNativePath(path))) { |
1136 |
if (file && NS_SUCCEEDED(file->GetNativePath(path))) { |
| 1136 |
mChildArgv.push_back("-appomni"); |
1137 |
mChildArgv.push_back("-appomni"); |
| 1137 |
mChildArgv.push_back(path.get()); |
1138 |
mChildArgv.push_back(path.get()); |
| 1138 |
} |
1139 |
} |
| 1139 |
} |
1140 |
} |
|
|
1141 |
#endif |
| 1140 |
// Add the application directory path (-appdir path) |
1142 |
// Add the application directory path (-appdir path) |
| 1141 |
# ifdef XP_MACOSX |
1143 |
# ifdef XP_MACOSX |
| 1142 |
AddAppDirToCommandLine(mChildArgv, mAppDir, mProfileDir); |
1144 |
AddAppDirToCommandLine(mChildArgv, mAppDir, mProfileDir); |
| 1143 |
# else |
1145 |
# else |
| 1144 |
AddAppDirToCommandLine(mChildArgv, mAppDir, nullptr); |
1146 |
AddAppDirToCommandLine(mChildArgv, mAppDir, nullptr); |
| 1145 |
# endif |
1147 |
# endif |
| 1146 |
} |
1148 |
} |
| 1147 |
|
1149 |
|
|
Lines 1333-1363
bool WindowsProcessLauncher::DoSetup() {
|
Link Here
|
|---|
|
| 1333 |
|
1335 |
|
| 1334 |
mCmdLine->AppendSwitchWithValue(switches::kProcessChannelID, mChannelId); |
1336 |
mCmdLine->AppendSwitchWithValue(switches::kProcessChannelID, mChannelId); |
| 1335 |
|
1337 |
|
| 1336 |
for (std::vector<std::string>::iterator it = mExtraOpts.begin(); |
1338 |
for (std::vector<std::string>::iterator it = mExtraOpts.begin(); |
| 1337 |
it != mExtraOpts.end(); ++it) { |
1339 |
it != mExtraOpts.end(); ++it) { |
| 1338 |
mCmdLine->AppendLooseValue(UTF8ToWide(*it)); |
1340 |
mCmdLine->AppendLooseValue(UTF8ToWide(*it)); |
| 1339 |
} |
1341 |
} |
| 1340 |
|
1342 |
|
|
|
1343 |
#if defined(MOZ_WIDGET_ANDROID) |
| 1341 |
if (Omnijar::IsInitialized()) { |
1344 |
if (Omnijar::IsInitialized()) { |
| 1342 |
// Make sure the child process can find the omnijar |
1345 |
// Make sure the child process can find the omnijar |
| 1343 |
// See XRE_InitCommandLine in nsAppRunner.cpp |
1346 |
// See XRE_InitCommandLine in nsAppRunner.cpp |
| 1344 |
nsAutoString path; |
1347 |
nsAutoString path; |
| 1345 |
nsCOMPtr<nsIFile> file = Omnijar::GetPath(Omnijar::GRE); |
1348 |
nsCOMPtr<nsIFile> file = Omnijar::GetPath(Omnijar::GRE); |
| 1346 |
if (file && NS_SUCCEEDED(file->GetPath(path))) { |
1349 |
if (file && NS_SUCCEEDED(file->GetPath(path))) { |
| 1347 |
mCmdLine->AppendLooseValue(UTF8ToWide("-greomni")); |
1350 |
mCmdLine->AppendLooseValue(UTF8ToWide("-greomni")); |
| 1348 |
mCmdLine->AppendLooseValue(path.get()); |
1351 |
mCmdLine->AppendLooseValue(path.get()); |
| 1349 |
} |
1352 |
} |
| 1350 |
file = Omnijar::GetPath(Omnijar::APP); |
1353 |
file = Omnijar::GetPath(Omnijar::APP); |
| 1351 |
if (file && NS_SUCCEEDED(file->GetPath(path))) { |
1354 |
if (file && NS_SUCCEEDED(file->GetPath(path))) { |
| 1352 |
mCmdLine->AppendLooseValue(UTF8ToWide("-appomni")); |
1355 |
mCmdLine->AppendLooseValue(UTF8ToWide("-appomni")); |
| 1353 |
mCmdLine->AppendLooseValue(path.get()); |
1356 |
mCmdLine->AppendLooseValue(path.get()); |
| 1354 |
} |
1357 |
} |
| 1355 |
} |
1358 |
} |
|
|
1359 |
#endif |
| 1356 |
|
1360 |
|
| 1357 |
# if defined(MOZ_SANDBOX) |
1361 |
# if defined(MOZ_SANDBOX) |
| 1358 |
# if defined(_ARM64_) |
1362 |
# if defined(_ARM64_) |
| 1359 |
if (isClearKey || isWidevine) |
1363 |
if (isClearKey || isWidevine) |
| 1360 |
mResults.mSandboxBroker = new RemoteSandboxBroker(); |
1364 |
mResults.mSandboxBroker = new RemoteSandboxBroker(); |
| 1361 |
else |
1365 |
else |
| 1362 |
# endif // if defined(_ARM64_) |
1366 |
# endif // if defined(_ARM64_) |
| 1363 |
mResults.mSandboxBroker = new SandboxBroker(); |
1367 |
mResults.mSandboxBroker = new SandboxBroker(); |