| Index: third_party/crashpad/crashpad/util/posix/process_info.h
|
| diff --git a/third_party/crashpad/crashpad/util/posix/process_info.h b/third_party/crashpad/crashpad/util/posix/process_info.h
|
| index 1aa23d8c3d751e748981ada1a4c5cce579fea5ab..5e1a61085628e9f97abd54901c8a68eda2a8e478 100644
|
| --- a/third_party/crashpad/crashpad/util/posix/process_info.h
|
| +++ b/third_party/crashpad/crashpad/util/posix/process_info.h
|
| @@ -25,6 +25,7 @@
|
|
|
| #include "base/macros.h"
|
| #include "build/build_config.h"
|
| +#include "util/misc/initialization_state.h"
|
| #include "util/misc/initialization_state_dcheck.h"
|
|
|
| #if defined(OS_MACOSX)
|
| @@ -113,13 +114,21 @@ class ProcessInfo {
|
| //! `execve()` as a result of executing a setuid or setgid executable.
|
| bool DidChangePrivileges() const;
|
|
|
| - //! \return `true` if the target task is a 64-bit process.
|
| - bool Is64Bit() const;
|
| + //! \brief Determines the target process’ bitness.
|
| + //!
|
| + //! \param[out] is_64_bit `true` if the target task is a 64-bit process.
|
| + //!
|
| + //! \return `true` on success, with \a is_64_bit set. Otherwise, `false` with
|
| + //! a message logged.
|
| + bool Is64Bit(bool* is_64_bit) const;
|
|
|
| //! \brief Determines the target process’ start time.
|
| //!
|
| //! \param[out] start_time The time that the process started.
|
| - void StartTime(timeval* start_time) const;
|
| + //!
|
| + //! \return `true` on success, with \a start_time set. Otherwise, `false` with
|
| + //! a message logged.
|
| + bool StartTime(timeval* start_time) const;
|
|
|
| //! \brief Obtains the arguments used to launch a process.
|
| //!
|
| @@ -141,6 +150,25 @@ class ProcessInfo {
|
| private:
|
| #if defined(OS_MACOSX)
|
| kinfo_proc kern_proc_info_;
|
| +#elif defined(OS_LINUX) || defined(OS_ANDROID)
|
| + // Some members are marked mutable so that they can be lazily initialized by
|
| + // const methods. These are always InitializationState-protected so that
|
| + // multiple successive calls will always produce the same return value and out
|
| + // parameters. This is necessary for intergration with the Snapshot interface.
|
| + // See https://crashpad.chromium.org/bug/9.
|
| + std::set<gid_t> supplementary_groups_;
|
| + mutable timeval start_time_;
|
| + pid_t pid_;
|
| + pid_t ppid_;
|
| + uid_t uid_;
|
| + uid_t euid_;
|
| + uid_t suid_;
|
| + gid_t gid_;
|
| + gid_t egid_;
|
| + gid_t sgid_;
|
| + mutable InitializationState start_time_initialized_;
|
| + mutable InitializationState is_64_bit_initialized_;
|
| + mutable bool is_64_bit_;
|
| #endif
|
| InitializationStateDcheck initialized_;
|
|
|
|
|