Index: base/debug/activity_tracker.h |
diff --git a/base/debug/activity_tracker.h b/base/debug/activity_tracker.h |
index 922528fb38702fdd023eeec906bba6fb8d7cb22c..05a034f0eb8d53a92e24309846779279f664bb24 100644 |
--- a/base/debug/activity_tracker.h |
+++ b/base/debug/activity_tracker.h |
@@ -377,7 +377,7 @@ class BASE_EXPORT ActivityUserData { |
private: |
friend class ActivityUserData; |
- ValueType type_; |
+ ValueType type_ = END_OF_VALUES; |
uint64_t short_value_; // Used to hold copy of numbers, etc. |
std::string long_value_; // Used to hold copy of raw/string data. |
StringPiece ref_value_; // Used to hold reference to external data. |
@@ -440,9 +440,9 @@ class BASE_EXPORT ActivityUserData { |
// Creates a snapshot of the key/value pairs contained within. The returned |
// data will be fixed, independent of whatever changes afterward. There is |
- // protection against concurrent modification of the values but no protection |
- // against a complete overwrite of the contents; the caller must ensure that |
- // the memory segment is not going to be re-initialized while this runs. |
+ // some protection against concurrent modification. This will return false |
+ // if the data is invalid or if a complete overwrite of the contents is |
+ // detected. |
bool CreateSnapshot(Snapshot* output_snapshot) const; |
// Gets the base memory address used for storing data. |
@@ -531,6 +531,12 @@ class BASE_EXPORT ActivityUserData { |
// A pointer to the memory header for this instance. |
MemoryHeader* const header_; |
+ // These hold values used when initially creating the object. They are |
+ // compared against current header values to check for outside changes. |
+ const uint32_t orig_data_id; |
+ const int64_t orig_process_id; |
+ const int64_t orig_create_stamp; |
+ |
DISALLOW_COPY_AND_ASSIGN(ActivityUserData); |
}; |
@@ -565,6 +571,9 @@ class BASE_EXPORT ThreadActivityTracker { |
// truncated due to internal length limitations. |
std::string thread_name; |
+ // The timestamp at which this process was created. |
+ int64_t create_stamp; |
+ |
// The process and thread IDs. These values have no meaning other than |
// they uniquely identify a running process and a running thread within |
// that process. Thread-IDs can be re-used across different processes |