mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-02-03 12:37:36 +01:00
Standardize product/version/platform crash keys (issue #1995)
This commit is contained in:
parent
819dcdf461
commit
18ce862ad8
@ -203,7 +203,7 @@ index c658fa9..8c4a145 100644
|
|||||||
g_crash_helper_enabled = true;
|
g_crash_helper_enabled = true;
|
||||||
return true;
|
return true;
|
||||||
diff --git components/crash/content/app/breakpad_linux.cc components/crash/content/app/breakpad_linux.cc
|
diff --git components/crash/content/app/breakpad_linux.cc components/crash/content/app/breakpad_linux.cc
|
||||||
index 6e5058e..3dd2b56 100644
|
index 6e5058e..f2309ad 100644
|
||||||
--- components/crash/content/app/breakpad_linux.cc
|
--- components/crash/content/app/breakpad_linux.cc
|
||||||
+++ components/crash/content/app/breakpad_linux.cc
|
+++ components/crash/content/app/breakpad_linux.cc
|
||||||
@@ -29,6 +29,7 @@
|
@@ -29,6 +29,7 @@
|
||||||
@ -240,7 +240,29 @@ index 6e5058e..3dd2b56 100644
|
|||||||
"--timeout=10", // Set a timeout so we don't hang forever.
|
"--timeout=10", // Set a timeout so we don't hang forever.
|
||||||
"--tries=1", // Don't retry if the upload fails.
|
"--tries=1", // Don't retry if the upload fails.
|
||||||
"-O", // output reply to fd 3
|
"-O", // output reply to fd 3
|
||||||
@@ -1906,6 +1908,17 @@ void InitCrashReporter(const std::string& process_type) {
|
@@ -1612,10 +1614,19 @@ void HandleCrashDump(const BreakpadInfo& info) {
|
||||||
|
GetCrashReporterClient()->GetProductNameAndVersion(&product_name, &version);
|
||||||
|
|
||||||
|
writer.AddBoundary();
|
||||||
|
- writer.AddPairString("prod", product_name);
|
||||||
|
+ writer.AddPairString("product", product_name);
|
||||||
|
writer.AddBoundary();
|
||||||
|
- writer.AddPairString("ver", version);
|
||||||
|
+ writer.AddPairString("version", version);
|
||||||
|
writer.AddBoundary();
|
||||||
|
+
|
||||||
|
+#if defined(ARCH_CPU_32_BITS)
|
||||||
|
+ const char* platform = "linux32";
|
||||||
|
+#elif defined(ARCH_CPU_64_BITS)
|
||||||
|
+ const char* platform = "linux64";
|
||||||
|
+#endif
|
||||||
|
+ writer.AddPairString("platform", platform);
|
||||||
|
+ writer.AddBoundary();
|
||||||
|
+
|
||||||
|
if (info.pid > 0) {
|
||||||
|
char pid_value_buf[kUint64StringSize];
|
||||||
|
uint64_t pid_value_len = my_uint64_len(info.pid);
|
||||||
|
@@ -1906,6 +1917,17 @@ void InitCrashReporter(const std::string& process_type) {
|
||||||
PostEnableBreakpadInitialization();
|
PostEnableBreakpadInitialization();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -389,7 +411,7 @@ index 25ae505..d923b39 100644
|
|||||||
|
|
||||||
} // namespace crash_reporter
|
} // namespace crash_reporter
|
||||||
diff --git components/crash/content/app/crashpad_mac.mm components/crash/content/app/crashpad_mac.mm
|
diff --git components/crash/content/app/crashpad_mac.mm components/crash/content/app/crashpad_mac.mm
|
||||||
index 7df66ea..1e24110 100644
|
index 7df66ea..4ee709a 100644
|
||||||
--- components/crash/content/app/crashpad_mac.mm
|
--- components/crash/content/app/crashpad_mac.mm
|
||||||
+++ components/crash/content/app/crashpad_mac.mm
|
+++ components/crash/content/app/crashpad_mac.mm
|
||||||
@@ -16,11 +16,14 @@
|
@@ -16,11 +16,14 @@
|
||||||
@ -446,15 +468,15 @@ index 7df66ea..1e24110 100644
|
|||||||
+ NSString* product = base::mac::ObjCCast<NSString>([outer_bundle
|
+ NSString* product = base::mac::ObjCCast<NSString>([outer_bundle
|
||||||
+ objectForInfoDictionaryKey:base::mac::CFToNSCast(
|
+ objectForInfoDictionaryKey:base::mac::CFToNSCast(
|
||||||
+ kCFBundleNameKey)]);
|
+ kCFBundleNameKey)]);
|
||||||
+ process_annotations["prod"] =
|
+ process_annotations["product"] =
|
||||||
+ base::SysNSStringToUTF8(product).append("_Mac");
|
+ base::SysNSStringToUTF8(product).append("_Mac");
|
||||||
+ } else {
|
+ } else {
|
||||||
+ process_annotations["prod"] = product_name;
|
+ process_annotations["product"] = product_name;
|
||||||
+ }
|
+ }
|
||||||
|
|
||||||
#if defined(GOOGLE_CHROME_BUILD)
|
#if defined(GOOGLE_CHROME_BUILD)
|
||||||
NSString* channel = base::mac::ObjCCast<NSString>(
|
NSString* channel = base::mac::ObjCCast<NSString>(
|
||||||
@@ -73,10 +88,14 @@ base::FilePath PlatformCrashpadInitialization(bool initial_client,
|
@@ -73,12 +88,16 @@ base::FilePath PlatformCrashpadInitialization(bool initial_client,
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -466,13 +488,16 @@ index 7df66ea..1e24110 100644
|
|||||||
+ NSString* version =
|
+ NSString* version =
|
||||||
+ base::mac::ObjCCast<NSString>([base::mac::FrameworkBundle()
|
+ base::mac::ObjCCast<NSString>([base::mac::FrameworkBundle()
|
||||||
+ objectForInfoDictionaryKey:@"CFBundleShortVersionString"]);
|
+ objectForInfoDictionaryKey:@"CFBundleShortVersionString"]);
|
||||||
+ process_annotations["ver"] = base::SysNSStringToUTF8(version);
|
+ process_annotations["version"] = base::SysNSStringToUTF8(version);
|
||||||
+ } else {
|
+ } else {
|
||||||
+ process_annotations["ver"] = product_version;
|
+ process_annotations["version"] = product_version;
|
||||||
+ }
|
+ }
|
||||||
|
|
||||||
process_annotations["plat"] = std::string("OS X");
|
- process_annotations["plat"] = std::string("OS X");
|
||||||
|
+ process_annotations["platform"] = std::string("macos");
|
||||||
|
|
||||||
|
std::vector<std::string> arguments;
|
||||||
|
if (!browser_process) {
|
||||||
@@ -90,6 +109,12 @@ base::FilePath PlatformCrashpadInitialization(bool initial_client,
|
@@ -90,6 +109,12 @@ base::FilePath PlatformCrashpadInitialization(bool initial_client,
|
||||||
"--reset-own-crash-exception-port-to-system-default");
|
"--reset-own-crash-exception-port-to-system-default");
|
||||||
}
|
}
|
||||||
@ -487,9 +512,29 @@ index 7df66ea..1e24110 100644
|
|||||||
bool result = crashpad_client.StartHandler(handler_path,
|
bool result = crashpad_client.StartHandler(handler_path,
|
||||||
database_path,
|
database_path,
|
||||||
diff --git components/crash/content/app/crashpad_win.cc components/crash/content/app/crashpad_win.cc
|
diff --git components/crash/content/app/crashpad_win.cc components/crash/content/app/crashpad_win.cc
|
||||||
index 1e9c06c..8ed020d 100644
|
index 1e9c06c..92ad937 100644
|
||||||
--- components/crash/content/app/crashpad_win.cc
|
--- components/crash/content/app/crashpad_win.cc
|
||||||
+++ components/crash/content/app/crashpad_win.cc
|
+++ components/crash/content/app/crashpad_win.cc
|
||||||
|
@@ -41,15 +41,15 @@ void GetPlatformCrashpadAnnotations(
|
||||||
|
base::string16 product_name, version, special_build, channel_name;
|
||||||
|
crash_reporter_client->GetProductNameAndVersion(
|
||||||
|
exe_file, &product_name, &version, &special_build, &channel_name);
|
||||||
|
- (*annotations)["prod"] = base::UTF16ToUTF8(product_name);
|
||||||
|
- (*annotations)["ver"] = base::UTF16ToUTF8(version);
|
||||||
|
+ (*annotations)["product"] = base::UTF16ToUTF8(product_name);
|
||||||
|
+ (*annotations)["version"] = base::UTF16ToUTF8(version);
|
||||||
|
(*annotations)["channel"] = base::UTF16ToUTF8(channel_name);
|
||||||
|
if (!special_build.empty())
|
||||||
|
(*annotations)["special"] = base::UTF16ToUTF8(special_build);
|
||||||
|
#if defined(ARCH_CPU_X86)
|
||||||
|
- (*annotations)["plat"] = std::string("Win32");
|
||||||
|
+ (*annotations)["platform"] = std::string("win32");
|
||||||
|
#elif defined(ARCH_CPU_X86_64)
|
||||||
|
- (*annotations)["plat"] = std::string("Win64");
|
||||||
|
+ (*annotations)["platform"] = std::string("win64");
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
@@ -81,7 +81,7 @@ base::FilePath PlatformCrashpadInitialization(bool initial_client,
|
@@ -81,7 +81,7 @@ base::FilePath PlatformCrashpadInitialization(bool initial_client,
|
||||||
#if defined(GOOGLE_CHROME_BUILD)
|
#if defined(GOOGLE_CHROME_BUILD)
|
||||||
std::string url = "https://clients2.google.com/cr/report";
|
std::string url = "https://clients2.google.com/cr/report";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user