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

Unified Diff: src/heap-snapshot-generator.h

Issue 24205004: Rollback trunk to 3.21.16.2 (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 7 years, 3 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 | « src/heap.cc ('k') | src/heap-snapshot-generator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap-snapshot-generator.h
diff --git a/src/heap-snapshot-generator.h b/src/heap-snapshot-generator.h
index c323f3cde282de350f88da721630bbbe685d3aee..7b0cf8f021e2c717cc21ab73093562448164af7e 100644
--- a/src/heap-snapshot-generator.h
+++ b/src/heap-snapshot-generator.h
@@ -628,7 +628,7 @@ class HeapSnapshotJSONSerializer {
public:
explicit HeapSnapshotJSONSerializer(HeapSnapshot* snapshot)
: snapshot_(snapshot),
- strings_(StringsMatch),
+ strings_(ObjectsMatch),
next_node_id_(1),
next_string_id_(1),
writer_(NULL) {
@@ -636,16 +636,14 @@ class HeapSnapshotJSONSerializer {
void Serialize(v8::OutputStream* stream);
private:
- INLINE(static bool StringsMatch(void* key1, void* key2)) {
- return strcmp(reinterpret_cast<char*>(key1),
- reinterpret_cast<char*>(key2)) == 0;
+ INLINE(static bool ObjectsMatch(void* key1, void* key2)) {
+ return key1 == key2;
}
- INLINE(static uint32_t StringHash(const void* string)) {
- const char* s = reinterpret_cast<const char*>(string);
- int len = static_cast<int>(strlen(s));
- return StringHasher::HashSequentialString(
- s, len, v8::internal::kZeroHashSeed);
+ INLINE(static uint32_t ObjectHash(const void* key)) {
+ return ComputeIntegerHash(
+ static_cast<uint32_t>(reinterpret_cast<uintptr_t>(key)),
+ v8::internal::kZeroHashSeed);
}
int GetStringId(const char* s);
@@ -658,6 +656,7 @@ class HeapSnapshotJSONSerializer {
void SerializeSnapshot();
void SerializeString(const unsigned char* s);
void SerializeStrings();
+ void SortHashMap(HashMap* map, List<HashMap::Entry*>* sorted_entries);
static const int kEdgeFieldsCount;
static const int kNodeFieldsCount;
« no previous file with comments | « src/heap.cc ('k') | src/heap-snapshot-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698