OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #include "components/crash/content/app/crashpad.h" | 5 #include "components/crash/content/app/crashpad.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/environment.h" | 9 #include "base/environment.h" |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 if (embedded_handler) { | 100 if (embedded_handler) { |
101 arguments.push_back(std::string("--type=") + switches::kCrashpadHandler); | 101 arguments.push_back(std::string("--type=") + switches::kCrashpadHandler); |
102 // The prefetch argument added here has to be documented in | 102 // The prefetch argument added here has to be documented in |
103 // chrome_switches.cc, below the kPrefetchArgument* constants. A constant | 103 // chrome_switches.cc, below the kPrefetchArgument* constants. A constant |
104 // can't be used here because crashpad can't depend on Chrome. | 104 // can't be used here because crashpad can't depend on Chrome. |
105 arguments.push_back("/prefetch:7"); | 105 arguments.push_back("/prefetch:7"); |
106 } else { | 106 } else { |
107 base::FilePath exe_dir = exe_file.DirName(); | 107 base::FilePath exe_dir = exe_file.DirName(); |
108 exe_file = exe_dir.Append(FILE_PATH_LITERAL("crashpad_handler.exe")); | 108 exe_file = exe_dir.Append(FILE_PATH_LITERAL("crashpad_handler.exe")); |
109 } | 109 } |
| 110 // TODO(scottmg): See https://crashpad.chromium.org/bug/23. |
| 111 arguments.push_back("--no-rate-limit"); |
110 | 112 |
111 result = g_crashpad_client.Get().StartHandler( | 113 result = g_crashpad_client.Get().StartHandler( |
112 exe_file, database_path, url, process_annotations, arguments, false); | 114 exe_file, database_path, url, process_annotations, arguments, false); |
113 | 115 |
114 // If we're the browser, push the pipe name into the environment so child | 116 // If we're the browser, push the pipe name into the environment so child |
115 // processes can connect to it. If we inherited another crashpad_handler's | 117 // processes can connect to it. If we inherited another crashpad_handler's |
116 // pipe name, we'll overwrite it here. | 118 // pipe name, we'll overwrite it here. |
117 env->SetVar(kPipeNameVar, | 119 env->SetVar(kPipeNameVar, |
118 base::UTF16ToUTF8(g_crashpad_client.Get().GetHandlerIPCPipe())); | 120 base::UTF16ToUTF8(g_crashpad_client.Get().GetHandlerIPCPipe())); |
119 } else { | 121 } else { |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 void __declspec(dllexport) __cdecl UnregisterNonABICompliantCodeRange( | 285 void __declspec(dllexport) __cdecl UnregisterNonABICompliantCodeRange( |
284 void* start) { | 286 void* start) { |
285 ExceptionHandlerRecord* record = | 287 ExceptionHandlerRecord* record = |
286 reinterpret_cast<ExceptionHandlerRecord*>(start); | 288 reinterpret_cast<ExceptionHandlerRecord*>(start); |
287 | 289 |
288 CHECK(RtlDeleteFunctionTable(&record->runtime_function)); | 290 CHECK(RtlDeleteFunctionTable(&record->runtime_function)); |
289 } | 291 } |
290 #endif // ARCH_CPU_X86_64 | 292 #endif // ARCH_CPU_X86_64 |
291 | 293 |
292 } // extern "C" | 294 } // extern "C" |
OLD | NEW |