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

Unified Diff: src/profile-generator.h

Issue 3096008: A follow-up to r5211: fix a couple of issues detected on Windows. (Closed)
Patch Set: Created 10 years, 4 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 | src/profile-generator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/profile-generator.h
diff --git a/src/profile-generator.h b/src/profile-generator.h
index 8bd6ef358a8fd78bcc909fece7a7e9f0caed8f41..4c5eb3f1587c8e3ae04676bacb70df84c0465c7c 100644
--- a/src/profile-generator.h
+++ b/src/profile-generator.h
@@ -438,7 +438,7 @@ class HeapGraphEdge BASE_EMBEDDED {
void Init(int child_index, Type type, const char* name, HeapEntry* to);
void Init(int child_index, int index, HeapEntry* to);
- Type type() { return type_; }
+ Type type() { return static_cast<Type>(type_); }
int index() {
ASSERT(type_ == kElement);
return index_;
@@ -455,7 +455,7 @@ class HeapGraphEdge BASE_EMBEDDED {
private:
int child_index_ : 30;
- Type type_ : 2;
+ unsigned type_ : 2;
union {
int index_;
const char* name_;
@@ -511,7 +511,7 @@ class HeapEntry BASE_EMBEDDED {
int retainers_count);
HeapSnapshot* snapshot() { return snapshot_; }
- Type type() { return type_; }
+ Type type() { return static_cast<Type>(type_); }
const char* name() { return name_; }
uint64_t id() { return id_; }
int self_size() { return self_size_; }
@@ -566,17 +566,17 @@ class HeapEntry BASE_EMBEDDED {
}
const char* TypeAsString();
- HeapSnapshot* snapshot_;
unsigned painted_: 2;
- Type type_: 3;
+ unsigned type_: 3;
// The calculated data is stored in HeapSnapshot in HeapEntryCalculatedData
// entries. See AddCalculatedData and GetCalculatedData.
int calculated_data_index_: 27;
- const char* name_;
- uint64_t id_;
int self_size_;
int children_count_;
int retainers_count_;
+ HeapSnapshot* snapshot_;
+ const char* name_;
+ uint64_t id_;
Søren Thygesen Gjesse 2010/08/09 14:44:10 Could we have a STATIC_ASSERT on sizeof(HeapEntry)
mnaganov (inactive) 2010/08/09 15:18:37 OK, will do this as a separate commit.
static const unsigned kUnpainted = 0;
static const unsigned kPainted = 1;
« no previous file with comments | « no previous file | src/profile-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698