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

Side by Side Diff: src/heap-snapshot-generator.cc

Issue 24178003: HeapProfiler: compile fix for win x64. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 2680 matching lines...) Expand 10 before | Expand all | Expand 10 after
2691 writer_->AddCharacter('\"'); 2691 writer_->AddCharacter('\"');
2692 } 2692 }
2693 2693
2694 2694
2695 void HeapSnapshotJSONSerializer::SerializeStrings() { 2695 void HeapSnapshotJSONSerializer::SerializeStrings() {
2696 ScopedVector<const unsigned char*> sorted_strings( 2696 ScopedVector<const unsigned char*> sorted_strings(
2697 strings_.occupancy() + 1); 2697 strings_.occupancy() + 1);
2698 for (HashMap::Entry* entry = strings_.Start(); 2698 for (HashMap::Entry* entry = strings_.Start();
2699 entry != NULL; 2699 entry != NULL;
2700 entry = strings_.Next(entry)) { 2700 entry = strings_.Next(entry)) {
2701 sorted_strings[reinterpret_cast<uintptr_t>(entry->value)] = 2701 int index = static_cast<int>(reinterpret_cast<uintptr_t>(entry->value));
2702 reinterpret_cast<const unsigned char*>(entry->key); 2702 sorted_strings[index] = reinterpret_cast<const unsigned char*>(entry->key);
2703 } 2703 }
2704 writer_->AddString("\"<dummy>\""); 2704 writer_->AddString("\"<dummy>\"");
2705 for (int i = 1; i < sorted_strings.length(); ++i) { 2705 for (int i = 1; i < sorted_strings.length(); ++i) {
2706 writer_->AddCharacter(','); 2706 writer_->AddCharacter(',');
2707 SerializeString(sorted_strings[i]); 2707 SerializeString(sorted_strings[i]);
2708 if (writer_->aborted()) return; 2708 if (writer_->aborted()) return;
2709 } 2709 }
2710 } 2710 }
2711 2711
2712 2712
2713 } } // namespace v8::internal 2713 } } // namespace v8::internal
OLDNEW
« 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