Commit 1897d5d8 authored by Daniel Sievers's avatar Daniel Sievers

Android: CHECK() for supported child process types

BUG=396568
TBR=feng@chromium.org
NOTRY=True

Review URL: https://codereview.chromium.org/797783002

Cr-Commit-Position: refs/heads/master@{#307987}
parent e59a6e0f
...@@ -181,6 +181,18 @@ void ChildProcessLauncher::Context::Launch( ...@@ -181,6 +181,18 @@ void ChildProcessLauncher::Context::Launch(
client_ = client; client_ = client;
#if defined(OS_ANDROID) #if defined(OS_ANDROID)
// We currently only support renderer and gpu child processes.
std::string process_type =
cmd_line->GetSwitchValueASCII(switches::kProcessType);
CHECK_NE(switches::kPluginProcess, process_type);
CHECK_NE(switches::kPpapiBrokerProcess, process_type);
CHECK_NE(switches::kPpapiPluginProcess, process_type);
CHECK_NE(switches::kSandboxIPCProcess, process_type);
CHECK_NE(switches::kUtilityProcess, process_type);
CHECK_NE(switches::kZygoteProcess, process_type);
CHECK(process_type == switches::kGpuProcess ||
process_type == switches::kRendererProcess);
// We need to close the client end of the IPC channel to reliably detect // We need to close the client end of the IPC channel to reliably detect
// child termination. We will close this fd after we create the child // child termination. We will close this fd after we create the child
// process which is asynchronous on Android. // process which is asynchronous on Android.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment