Upgrade V8 to 5.1.281.57 DO NOT MERGE
FPIIM-449
Change-Id: Id981b686b4d587ac31697662eb98bb34be42ad90
(cherry picked from commit 3b9bc31999c9787eb726ecdbfd5796bfdec32a18)
diff --git a/src/compiler/zone-pool.cc b/src/compiler/zone-pool.cc
index 2006a79..13fec35 100644
--- a/src/compiler/zone-pool.cc
+++ b/src/compiler/zone-pool.cc
@@ -13,7 +13,7 @@
total_allocated_bytes_at_start_(zone_pool->GetTotalAllocatedBytes()),
max_allocated_bytes_(0) {
zone_pool_->stats_.push_back(this);
- for (auto zone : zone_pool_->used_) {
+ for (Zone* zone : zone_pool_->used_) {
size_t size = static_cast<size_t>(zone->allocation_size());
std::pair<InitialValues::iterator, bool> res =
initial_values_.insert(std::make_pair(zone, size));
@@ -64,9 +64,8 @@
}
}
-
-ZonePool::ZonePool() : max_allocated_bytes_(0), total_deleted_bytes_(0) {}
-
+ZonePool::ZonePool(base::AccountingAllocator* allocator)
+ : max_allocated_bytes_(0), total_deleted_bytes_(0), allocator_(allocator) {}
ZonePool::~ZonePool() {
DCHECK(used_.empty());
@@ -103,7 +102,7 @@
zone = unused_.back();
unused_.pop_back();
} else {
- zone = new Zone();
+ zone = new Zone(allocator_);
}
used_.push_back(zone);
DCHECK_EQ(0u, zone->allocation_size());
@@ -116,7 +115,7 @@
// Update max.
max_allocated_bytes_ = std::max(max_allocated_bytes_, current_total);
// Update stats.
- for (auto stat_scope : stats_) {
+ for (StatsScope* stat_scope : stats_) {
stat_scope->ZoneReturned(zone);
}
// Remove from used.