| Index: chrome_elf/chrome_elf_main.cc
|
| diff --git a/chrome_elf/chrome_elf_main.cc b/chrome_elf/chrome_elf_main.cc
|
| index e2b57aa56e34d6d911d29d8b1d9dea359507900c..46e6e15b794bb8e1cf76ef0eac76907df32e9ad2 100644
|
| --- a/chrome_elf/chrome_elf_main.cc
|
| +++ b/chrome_elf/chrome_elf_main.cc
|
| @@ -16,6 +16,7 @@
|
| #include "chrome_elf/blacklist/blacklist.h"
|
| #include "chrome_elf/blacklist/crashpad_helper.h"
|
| #include "chrome_elf/chrome_elf_constants.h"
|
| +#include "chrome_elf/chrome_elf_security.h"
|
| #include "components/crash/content/app/crashpad.h"
|
| #include "components/crash/core/common/crash_keys.h"
|
|
|
| @@ -49,7 +50,6 @@ void InitializeCrashReportingForProcess() {
|
| ChromeCrashReporterClient::InitializeCrashReportingForProcess();
|
| }
|
|
|
| -#if !defined(ADDRESS_SANITIZER)
|
| // chrome_elf loads early in the process and initializes Crashpad. That in turn
|
| // uses the SetUnhandledExceptionFilter API to set a top level exception
|
| // handler for the process. When the process eventually initializes, CRT sets
|
| @@ -80,7 +80,6 @@ void DisableSetUnhandledExceptionFilter() {
|
| SetUnhandledExceptionFilterPatch);
|
| CHECK(patched == 0);
|
| }
|
| -#endif // !defined(ADDRESS_SANITIZER)
|
|
|
| } // namespace
|
|
|
| @@ -113,13 +112,13 @@ BOOL APIENTRY DllMain(HMODULE module, DWORD reason, LPVOID reserved) {
|
| InitializeCrashReportingForProcess();
|
| // CRT on initialization installs an exception filter which calls
|
| // TerminateProcess. We need to hook CRT's attempt to set an exception
|
| - // handler and ignore it. Don't do this when ASan is present, or ASan will
|
| - // fail to install its own unhandled exception filter.
|
| -#if !defined(ADDRESS_SANITIZER)
|
| + // handler and ignore it.
|
| DisableSetUnhandledExceptionFilter();
|
| -#endif
|
|
|
| install_static::InitializeProcessType();
|
| + if (install_static::g_process_type ==
|
| + install_static::ProcessType::BROWSER_PROCESS)
|
| + EarlyBrowserSecurity();
|
|
|
| __try {
|
| blacklist::Initialize(false); // Don't force, abort if beacon is present.
|
|
|