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

Unified Diff: base/debug/activity_tracker.h

Issue 2695813011: Updates for improved PMA 'object' interface. (Closed)
Patch Set: fixed Activity size Created 3 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/debug/activity_tracker.h
diff --git a/base/debug/activity_tracker.h b/base/debug/activity_tracker.h
index 9ffcfaa844ba22ee9edee16dcade2481f5a4f011..c61b2e641d1218a14b23f7a40040578d1aacd3c4 100644
--- a/base/debug/activity_tracker.h
+++ b/base/debug/activity_tracker.h
@@ -162,7 +162,7 @@ class BASE_EXPORT ActivityTrackerMemoryAllocator {
// Helper function to access an object allocated using this instance.
template <typename T>
T* GetAsObject(Reference ref) {
- return allocator_->GetAsObject<T>(ref, object_type_);
+ return allocator_->GetAsObject<T>(ref);
}
// Similar to GetAsObject() but converts references to arrays of objects.
@@ -198,6 +198,12 @@ class BASE_EXPORT ActivityTrackerMemoryAllocator {
// the |data| field. All fields must be explicitly sized types to ensure no
// interoperability problems between 32-bit and 64-bit systems.
struct Activity {
+ // SHA1(base::debug::Activity): Increment this if structure changes!
+ static constexpr uint32_t kPersistentTypeId = 0x99425159 + 1;
+ // Expected size for 32/64-bit check. Update this if structure changes!
+ static constexpr size_t kExpectedInstanceSize =
+ 48 + 8 * kActivityCallStackSize;
+
// The type of an activity on the stack. Activities are broken into
// categories with the category ID taking the top 4 bits and the lower
// bits representing an action within that category. This combination
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698