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

Unified Diff: chrome_elf/chrome_elf_main.cc

Issue 2431483004: Signal chrome_elf to initialize crash reporting, rather than doing it in DllMain (Closed)
Patch Set: Created 4 years, 2 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 | « chrome_elf/chrome_elf_main.h ('k') | 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..027821adfa3e2c72367155f5af5b4330eb9cbdf7 100644
--- a/chrome_elf/chrome_elf_main.cc
+++ b/chrome_elf/chrome_elf_main.cc
@@ -84,6 +84,13 @@ void DisableSetUnhandledExceptionFilter() {
} // namespace
+// This function is a temporary workaround for https://crbug.com/655788. We
+// need to come up with a better way to initialize crash reporting that can
+// happen inside DllMain().
+void SignalInitializeCrashReporting() {
+ InitializeCrashReportingForProcess();
+}
+
void SignalChromeElf() {
blacklist::ResetBeacon();
}
@@ -110,11 +117,6 @@ extern "C" __declspec(dllexport) void SetMetricsClientId(
BOOL APIENTRY DllMain(HMODULE module, DWORD reason, LPVOID reserved) {
if (reason == DLL_PROCESS_ATTACH) {
- 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)
DisableSetUnhandledExceptionFilter();
#endif
« no previous file with comments | « chrome_elf/chrome_elf_main.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698