HeapProfiler: compile fix for win x64.
authorloislo@chromium.org <loislo@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 16 Sep 2013 15:19:41 +0000 (15:19 +0000)
committerloislo@chromium.org <loislo@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 16 Sep 2013 15:19:41 +0000 (15:19 +0000)
BUG=none
TBR=yangguo@chromium.org

Review URL: https://codereview.chromium.org/24178003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16738 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/heap-snapshot-generator.cc

index 279880f..2d31ca4 100644 (file)
@@ -2698,8 +2698,8 @@ void HeapSnapshotJSONSerializer::SerializeStrings() {
   for (HashMap::Entry* entry = strings_.Start();
        entry != NULL;
        entry = strings_.Next(entry)) {
-    sorted_strings[reinterpret_cast<uintptr_t>(entry->value)] =
-        reinterpret_cast<const unsigned char*>(entry->key);
+    int index = static_cast<int>(reinterpret_cast<uintptr_t>(entry->value));
+    sorted_strings[index] = reinterpret_cast<const unsigned char*>(entry->key);
   }
   writer_->AddString("\"<dummy>\"");
   for (int i = 1; i < sorted_strings.length(); ++i) {