Bug 1045847 - Fix review comments

This commit is contained in:
Bill McCloskey 2014-08-08 17:55:22 -07:00
parent c2b34b4534
commit 99080fa9fb
2 changed files with 8 additions and 1 deletions

View File

@ -85,8 +85,9 @@ content_process_main(int argc, char* argv[])
{
// Check for the absolute minimum number of args we need to move
// forward here. We expect the last arg to be the child process type.
if (argc < 1)
if (argc < 1) {
return 3;
}
XRE_SetProcessType(argv[--argc]);
bool isNuwa = false;

View File

@ -213,6 +213,12 @@ GeckoProcessType sChildProcessType = GeckoProcessType_Default;
void
XRE_SetProcessType(const char* aProcessTypeString)
{
static bool called = false;
if (called) {
MOZ_CRASH();
}
called = true;
sChildProcessType = GeckoProcessType_Invalid;
for (int i = 0;
i < (int) ArrayLength(kGeckoProcessTypeString);