Chromium Code Reviews| Index: content/app/content_main_runner.cc |
| diff --git a/content/app/content_main_runner.cc b/content/app/content_main_runner.cc |
| index 3e2a3affa2acba82fdeb2fc7829b7d9603cc8ec4..c35cf9242d6b1b7134c7f3d822d50cd5722f2a49 100644 |
| --- a/content/app/content_main_runner.cc |
| +++ b/content/app/content_main_runner.cc |
| @@ -333,7 +333,7 @@ int RunZygote(const MainFunctionParams& main_function_params, |
| NOTREACHED() << "Unknown zygote process type: " << process_type; |
| return 1; |
| } |
| -#endif // defined(OS_POSIX) && !defined(OS_MACOSX) |
| +#endif // defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) |
| // Run the FooMain() for a given process type. |
| // If |process_type| is empty, runs BrowserMain(). |
| @@ -454,10 +454,14 @@ static void ReleaseFreeMemoryThunk() { |
| #if !defined(OS_ANDROID) |
| // Set C library locale to make sure CommandLine can parse argument values |
| // in correct encoding. |
| + // Android doesn't support this. |
|
Yaron
2012/07/10 21:21:55
These three comments are covered by the block abov
michaelbai
2012/07/10 22:02:42
Done.
|
| setlocale(LC_ALL, ""); |
| + // On Android, do not override the signal handlers so that we can get stack |
| + // trace when crashing. |
| SetupSignalHandlers(); |
| + // Android passes the ipc_fd through the Java service. |
| base::GlobalDescriptors* g_fds = base::GlobalDescriptors::GetInstance(); |
| g_fds->Set(kPrimaryIPCChannel, |
| kPrimaryIPCChannel + base::GlobalDescriptors::kBaseDescriptor); |
| @@ -475,8 +479,10 @@ static void ReleaseFreeMemoryThunk() { |
| base::EnableTerminationOnHeapCorruption(); |
| base::EnableTerminationOnOutOfMemory(); |
| - |
| - // On Android, AtExitManager is set up when library is loaded. |
| + // In normal chrome, ContentMainRunner::initialize is where the |
| + // AtExitManager is registered. In android, we need to do it earlier because |
| + // we use LazyInstances very early on and LazyInstance requires |
|
Yaron
2012/07/10 21:21:55
I think the old comment was preferred (i.e. do the
michaelbai
2012/07/10 22:02:42
Done.
|
| + // AtExitManager. |
| #if !defined(OS_ANDROID) |
| // The exit manager is in charge of calling the dtors of singleton objects. |
| exit_manager_.reset(new base::AtExitManager); |