OLD | NEW |
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 1938 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1949 // On Android we need to provide a FD to the file where the minidump is | 1949 // On Android we need to provide a FD to the file where the minidump is |
1950 // generated as the renderer and browser run with different UIDs | 1950 // generated as the renderer and browser run with different UIDs |
1951 // (preventing the browser from inspecting the renderer process). | 1951 // (preventing the browser from inspecting the renderer process). |
1952 int minidump_fd = base::GlobalDescriptors::GetInstance()->MaybeGet( | 1952 int minidump_fd = base::GlobalDescriptors::GetInstance()->MaybeGet( |
1953 GetCrashReporterClient()->GetAndroidMinidumpDescriptor()); | 1953 GetCrashReporterClient()->GetAndroidMinidumpDescriptor()); |
1954 if (minidump_fd < 0) { | 1954 if (minidump_fd < 0) { |
1955 NOTREACHED() << "Could not find minidump FD, crash reporting disabled."; | 1955 NOTREACHED() << "Could not find minidump FD, crash reporting disabled."; |
1956 } else { | 1956 } else { |
1957 InitCrashKeys(); | 1957 InitCrashKeys(); |
1958 EnableNonBrowserCrashDumping(process_type, minidump_fd); | 1958 EnableNonBrowserCrashDumping(process_type, minidump_fd); |
| 1959 // Note: not installing DumpWithoutCrash handler here because browser |
| 1960 // is not set up to receive multiple reports from child process. |
1959 } | 1961 } |
1960 } | 1962 } |
1961 } | 1963 } |
1962 | 1964 |
1963 // The microdump handler does NOT upload anything. It just dumps out on the | 1965 // The microdump handler does NOT upload anything. It just dumps out on the |
1964 // system console (logcat) a restricted and serialized variant of a minidump. | 1966 // system console (logcat) a restricted and serialized variant of a minidump. |
1965 // See crbug.com/410294 for more details. | 1967 // See crbug.com/410294 for more details. |
1966 void InitMicrodumpCrashHandlerIfNecessary(const std::string& process_type) { | 1968 void InitMicrodumpCrashHandlerIfNecessary(const std::string& process_type) { |
1967 if (!GetCrashReporterClient()->ShouldEnableBreakpadMicrodumps()) | 1969 if (!GetCrashReporterClient()->ShouldEnableBreakpadMicrodumps()) |
1968 return; | 1970 return; |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2003 void SuppressDumpGeneration() { | 2005 void SuppressDumpGeneration() { |
2004 g_dumps_suppressed = G_DUMPS_SUPPRESSED_MAGIC; | 2006 g_dumps_suppressed = G_DUMPS_SUPPRESSED_MAGIC; |
2005 } | 2007 } |
2006 #endif // OS_ANDROID | 2008 #endif // OS_ANDROID |
2007 | 2009 |
2008 bool IsCrashReporterEnabled() { | 2010 bool IsCrashReporterEnabled() { |
2009 return g_is_crash_reporter_enabled; | 2011 return g_is_crash_reporter_enabled; |
2010 } | 2012 } |
2011 | 2013 |
2012 } // namespace breakpad | 2014 } // namespace breakpad |
OLD | NEW |