| Index: src/heap.cc
|
| diff --git a/src/heap.cc b/src/heap.cc
|
| index 76f84f82e81128e550e75fec164fafe94b3ef6ea..70037f4b2b9436d1098acdc9c0188cfa35ca463a 100644
|
| --- a/src/heap.cc
|
| +++ b/src/heap.cc
|
| @@ -3419,7 +3419,7 @@ void Heap::FlushNumberStringCache() {
|
| // Flush the number to string cache.
|
| int len = number_string_cache()->length();
|
| for (int i = 0; i < len; i++) {
|
| - number_string_cache()->set_undefined(this, i);
|
| + number_string_cache()->set_undefined(i);
|
| }
|
| }
|
|
|
| @@ -4976,7 +4976,7 @@ MaybeObject* Heap::CopyJSObjectWithAllocationSite(
|
| int object_size = map->instance_size();
|
| Object* clone;
|
|
|
| - ASSERT(map->CanTrackAllocationSite());
|
| + ASSERT(AllocationSite::CanTrack(map->instance_type()));
|
| ASSERT(map->instance_type() == JS_ARRAY_TYPE);
|
| WriteBarrierMode wb_mode = UPDATE_WRITE_BARRIER;
|
|
|
| @@ -6721,6 +6721,12 @@ bool Heap::ConfigureHeap(int max_semispace_size,
|
| RoundUp(max_old_generation_size_,
|
| Page::kPageSize));
|
|
|
| + // We rely on being able to allocate new arrays in paged spaces.
|
| + ASSERT(MaxRegularSpaceAllocationSize() >=
|
| + (JSArray::kSize +
|
| + FixedArray::SizeFor(JSObject::kInitialMaxFastElementArray) +
|
| + AllocationMemento::kSize));
|
| +
|
| configured_ = true;
|
| return true;
|
| }
|
| @@ -6902,7 +6908,7 @@ bool Heap::SetUp() {
|
|
|
| store_buffer()->SetUp();
|
|
|
| - if (FLAG_concurrent_recompilation) relocation_mutex_ = OS::CreateMutex();
|
| + if (FLAG_concurrent_recompilation) relocation_mutex_ = new Mutex;
|
| #ifdef DEBUG
|
| relocation_mutex_locked_by_optimizer_thread_ = false;
|
| #endif // DEBUG
|
| @@ -7891,6 +7897,7 @@ void ExternalStringTable::CleanUp() {
|
| if (new_space_strings_[i] == heap_->the_hole_value()) {
|
| continue;
|
| }
|
| + ASSERT(new_space_strings_[i]->IsExternalString());
|
| if (heap_->InNewSpace(new_space_strings_[i])) {
|
| new_space_strings_[last++] = new_space_strings_[i];
|
| } else {
|
| @@ -7905,6 +7912,7 @@ void ExternalStringTable::CleanUp() {
|
| if (old_space_strings_[i] == heap_->the_hole_value()) {
|
| continue;
|
| }
|
| + ASSERT(old_space_strings_[i]->IsExternalString());
|
| ASSERT(!heap_->InNewSpace(old_space_strings_[i]));
|
| old_space_strings_[last++] = old_space_strings_[i];
|
| }
|
| @@ -8007,7 +8015,7 @@ static LazyMutex checkpoint_object_stats_mutex = LAZY_MUTEX_INITIALIZER;
|
|
|
|
|
| void Heap::CheckpointObjectStats() {
|
| - ScopedLock lock(checkpoint_object_stats_mutex.Pointer());
|
| + LockGuard<Mutex> lock_guard(checkpoint_object_stats_mutex.Pointer());
|
| Counters* counters = isolate()->counters();
|
| #define ADJUST_LAST_TIME_OBJECT_COUNT(name) \
|
| counters->count_of_##name()->Increment( \
|
|
|