Commit 7b657937 authored by Derek Schuff's avatar Derek Schuff Committed by Commit Bot

NaCl: Disable crash-on-process-detach behavior for NaCl loader processes

NaCl processes exit directly via ExitProcess rather than returning from
the content main function back to ChromeMain (see comment on NaClExit
in native_client/src/shared/platform/win/nacl_exit.c). This means
we have to disable the default behavior of crashing on process detach;
otherwise all exits are reported as crashes

R=bbudge@chromium.org

Bug: 1008178
Change-Id: I87e1e3e70a50ed587f6ef7c637fc4b874574e1d0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2144468
Commit-Queue: Derek Schuff <dschuff@chromium.org>
Reviewed-by: default avatarBill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#758352}
parent 0fbdeb49
......@@ -10,6 +10,9 @@
#include "base/power_monitor/power_monitor_device_source.h"
#include "base/task/single_thread_task_executor.h"
#include "base/timer/hi_res_timer_manager.h"
#if defined(OS_WIN)
#include "base/win/win_util.h"
#endif
#include "build/build_config.h"
#include "components/nacl/loader/nacl_listener.h"
#include "components/nacl/loader/nacl_main_platform_delegate.h"
......@@ -38,6 +41,13 @@ int NaClMain(const content::MainFunctionParams& parameters) {
bool no_sandbox =
parsed_command_line.HasSwitch(service_manager::switches::kNoSandbox);
#if defined(OS_WIN)
// NaCl processes exit differently from other Chromium processes (see NaClExit
// in native_client/src/shared/platform/win/nacl_exit.c) and so do not want
// default Chromium process exit behavior.
base::win::SetShouldCrashOnProcessDetach(false);
#endif
#if defined(OS_POSIX)
// The number of cores must be obtained before the invocation of
// platform.EnableSandbox(), so cannot simply be inlined below.
......
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