Index: runtime/vm/megamorphic_cache_table.cc |
=================================================================== |
--- runtime/vm/megamorphic_cache_table.cc (revision 23633) |
+++ runtime/vm/megamorphic_cache_table.cc (working copy) |
@@ -34,9 +34,9 @@ |
} |
if (length_ == capacity_) { |
- capacity_ += kCapacityIncrement; |
- table_ = |
- reinterpret_cast<Entry*>(realloc(table_, capacity_ * sizeof(*table_))); |
+ intptr_t new_capacity = capacity_ + kCapacityIncrement; |
+ table_ = Utils::Realloc(table_, capacity_, new_capacity); |
+ capacity_ = new_capacity; |
} |
ASSERT(length_ < capacity_); |