| Index: src/heap-inl.h
|
| diff --git a/src/heap-inl.h b/src/heap-inl.h
|
| index dfff41831a9ec537e7607ea3e5c468ec55ccdc95..d35dabcb2084c6b56ca41f81f3f6ebe680794931 100644
|
| --- a/src/heap-inl.h
|
| +++ b/src/heap-inl.h
|
| @@ -40,10 +40,19 @@ namespace v8 {
|
| namespace internal {
|
|
|
| void PromotionQueue::insert(HeapObject* target, int size) {
|
| + if (NewSpacePage::at_start(reinterpret_cast<Address>(rear_))) {
|
| + NewSpacePage* rear_page =
|
| + NewSpacePage::FromAddress(reinterpret_cast<Address>(rear_));
|
| + ASSERT(!rear_page->prev_page()->is_anchor());
|
| + rear_ = reinterpret_cast<intptr_t*>(rear_page->prev_page()->body_limit());
|
| + }
|
| *(--rear_) = reinterpret_cast<intptr_t>(target);
|
| *(--rear_) = size;
|
| // Assert no overflow into live objects.
|
| - ASSERT(reinterpret_cast<Address>(rear_) >= HEAP->new_space()->top());
|
| +#ifdef DEBUG
|
| + SemiSpace::AssertValidRange(HEAP->new_space()->top(),
|
| + reinterpret_cast<Address>(rear_));
|
| +#endif
|
| }
|
|
|
|
|
|
|