diff options
-rw-r--r-- | chrome/app/breakpad.cc | 5 | ||||
-rw-r--r-- | chrome/app/chrome_exe_main.cc | 5 |
2 files changed, 7 insertions, 3 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 diff --git a/chrome/app/chrome_exe_main.cc b/chrome/app/chrome_exe_main.cc index 9f21096..2fe33ce 100644 --- a/chrome/app/chrome_exe_main.cc +++ b/chrome/app/chrome_exe_main.cc @@ -80,11 +80,12 @@ int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE prev_instance, delete[] version; } + HINSTANCE dll_handle = ::LoadLibraryEx(dll_name, NULL, + LOAD_WITH_ALTERED_SEARCH_PATH); + // Initialize the crash reporter. InitCrashReporter(client_util::GetDLLPath(dll_name, dll_path)); - HINSTANCE dll_handle = ::LoadLibraryEx(dll_name, NULL, - LOAD_WITH_ALTERED_SEARCH_PATH); if (NULL != dll_handle) { client_util::DLL_MAIN entry = reinterpret_cast<client_util::DLL_MAIN>( ::GetProcAddress(dll_handle, "ChromeMain")); |