Commit 08078f62 authored by erikwright's avatar erikwright Committed by Commit bot

Revert "ScopedCrashKey doesn't appear to be configured to work on Windows....

Revert "ScopedCrashKey doesn't appear to be configured to work on Windows. Manually set the crash key."

This reverts commit af3e767a. The reverted code is a workaround. The root cause is addressed by http://crrev.com/985763004/ .

BUG=460512

Review URL: https://codereview.chromium.org/981183003

Cr-Commit-Position: refs/heads/master@{#319631}
parent 8fa91aab
......@@ -10,10 +10,10 @@
#include <string>
#include "base/debug/crash_logging.h"
#include "base/guid.h"
#include "base/logging.h"
#include "base/process/process_handle.h"
#include "base/strings/utf_string_conversions.h"
#include "base/win/wrapped_window_proc.h"
#include "breakpad/src/client/windows/common/ipc_protocol.h"
#include "chrome/app/chrome_watcher_client_win.h"
......@@ -61,45 +61,33 @@ extern "C" void __declspec(dllexport) ReportCrashWithProtobuf(
sizeof(reinterpret_cast<google_breakpad::CustomInfoEntry*>(0)->value),
"CrashKey and CustomInfoEntry structs are not compatible.");
breakpad::CrashKeysWin* keeper = breakpad::CrashKeysWin::keeper();
if (!keeper)
return;
// Assign a GUID that can be used to correlate the Kasko report to the
// Breakpad report, to verify data consistency.
std::string guid = base::GenerateGUID();
{
keeper->SetCrashKeyValue(base::ASCIIToUTF16(crash_keys::kKaskoGuid).c_str(),
base::ASCIIToUTF16(guid).c_str());
base::debug::ScopedCrashKey kasko_guid(crash_keys::kKaskoGuid, guid);
size_t crash_key_count = keeper->custom_info_entries().size();
size_t crash_key_count =
breakpad::CrashKeysWin::keeper()->custom_info_entries().size();
const kasko::api::CrashKey* crash_keys =
reinterpret_cast<const kasko::api::CrashKey*>(
keeper->custom_info_entries().data());
breakpad::CrashKeysWin::keeper()->custom_info_entries().data());
if (g_chrome_watcher_client &&
g_chrome_watcher_client->EnsureInitialized()) {
kasko::api::SendReport(info, protobuf, protobuf_length, crash_keys,
crash_key_count);
}
keeper->ClearCrashKeyValue(
base::ASCIIToUTF16(crash_keys::kKaskoGuid).c_str());
}
{
keeper->SetCrashKeyValue(
base::ASCIIToUTF16(crash_keys::kKaskoEquivalentGuid).c_str(),
base::ASCIIToUTF16(guid).c_str());
base::debug::ScopedCrashKey kasko_equivalent_guid(
crash_keys::kKaskoEquivalentGuid, guid);
// While Kasko remains experimental, also report via Breakpad.
base::win::WinProcExceptionFilter crash_for_exception =
reinterpret_cast<base::win::WinProcExceptionFilter>(::GetProcAddress(
::GetModuleHandle(chrome::kBrowserProcessExecutableName),
"CrashForException"));
crash_for_exception(info);
keeper->ClearCrashKeyValue(
base::ASCIIToUTF16(crash_keys::kKaskoEquivalentGuid).c_str());
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment