5513e66982
* chore: bump chromium in DEPS to 94.0.4604.0 * build: 3-way merge of chromium patches * chore: bump chromium in DEPS to 94.0.4605.0 * build: 3-way merge of chromium patches * 3076040: Reland Remove delete_children RemoveAllChildViews arg Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3076040 * 3069287: Remove the remaining uses and delete the deprecated API Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3069287 * 2297212: Replace RemoveWithoutPathExpansion(.*, nullptr) with Value::RemoveKey() Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2297212 Also: https://chromium-review.googlesource.com/c/chromium/src/+/3060296 * 3082756: Change transport_security_persister_path param to be a path to a file. Refs: https://chromium-review.googlesource.com/c/chromium/src/+/3082756 > this CL intentionally changes the name of the parameter > in the network context parameters and the order of the constructor > parameters to ensure all callers update their code to pass a full > file path rather than a path to a directory. The 'path' in this diff is already an absolute path, coming from `CHECK(base::PathService::Get(chrome::DIR_USER_DATA, &path_));` at08ff1c2cbf/shell/browser/electron_browser_context.cc (L126)
* iwyu: network::mojom::HttpRawHeaderPair * fixup! 3076040: Reland Remove delete_children RemoveAllChildViews arg Missed one. * 2999884: CodeHealth: Remove DictionaryValue::GetStringWithoutPathExpansion Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2999884 (example of replacing GetStringWithoutPathExpansion() w/FindStringKey()) Also: https://chromium-review.googlesource.com/c/chromium/src/+/3060296 (removal of DictionaryValue::GetStringWithoutPathExpansion) * 3059260: Remove kSameSiteByDefaultCookies and kCookiesWithoutSameSiteMustBeSecure Refs: https://chromium-review.googlesource.com/c/chromium/src/+/3059260 We had both of these in a 'disable_features' list. Since these feature have been removed upstream, remove them from our disable list, too. IMPORTANT: this commit should not be backported to older branches that still have these features, because doing so would un-disable them. * 2920890: Load reroute_info from download in-progress and history db back into DownloadItem. Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2920890 * 3039323: [Clipboard API] Clipboard Custom Formats implementation Part 5. Refs: https://chromium-review.googlesource.com/c/chromium/src/+/3039323 * chore: bump chromium in DEPS to 94.0.4606.0 * 3084502: Add a new PrintRasterizePdfDpi policy. Refs: https://chromium-review.googlesource.com/c/chromium/src/+/3084502 * chore: update patches * chore: bump chromium in DEPS to 94.0.4606.3 * chore: bump chromium in DEPS to 95.0.4608.0 * chore: bump chromium in DEPS to 95.0.4609.0 * [DevTools] Remove report_raw_headers from network::ResourceRequest https://chromium-review.googlesource.com/c/chromium/src/+/2856099 * Remove content::WebContentsObserver::OnInterfaceRequestFromFrame https://chromium-review.googlesource.com/c/chromium/src/+/3092665 * Disable kDesktopCaptureMacV2 https://chromium-review.googlesource.com/c/chromium/src/+/3069272 * Add a new PrintRasterizePdfDpi policy. https://chromium-review.googlesource.com/c/chromium/src/+/3084502 * chore: update patches * chore: bump chromium in DEPS to 95.0.4609.3 * disable `use_lld` for macos * chore: update patches * Linux: use chrome_crashpad_handler instead of crashpad_handler https://chromium-review.googlesource.com/c/chromium/src/+/3054290 * chore: fix lint * Revert "[DevTools] Remove report_raw_headers from network::ResourceRequest" This reverts commit 28f4da1582d046e96cb58f3cbb590503e89dfd0d. * [DevTools] Remove report_raw_headers from network::ResourceRequest (Attempt #2) https://chromium-review.googlesource.com/c/chromium/src/+/2856099 * DCHECK that predictor always has a non-empty NetworkIsolationKey. https://chromium-review.googlesource.com/c/chromium/src/+/3067698 * Remove --no-untrusted-code-mitigations from //content and //gin https://chromium-review.googlesource.com/c/chromium/src/+/3096585 * fixup! Remove kSameSiteByDefaultCookies and kCookiesWithoutSameSiteMustBeSecure https://chromium-review.googlesource.com/c/chromium/src/+/3059260 * fixup! Remove kSameSiteByDefaultCookies and kCookiesWithoutSameSiteMustBeSecure * Convert PrintManager to RenderFrameHostReceiverSet. https://chromium-review.googlesource.com/c/chromium/src/+/3072019 * chore: bump chromium in DEPS to 95.0.4612.5 * chore: disable v8 oilpan * [Compiler] Remove untrusted code mitigations. https://chromium-review.googlesource.com/c/v8/v8/+/3045704 * Remove most FTP logic from services/network. https://chromium-review.googlesource.com/c/chromium/src/+/3076119 * Rename scale_factor.h -> resource_scale_factor.h https://chromium-review.googlesource.com/c/chromium/src/+/3057113 * [GURL -> SiteForCookies] extensions/ https://chromium-review.googlesource.com/c/chromium/src/+/3100825 * breadcrumbs: add desktop entry point https://chromium-review.googlesource.com/c/chromium/src/+/3021746 * Move args_ to private in ExtensionFunction https://chromium-review.googlesource.com/c/chromium/src/+/3076261 * chore: iwyu * fixup! Remove kSameSiteByDefaultCookies and kCookiesWithoutSameSiteMustBeSecure * Disable kDesktopCaptureMacV2 https://chromium-review.googlesource.com/c/chromium/src/+/3069272 * fixup! [Compiler] Remove untrusted code mitigations. * fixup! Disable kDesktopCaptureMacV2 * Revert "chore: disable v8 oilpan" This reverts commit 5d255cf1d8e8efbb906047937a713279e5f800d0. * Reland "chore: disable v8 oilpan" This reverts commit 1c252765b07a205560e7b5eed06de2605336e2d8. The previous revert was to test on which platforms did the heapsnapshot test actually fail. * [Clipboard API] Clipboard Custom Formats implementation Part 5. https://chromium-review.googlesource.com/c/chromium/src/+/3039323 * Convert ExtensionFrameHost to RenderFrameHostReceiverSet. https://chromium-review.googlesource.com/c/chromium/src/+/3063358 * Convert PDFWebContentsHelper to RenderFrameHostReceiverSet. https://chromium-review.googlesource.com/c/chromium/src/+/3049751 * [Underscore Migration] Migrate ui/legacy https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3093160 * chore: remove unknown permission error * chore: fix lint * chore: ignore -Wunreachable-code-return for node deps/ * fixup! chore: ignore -Wunreachable-code-return for node deps/ * fix: windows build * fix: build dependency Dependency was missed incbeae20438
* 3108669: arm,dsp: Fix 8bpp Dct64_NEON(). https://chromium-review.googlesource.com/c/codecs/libgav1/+/3108669 * chore: revert libgav1 roll * Revert "3108669: arm,dsp: Fix 8bpp Dct64_NEON()." This reverts commit 7ed31323127aac8ba2eaff9cae6c9be9a4954f33. * Revert "chore: revert libgav1 roll" This reverts commit 084a490d298811267316c786762fe7aa91b6318d. * chore: revert clang roll * chore: Fix -Wunreachable-code-aggressive warnings in arm and arm64 code Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Charles Kerr <charles@charleskerr.com> Co-authored-by: deepak1556 <hop2deep@gmail.com> Co-authored-by: mlaurencin <mlaurencin@electronjs.org> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
155 lines
6.3 KiB
Diff
155 lines
6.3 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Jeremy Apthorp <jeremya@chromium.org>
|
|
Date: Thu, 30 Apr 2020 10:08:06 -0700
|
|
Subject: crash: allow setting more options
|
|
|
|
This allows the client of //components/crash to set upload url,
|
|
rate-limiting, compression and global annotations.
|
|
|
|
This should be upstreamed.
|
|
|
|
diff --git a/components/crash/core/app/breakpad_linux.cc b/components/crash/core/app/breakpad_linux.cc
|
|
index 00009dacdc2b084d7c647ab34c8c8be6decf1a5b..5eb19c8a47467d8df30316bfbd7f3c2f38aea7c0 100644
|
|
--- a/components/crash/core/app/breakpad_linux.cc
|
|
+++ b/components/crash/core/app/breakpad_linux.cc
|
|
@@ -112,6 +112,7 @@ void SetUploadURL(const std::string& url) {
|
|
}
|
|
#endif
|
|
|
|
+bool g_is_node = false;
|
|
bool g_is_crash_reporter_enabled = false;
|
|
uint64_t g_process_start_time = 0;
|
|
pid_t g_pid = 0;
|
|
diff --git a/components/crash/core/app/crash_reporter_client.cc b/components/crash/core/app/crash_reporter_client.cc
|
|
index 89b4bfccd5d3278231726184547378805fb30ed5..9f0cb9d52e2f7fc0c1808500b775bc28b4514d00 100644
|
|
--- a/components/crash/core/app/crash_reporter_client.cc
|
|
+++ b/components/crash/core/app/crash_reporter_client.cc
|
|
@@ -139,6 +139,17 @@ bool CrashReporterClient::ReportingIsEnforcedByPolicy(bool* breakpad_enabled) {
|
|
return false;
|
|
}
|
|
|
|
+bool CrashReporterClient::GetShouldRateLimit() {
|
|
+ return true;
|
|
+}
|
|
+
|
|
+bool CrashReporterClient::GetShouldCompressUploads() {
|
|
+ return true;
|
|
+}
|
|
+
|
|
+void CrashReporterClient::GetProcessSimpleAnnotations(std::map<std::string, std::string>* annotations) {
|
|
+}
|
|
+
|
|
#if defined(OS_ANDROID)
|
|
unsigned int CrashReporterClient::GetCrashDumpPercentage() {
|
|
return 100;
|
|
diff --git a/components/crash/core/app/crash_reporter_client.h b/components/crash/core/app/crash_reporter_client.h
|
|
index 39557cce474439238255ecd28030215085db0c81..5b3f980837911c710686ab91a2a81c318334080b 100644
|
|
--- a/components/crash/core/app/crash_reporter_client.h
|
|
+++ b/components/crash/core/app/crash_reporter_client.h
|
|
@@ -5,6 +5,7 @@
|
|
#ifndef COMPONENTS_CRASH_CORE_APP_CRASH_REPORTER_CLIENT_H_
|
|
#define COMPONENTS_CRASH_CORE_APP_CRASH_REPORTER_CLIENT_H_
|
|
|
|
+#include <map>
|
|
#include <string>
|
|
|
|
#include "build/build_config.h"
|
|
@@ -144,6 +145,19 @@ class CrashReporterClient {
|
|
// that case, |breakpad_enabled| is set to the value enforced by policies.
|
|
virtual bool ReportingIsEnforcedByPolicy(bool* breakpad_enabled);
|
|
|
|
+ // Returns true if crash uploads should be rate limited. If false, no
|
|
+ // throttling will be applied for uploads.
|
|
+ virtual bool GetShouldRateLimit();
|
|
+
|
|
+ // Returns true if crash uploads should be compressed with gzip. If false,
|
|
+ // reports will be uploaded uncompressed.
|
|
+ virtual bool GetShouldCompressUploads();
|
|
+
|
|
+ // Allows the client to add or edit global annotations passed to the crashpad
|
|
+ // handler.
|
|
+ virtual void GetProcessSimpleAnnotations(
|
|
+ std::map<std::string, std::string>* annotations);
|
|
+
|
|
#if defined(OS_ANDROID)
|
|
// Used by WebView to sample crashes without generating the unwanted dumps. If
|
|
// the returned value is less than 100, crash dumping will be sampled to that
|
|
diff --git a/components/crash/core/app/crashpad_linux.cc b/components/crash/core/app/crashpad_linux.cc
|
|
index 1abde7faf44a4526d7c622e6ce2d6fafe957a4c8..68d745567c1a0e37fa4ebc9e7e705d2a24f3e1fe 100644
|
|
--- a/components/crash/core/app/crashpad_linux.cc
|
|
+++ b/components/crash/core/app/crashpad_linux.cc
|
|
@@ -165,6 +165,7 @@ base::FilePath PlatformCrashpadInitialization(
|
|
// where crash_reporter provides it's own values for lsb-release.
|
|
annotations["lsb-release"] = base::GetLinuxDistro();
|
|
#endif
|
|
+ crash_reporter_client->GetProcessSimpleAnnotations(&annotations);
|
|
|
|
std::vector<std::string> arguments;
|
|
if (crash_reporter_client->ShouldMonitorCrashHandlerExpensively()) {
|
|
@@ -186,6 +187,13 @@ base::FilePath PlatformCrashpadInitialization(
|
|
}
|
|
#endif
|
|
|
|
+ if (!crash_reporter_client->GetShouldRateLimit()) {
|
|
+ arguments.push_back("--no-rate-limit");
|
|
+ }
|
|
+ if (!crash_reporter_client->GetShouldCompressUploads()) {
|
|
+ arguments.push_back("--no-upload-gzip");
|
|
+ }
|
|
+
|
|
bool result =
|
|
client.StartHandler(handler_path, database_path, metrics_path, url,
|
|
annotations, arguments, false, false);
|
|
diff --git a/components/crash/core/app/crashpad_mac.mm b/components/crash/core/app/crashpad_mac.mm
|
|
index e3fc1fb2bcab31d6a7cb325a892acb26dc00d4e4..fd654d6e514de416457c283caeb1895dba6286e1 100644
|
|
--- a/components/crash/core/app/crashpad_mac.mm
|
|
+++ b/components/crash/core/app/crashpad_mac.mm
|
|
@@ -85,6 +85,8 @@
|
|
} // @autoreleasepool
|
|
return process_annotations;
|
|
}();
|
|
+ CrashReporterClient* crash_reporter_client = GetCrashReporterClient();
|
|
+ crash_reporter_client->GetProcessSimpleAnnotations(&annotations);
|
|
return annotations;
|
|
}
|
|
|
|
@@ -155,6 +157,13 @@ void DumpProcessWithoutCrashing(task_t task_port) {
|
|
|
|
std::vector<std::string> arguments;
|
|
|
|
+ if (!crash_reporter_client->GetShouldRateLimit()) {
|
|
+ arguments.push_back("--no-rate-limit");
|
|
+ }
|
|
+ if (!crash_reporter_client->GetShouldCompressUploads()) {
|
|
+ arguments.push_back("--no-upload-gzip");
|
|
+ }
|
|
+
|
|
if (crash_reporter_client->ShouldMonitorCrashHandlerExpensively()) {
|
|
arguments.push_back("--monitor-self");
|
|
}
|
|
diff --git a/components/crash/core/app/crashpad_win.cc b/components/crash/core/app/crashpad_win.cc
|
|
index 7dd251b2fdda8c59bb630a5d3ee86e9e858f256e..93f1d5954651ef961c72b97885a708ecff2e9aa7 100644
|
|
--- a/components/crash/core/app/crashpad_win.cc
|
|
+++ b/components/crash/core/app/crashpad_win.cc
|
|
@@ -89,6 +89,7 @@ base::FilePath PlatformCrashpadInitialization(
|
|
|
|
std::map<std::string, std::string> process_annotations;
|
|
GetPlatformCrashpadAnnotations(&process_annotations);
|
|
+ crash_reporter_client->GetProcessSimpleAnnotations(&process_annotations);
|
|
|
|
std::string url = crash_reporter_client->GetUploadUrl();
|
|
|
|
@@ -127,6 +128,13 @@ base::FilePath PlatformCrashpadInitialization(
|
|
|
|
std::vector<std::string> arguments(start_arguments);
|
|
|
|
+ if (!crash_reporter_client->GetShouldRateLimit()) {
|
|
+ arguments.push_back("--no-rate-limit");
|
|
+ }
|
|
+ if (!crash_reporter_client->GetShouldCompressUploads()) {
|
|
+ arguments.push_back("--no-upload-gzip");
|
|
+ }
|
|
+
|
|
if (crash_reporter_client->ShouldMonitorCrashHandlerExpensively()) {
|
|
arguments.push_back("--monitor-self");
|
|
for (const std::string& start_argument : start_arguments) {
|