Commit f0e23cfa authored by Ian Barkley-Yeung's avatar Ian Barkley-Yeung Committed by Commit Bot

Update Crashpad to 558b7ea43ff5c9ccda03ce946364cdff15401575

c2978022d178 Update comment to match current state of
             MemorySnapshotGeneric
558b7ea43ff5 Pass --always_allow_feedback during integration tests

Bug: chromium:1037656
Change-Id: I3c95e30aa585cf6782b6c66c0ce8bc3e063d1ff9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1985123
Auto-Submit: Ian Barkley-Yeung <iby@chromium.org>
Commit-Queue: Robert Sesek <rsesek@chromium.org>
Reviewed-by: default avatarRobert Sesek <rsesek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#728202}
parent 5c46dcf8
...@@ -2,7 +2,7 @@ Name: Crashpad ...@@ -2,7 +2,7 @@ Name: Crashpad
Short Name: crashpad Short Name: crashpad
URL: https://crashpad.chromium.org/ URL: https://crashpad.chromium.org/
Version: unknown Version: unknown
Revision: 38f4bae3ad841821a83abe979892cbcab69e2e02 Revision: 558b7ea43ff5c9ccda03ce946364cdff15401575
License: Apache 2.0 License: Apache 2.0
License File: crashpad/LICENSE License File: crashpad/LICENSE
Security Critical: yes Security Critical: yes
......
...@@ -168,6 +168,10 @@ void Usage(const base::FilePath& me) { ...@@ -168,6 +168,10 @@ void Usage(const base::FilePath& me) {
" --minidump-dir-for-tests=TEST_MINIDUMP_DIR\n" " --minidump-dir-for-tests=TEST_MINIDUMP_DIR\n"
" causes /sbin/crash_reporter to leave dumps in\n" " causes /sbin/crash_reporter to leave dumps in\n"
" this directory instead of the normal location\n" " this directory instead of the normal location\n"
" --always-allow-feedback\n"
" pass the --always_allow_feedback flag to\n"
" crash_reporter, thus skipping metrics consent\n"
" checks\n"
#endif // OS_CHROMEOS #endif // OS_CHROMEOS
" --help display this help and exit\n" " --help display this help and exit\n"
" --version output version information and exit\n", " --version output version information and exit\n",
...@@ -201,8 +205,9 @@ struct Options { ...@@ -201,8 +205,9 @@ struct Options {
bool rate_limit; bool rate_limit;
bool upload_gzip; bool upload_gzip;
#if defined(OS_CHROMEOS) #if defined(OS_CHROMEOS)
bool use_cros_crash_reporter; bool use_cros_crash_reporter = false;
base::FilePath minidump_dir_for_tests; base::FilePath minidump_dir_for_tests;
bool always_allow_feedback = false;
#endif // OS_CHROMEOS #endif // OS_CHROMEOS
}; };
...@@ -561,6 +566,7 @@ int HandlerMain(int argc, ...@@ -561,6 +566,7 @@ int HandlerMain(int argc,
#if defined(OS_CHROMEOS) #if defined(OS_CHROMEOS)
kOptionUseCrosCrashReporter, kOptionUseCrosCrashReporter,
kOptionMinidumpDirForTests, kOptionMinidumpDirForTests,
kOptionAlwaysAllowFeedback,
#endif // OS_CHROMEOS #endif // OS_CHROMEOS
// Standard options. // Standard options.
...@@ -636,6 +642,10 @@ int HandlerMain(int argc, ...@@ -636,6 +642,10 @@ int HandlerMain(int argc,
required_argument, required_argument,
nullptr, nullptr,
kOptionMinidumpDirForTests}, kOptionMinidumpDirForTests},
{"always-allow-feedback",
no_argument,
nullptr,
kOptionAlwaysAllowFeedback},
#endif // OS_CHROMEOS #endif // OS_CHROMEOS
{"help", no_argument, nullptr, kOptionHelp}, {"help", no_argument, nullptr, kOptionHelp},
{"version", no_argument, nullptr, kOptionVersion}, {"version", no_argument, nullptr, kOptionVersion},
...@@ -788,6 +798,10 @@ int HandlerMain(int argc, ...@@ -788,6 +798,10 @@ int HandlerMain(int argc,
ToolSupport::CommandLineArgumentToFilePathStringType(optarg)); ToolSupport::CommandLineArgumentToFilePathStringType(optarg));
break; break;
} }
case kOptionAlwaysAllowFeedback: {
options.always_allow_feedback = true;
break;
}
#endif // OS_CHROMEOS #endif // OS_CHROMEOS
case kOptionHelp: { case kOptionHelp: {
Usage(me); Usage(me);
...@@ -931,6 +945,10 @@ int HandlerMain(int argc, ...@@ -931,6 +945,10 @@ int HandlerMain(int argc,
cros_handler->SetDumpDir(options.minidump_dir_for_tests); cros_handler->SetDumpDir(options.minidump_dir_for_tests);
} }
if (options.always_allow_feedback) {
cros_handler->SetAlwaysAllowFeedback();
}
exception_handler = std::move(cros_handler); exception_handler = std::move(cros_handler);
} else { } else {
exception_handler = std::make_unique<CrashReportExceptionHandler>( exception_handler = std::make_unique<CrashReportExceptionHandler>(
......
...@@ -133,7 +133,8 @@ CrosCrashReportExceptionHandler::CrosCrashReportExceptionHandler( ...@@ -133,7 +133,8 @@ CrosCrashReportExceptionHandler::CrosCrashReportExceptionHandler(
const UserStreamDataSources* user_stream_data_sources) const UserStreamDataSources* user_stream_data_sources)
: database_(database), : database_(database),
process_annotations_(process_annotations), process_annotations_(process_annotations),
user_stream_data_sources_(user_stream_data_sources) {} user_stream_data_sources_(user_stream_data_sources),
always_allow_feedback_(false) {}
CrosCrashReportExceptionHandler::~CrosCrashReportExceptionHandler() = default; CrosCrashReportExceptionHandler::~CrosCrashReportExceptionHandler() = default;
...@@ -258,6 +259,9 @@ bool CrosCrashReportExceptionHandler::HandleExceptionWithConnection( ...@@ -258,6 +259,9 @@ bool CrosCrashReportExceptionHandler::HandleExceptionWithConnection(
if (!dump_dir_.empty()) { if (!dump_dir_.empty()) {
argv.push_back("--chrome_dump_dir=" + dump_dir_.value()); argv.push_back("--chrome_dump_dir=" + dump_dir_.value());
} }
if (always_allow_feedback_) {
argv.push_back("--always_allow_feedback");
}
if (!DoubleForkAndExec(argv, if (!DoubleForkAndExec(argv,
nullptr /* envp */, nullptr /* envp */,
......
...@@ -77,6 +77,7 @@ class CrosCrashReportExceptionHandler ...@@ -77,6 +77,7 @@ class CrosCrashReportExceptionHandler
UUID* local_report_id = nullptr) override; UUID* local_report_id = nullptr) override;
void SetDumpDir(const base::FilePath& dump_dir) { dump_dir_ = dump_dir; } void SetDumpDir(const base::FilePath& dump_dir) { dump_dir_ = dump_dir; }
void SetAlwaysAllowFeedback() { always_allow_feedback_ = true; }
private: private:
bool HandleExceptionWithConnection( bool HandleExceptionWithConnection(
PtraceConnection* connection, PtraceConnection* connection,
...@@ -90,6 +91,7 @@ class CrosCrashReportExceptionHandler ...@@ -90,6 +91,7 @@ class CrosCrashReportExceptionHandler
const std::map<std::string, std::string>* process_annotations_; // weak const std::map<std::string, std::string>* process_annotations_; // weak
const UserStreamDataSources* user_stream_data_sources_; // weak const UserStreamDataSources* user_stream_data_sources_; // weak
base::FilePath dump_dir_; base::FilePath dump_dir_;
bool always_allow_feedback_;
DISALLOW_COPY_AND_ASSIGN(CrosCrashReportExceptionHandler); DISALLOW_COPY_AND_ASSIGN(CrosCrashReportExceptionHandler);
}; };
......
...@@ -29,8 +29,8 @@ namespace crashpad { ...@@ -29,8 +29,8 @@ namespace crashpad {
namespace internal { namespace internal {
//! \brief A MemorySnapshot of a memory region in a process on the running //! \brief A MemorySnapshot of a memory region in a process on the running
//! system. Used on Mac, Linux, Android, and Fuchsia, templated on the //! system. Works on multiple platforms by using a platform-specific
//! platform-specific ProcessReader type. //! ProcessMemory object.
class MemorySnapshotGeneric final : public MemorySnapshot { class MemorySnapshotGeneric final : public MemorySnapshot {
public: public:
MemorySnapshotGeneric() = default; MemorySnapshotGeneric() = default;
......
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