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

Side by Side Diff: components/crash/content/app/breakpad_linux.cc

Issue 2245403002: Don't reuse the minidump descriptor for the crash signal pipe. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: amend comment; default implementation should return an invalid fd 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // For linux_syscall_support.h. This makes it safe to call embedded system 5 // For linux_syscall_support.h. This makes it safe to call embedded system
6 // calls when in seccomp mode. 6 // calls when in seccomp mode.
7 7
8 #include "components/crash/content/app/breakpad_linux.h" 8 #include "components/crash/content/app/breakpad_linux.h"
9 9
10 #include <fcntl.h> 10 #include <fcntl.h>
(...skipping 914 matching lines...) Expand 10 before | Expand all | Expand 10 after
925 // generated dumps for WebView because we only know the file 925 // generated dumps for WebView because we only know the file
926 // descriptor to which we are dumping at the time of the call to 926 // descriptor to which we are dumping at the time of the call to
927 // |DumpWithoutCrashing()|. Therefore we need to construct the 927 // |DumpWithoutCrashing()|. Therefore we need to construct the
928 // |MinidumpDescriptor| and |ExceptionHandler| instances as 928 // |MinidumpDescriptor| and |ExceptionHandler| instances as
929 // needed, instead of setting up |g_breakpad| at initialization 929 // needed, instead of setting up |g_breakpad| at initialization
930 // time. 930 // time.
931 base::debug::SetDumpWithoutCrashingFunction( 931 base::debug::SetDumpWithoutCrashingFunction(
932 &GenerateMinidumpOnDemandForAndroid); 932 &GenerateMinidumpOnDemandForAndroid);
933 } else if (!process_type.empty()) { 933 } else if (!process_type.empty()) {
934 g_signal_code_pipe_fd = 934 g_signal_code_pipe_fd =
935 GetCrashReporterClient()->GetAndroidMinidumpDescriptor(); 935 GetCrashReporterClient()->GetAndroidCrashSignalFD();
936 if (g_signal_code_pipe_fd != -1) 936 if (g_signal_code_pipe_fd != -1)
937 g_microdump->set_crash_handler(WriteSignalCodeToPipe); 937 g_microdump->set_crash_handler(WriteSignalCodeToPipe);
938 } 938 }
939 } 939 }
940 940
941 #else 941 #else
942 // Non-Browser = Extension, Gpu, Plugins, Ppapi and Renderer 942 // Non-Browser = Extension, Gpu, Plugins, Ppapi and Renderer
943 class NonBrowserCrashHandler : public google_breakpad::CrashGenerationClient { 943 class NonBrowserCrashHandler : public google_breakpad::CrashGenerationClient {
944 public: 944 public:
945 NonBrowserCrashHandler() 945 NonBrowserCrashHandler()
(...skipping 988 matching lines...) Expand 10 before | Expand all | Expand 10 after
1934 const std::string& gpu_fingerprint) { 1934 const std::string& gpu_fingerprint) {
1935 g_microdump_info.Get().SetGpuFingerprint(gpu_fingerprint); 1935 g_microdump_info.Get().SetGpuFingerprint(gpu_fingerprint);
1936 } 1936 }
1937 #endif // OS_ANDROID 1937 #endif // OS_ANDROID
1938 1938
1939 bool IsCrashReporterEnabled() { 1939 bool IsCrashReporterEnabled() {
1940 return g_is_crash_reporter_enabled; 1940 return g_is_crash_reporter_enabled;
1941 } 1941 }
1942 1942
1943 } // namespace breakpad 1943 } // namespace breakpad
OLDNEW
« no previous file with comments | « android_webview/crash_reporter/aw_microdump_crash_reporter.cc ('k') | components/crash/content/app/crash_reporter_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698