Snap for 11754915 from 4ab89ae5f1cc3d2af34fac4598d65a66cfd3a06a to sdk-release

Change-Id: Ibe186971c3dfeccb854c7d62ce60d6925ec761f1
diff --git a/IsolateMain.cpp b/IsolateMain.cpp
index 853d7e4..0d214f9 100644
--- a/IsolateMain.cpp
+++ b/IsolateMain.cpp
@@ -174,20 +174,20 @@
 
   std::vector<char*> child_args;
   android::gtest_extras::Options options;
-  if (!options.Process(args, &child_args)) {
-    return 1;
+  int return_val = 1;
+  if (options.Process(args, &child_args)) {
+    // Add the --no_isolate option to force child processes not to rerun
+    // in isolation mode.
+    child_args.push_back(strdup("--no_isolate"));
+
+    // Set the flag values.
+    ::testing::GTEST_FLAG(color) = options.color();
+    ::testing::GTEST_FLAG(print_time) = options.print_time();
+
+    android::gtest_extras::Isolate isolate(options, child_args);
+    return_val = isolate.Run();
   }
 
-  // Add the --no_isolate option to force child processes not to rerun
-  // in isolation mode.
-  child_args.push_back(strdup("--no_isolate"));
-
-  // Set the flag values.
-  ::testing::GTEST_FLAG(color) = options.color();
-  ::testing::GTEST_FLAG(print_time) = options.print_time();
-
-  android::gtest_extras::Isolate isolate(options, child_args);
-  int return_val = isolate.Run();
   for (auto child_arg : child_args) {
     free(child_arg);
   }