Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6417)

Unified Diff: chrome_elf/chrome_elf_main.cc

Issue 2223783003: [Windows Sandbox] Turn on MITIGATION_EXTENSION_POINT_DISABLE for browser processes. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698