mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
* chore: bump chromium in DEPS to 87.0.4265.1 * chore: bump chromium in DEPS to 87.0.4266.2 * chore: bump chromium in DEPS to 87.0.4267.1 * update patches * chore: bump chromium in DEPS to 87.0.4270.0 * Update patches * Move content::WebPreferences struct to Blink https://chromium-review.googlesource.com/c/chromium/src/+/2397670 (cherry picked from commit5c98c5ebf4) * viz: Rename RenderPass to CompositorRenderPass (and related types). https://chromium-review.googlesource.com/c/chromium/src/+/2380730 (cherry picked from commitae999b29c1) * 2320268: Migrate DragHostMsg_StartDragging to Mojo Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2320268 (cherry picked from commit4e835d505d) * Make FileURLLoaderFactory always owned by its |receivers_|. https://chromium-review.googlesource.com/c/chromium/src/+/2337411 (cherry picked from commit284abad17d) * fix: add a patch to remove deprecated factory (cherry picked from commit98c9616829) Co-Authored-By: Robo <hop2deep@gmail.com> * fixup patch (cherry picked from commit98c9616829) Co-Authored-By: Robo <hop2deep@gmail.com> * Add MIME sniffer overloads that take base::StringPieces https://chromium-review.googlesource.com/c/chromium/src/+/2382896 (cherry picked from commit211fd4f8f0) * chore: implement GetSurveyAPIKey Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2362182 (cherry picked from commit6c539bc6fc) * 2415752: Reland "Reland "OOR-CORS: Remove BlinkCORS supporting code outside Blink"" Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2415752 (cherry picked from commitb67757d77d) * Make FileURLLoaderFactory always owned by its |receivers_|. https://chromium-review.googlesource.com/c/chromium/src/+/2337411 (cherry picked from commit507eb0965f) * fixup! Make FileURLLoaderFactory always owned by its |receivers_|. (cherry picked from commite19400b4e2) * 2418471: PDF Viewer update: Add missing aria-labels to various buttons. https://chromium-review.googlesource.com/c/chromium/src/+/2418471 * chore: bump chromium in DEPS to 87.0.4271.0 * Refactor WebContentSettingsClient to dedupe AllowXYZ methods https://chromium-review.googlesource.com/c/chromium/src/+/2353552 (cherry picked from commitf1a5414372) * 2402123: Use end date when deleting http auth cache Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2402123 (cherry picked from commitd00971d0cb) * [printing] Move PrintHostMsg_PreviewIds to print.mojom https://chromium-review.googlesource.com/c/chromium/src/+/2379455 (cherry picked from commite212297da9) * update patches * 2401303: Move content/browser/frame_host/* over to content/browser/renderer_host/ https://chromium-review.googlesource.com/c/chromium/src/+/2401303 (cherry picked from commitbcffa8aeab) * Introduce NonNetworkURLLoaderFactoryBase class. https://chromium-review.googlesource.com/c/chromium/src/+/2357559 (cherry picked from commit33e2e12114) * fix: add a patch to remove deprecated factory (cherry picked from commit98c9616829) * chore: non_network_url_loader_factory_base was moved Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2357431 (cherry picked from commita1a8878402) * chore: replace CreateWebUIURLLoader with CreateWebUIURLLoaderFactory Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2358309 (cherry picked from commit40bfaa5ea4) * 2346803: Study whether blocking of requests via webRequest is fingerprintable https://chromium-review.googlesource.com/c/chromium/src/+/2346803 * lint cleanup * chore: bump chromium in DEPS to 87.0.4272.0 * update patches * 2387901: Accessing C++ enums in Java for WebBluetooth https://chromium-review.googlesource.com/c/chromium/src/+/2387901 * chore: bump chromium in DEPS to 87.0.4273.0 * Update patches (cherry picked from commit b389d4adca71e268c390c41370e87033b69c649c) * chore: bump chromium in DEPS to 87.0.4274.0 * chore: bump chromium in DEPS to 87.0.4275.0 * chore: bump chromium in DEPS to 87.0.4276.0 * update patches * 2418443: Explicit use of deprecated global sources assignment filter https://chromium-review.googlesource.com/c/chromium/src/+/2418443 * fixup 2418443: Explicit use of deprecated global sources assignment filter * Use 87.0.4274.2 for now * 2401847: Cache Storage Permissions on ContentSettingsClientImpl https://chromium-review.googlesource.com/c/chromium/src/+/2401847 * 2418568: Remove ConvertPointToPixel() methods. https://chromium-review.googlesource.com/c/chromium/src/+/2418568 * 2419388: Rename Button methods to be suitable for builders and properties. https://chromium-review.googlesource.com/c/chromium/src/+/2419388 * [XProto] Remove usage of all Xlib headers https: //chromium-review.googlesource.com/c/chromium/src/+/2392140 Co-Authored-By: Robo <hop2deep@gmail.com> * service_manager::kCrashDumpSignal -> kCrashDumpSignal Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2417073 (cherry picked from commit 7d9d2a172f50e12830a2b8fbfbb2fe344756c377) * gfx::ConvertPointToPixel -> gfx::ConvertPointToPixels Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2418568 (cherry picked from commit a0bf07570409f84a3b7fa9d12bddd8c1805f43c5) * Fixup [XProto] Remove usage of all Xlib headers * Set appid on Pip windows. https: //chromium-review.googlesource.com/c/chromium/src/+/2388274 Co-Authored-By: Robo <hop2deep@gmail.com> * chore: update node patches for common.gypi Co-Authored-By: Samuel Attard <MarshallOfSound@users.noreply.github.com> * Try using lower number of processes for linux * fixup call to diagnose_goma_log.py * Use larger machines on linux to work around goma issue * Don't fail on goma stats * don't exit immediately * turn off pipefail * always return true Co-authored-by: John Kleinschmidt <jkleinsc@github.com> Co-authored-by: deepak1556 <hop2deep@gmail.com> Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com> Co-authored-by: Andy Locascio <andy@slack-corp.com> Co-authored-by: Samuel Attard <MarshallOfSound@users.noreply.github.com>
130 lines
5.2 KiB
Diff
130 lines
5.2 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 9d8370ef035f2ca285c8aa35e98761bff7200d26..1c076672c77d90eb3814b5b269340d2800217868 100644
|
|
--- a/components/crash/core/app/breakpad_linux.cc
|
|
+++ b/components/crash/core/app/breakpad_linux.cc
|
|
@@ -110,6 +110,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 1d0fb4f2a633fa5ddbe232ce19d716c22be78a37..5b81608d6e90f62f435302a53976fb18bbbf9e98 100644
|
|
--- a/components/crash/core/app/crash_reporter_client.cc
|
|
+++ b/components/crash/core/app/crash_reporter_client.cc
|
|
@@ -140,6 +140,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 aaa9ad1d58d7f584cbf391e0cb0a61a0d25d5c69..5b02834b5ecaf4bcb7e051d9ee98cd5eb087b4fc 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 "base/strings/string16.h"
|
|
@@ -145,6 +146,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_mac.mm b/components/crash/core/app/crashpad_mac.mm
|
|
index aa7c3302f2e3fc7129381b355ed4fa1bc386f8cb..d7dd05118f3c90f5ab570f59685c43bd180885e5 100644
|
|
--- a/components/crash/core/app/crashpad_mac.mm
|
|
+++ b/components/crash/core/app/crashpad_mac.mm
|
|
@@ -71,6 +71,8 @@
|
|
} // @autoreleasepool
|
|
return process_annotations;
|
|
}();
|
|
+ CrashReporterClient* crash_reporter_client = GetCrashReporterClient();
|
|
+ crash_reporter_client->GetProcessSimpleAnnotations(&annotations);
|
|
return annotations;
|
|
}
|
|
|
|
@@ -141,6 +143,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 c199b467ffeb007f3098ccde6879fbd71e9ec9fd..a2007514e799b77fa15cbc178d38594e4d847caa 100644
|
|
--- a/components/crash/core/app/crashpad_win.cc
|
|
+++ b/components/crash/core/app/crashpad_win.cc
|
|
@@ -84,6 +84,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();
|
|
|
|
@@ -122,6 +123,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) {
|