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

Unified Diff: runtime/vm/debuginfo.h

Issue 16271010: Use 'new' in all the snapshot reallocation functions instead of realloc. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 7 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
Index: runtime/vm/debuginfo.h
===================================================================
--- runtime/vm/debuginfo.h (revision 23570)
+++ runtime/vm/debuginfo.h (working copy)
@@ -50,8 +50,7 @@
void Resize(int new_size) {
if (new_size > capacity_) {
int new_capacity = Utils::RoundUpToPowerOfTwo(new_size);
- uint8_t* new_data =
- reinterpret_cast<uint8_t*>(realloc(data_, new_capacity));
+ uint8_t* new_data = Utils::Realloc(data_, capacity_, new_capacity);
ASSERT(new_data != NULL);
data_ = new_data;
capacity_ = new_capacity;

Powered by Google App Engine
This is Rietveld 408576698