summaryrefslogtreecommitdiffstats
path: root/chrome/app/breakpad.cc
diff options
context:
space:
mode:
authordeanm@chromium.org <deanm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-08 21:21:41 +0000
committerdeanm@chromium.org <deanm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-08 21:21:41 +0000
commit8f7b2f6b5f2d168cffb2e09e5b6adc1c1d1b6ed8 (patch)
tree54933e0269c39331463d2fd6c5c71ce958f2fddd /chrome/app/breakpad.cc
parent70992c20e43f53bad0866139b08e2fa6f5b924df (diff)
downloadchromium_src-8f7b2f6b5f2d168cffb2e09e5b6adc1c1d1b6ed8.zip
chromium_src-8f7b2f6b5f2d168cffb2e09e5b6adc1c1d1b6ed8.tar.gz
chromium_src-8f7b2f6b5f2d168cffb2e09e5b6adc1c1d1b6ed8.tar.bz2
EXPERIMENT:
Push breakpad initialization until chrome.dll has already been loaded. This basically currently happens anyway, since loading chrome.dll in the main thread will beat the threaded breakpad initialization. Retrieving the file version information goes from ~4ms to ~1ms if chrome.dll is already loaded. Also move the file version code to the initialization thread. Review URL: http://codereview.chromium.org/10242 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5069 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/app/breakpad.cc')
-rw-r--r--chrome/app/breakpad.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/chrome/app/breakpad.cc b/chrome/app/breakpad.cc
index 773a2da..8dac8ab 100644
--- a/chrome/app/breakpad.cc
+++ b/chrome/app/breakpad.cc
@@ -155,6 +155,10 @@ bool ShowRestartDialogIfCrashed(bool* exit_now) {
static DWORD __stdcall InitCrashReporterThread(void* param) {
CrashReporterInfo* info = reinterpret_cast<CrashReporterInfo*>(param);
+ // GetCustomInfo can take a few milliseconds to get the file information, so
+ // we do it here so it can run in a separate thread.
+ info->custom_info = GetCustomInfo(info->dll_path, info->process_type);
+
CommandLine command;
bool full_dump = command.HasSwitch(switches::kFullMemoryCrashReport);
bool use_crash_service = command.HasSwitch(switches::kNoErrorDialogs) ||
@@ -235,7 +239,6 @@ void InitCrashReporter(std::wstring dll_path) {
if (info->process_type.empty())
info->process_type = L"browser";
- info->custom_info = GetCustomInfo(dll_path, info->process_type);
info->dll_path = dll_path;
// If this is not the browser, we can't be sure that we will be able to