Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(226)

Unified Diff: components/crash/content/app/crashpad_win.cc

Issue 1612663002: Use a valid /prefetch argument when launching a process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bit
Patch Set: address comments from gab #13 Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/crash/content/app/crashpad_win.cc
diff --git a/components/crash/content/app/crashpad_win.cc b/components/crash/content/app/crashpad_win.cc
index 1628ab6a9d5cbfc1f8945e24cdee952fea8f4a2c..3729467ebb88b700da33bc98aaec099cf6039d6f 100644
--- a/components/crash/content/app/crashpad_win.cc
+++ b/components/crash/content/app/crashpad_win.cc
@@ -16,6 +16,7 @@
#include "base/strings/utf_string_conversions.h"
#include "build/build_config.h"
#include "components/crash/content/app/crash_reporter_client.h"
+#include "components/startup_metric_utils/common/pre_read_field_trial_utils_win.h"
#include "third_party/crashpad/crashpad/client/crashpad_client.h"
#include "third_party/crashpad/crashpad/client/crashpad_info.h"
#include "third_party/crashpad/crashpad/client/simulate_crash_win.h"
@@ -84,6 +85,15 @@ base::FilePath PlatformCrashpadInitialization(bool initial_client,
exe_file = exe_dir.Append(FILE_PATH_LITERAL("crashpad_handler.exe"));
} else {
arguments.push_back("--type=crashpad-handler");
+
+ if (startup_metric_utils::GetPreReadOptions().use_prefetch_argument) {
+ // Add a prefetch argument to prevent the crashpad process from
+ // polluting the prefetch profile of the browser process. The prefetch
+ // argument must be equal to switches::kPrefetchArgumentOther.
+ // Unfortunately, crashpad cannot depend on any of the targets that
+ // define this constant.
+ arguments.push_back("/prefetch:8");
+ }
}
// TODO(scottmg): See https://crashpad.chromium.org/bug/23.

Powered by Google App Engine
This is Rietveld 408576698