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

Unified Diff: src/profile-generator.cc

Issue 5328001: Fix again HeapEntry size problem, now platform-independent way. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 10 years, 1 month 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 | « src/profile-generator.h ('k') | src/profile-generator-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/profile-generator.cc
diff --git a/src/profile-generator.cc b/src/profile-generator.cc
index 8e9f13712ea82ada2a54dcc3a5e5c39f7bb5c538..e0b63f950ceebd604386914d2f16a2e1dbb923ed 100644
--- a/src/profile-generator.cc
+++ b/src/profile-generator.cc
@@ -870,16 +870,17 @@ void HeapEntry::Init(HeapSnapshot* snapshot,
type_ = type;
painted_ = kUnpainted;
name_ = name;
-#ifdef WIN32
- *(reinterpret_cast<uint64_t*>(&id_)) = id;
-#else
- id_ = id;
-#endif
self_size_ = self_size;
retained_size_ = 0;
children_count_ = children_count;
retainers_count_ = retainers_count;
dominator_ = NULL;
+
+ union {
+ uint64_t set_id;
+ Id stored_id;
+ } id_adaptor = {id};
+ id_ = id_adaptor.stored_id;
}
« no previous file with comments | « src/profile-generator.h ('k') | src/profile-generator-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698