CompletionAction action,
ForceMarkingAction marking,
ForceCompletionAction completion) {
- // Temporarily removed for crbug.com/536163
- // DCHECK(allocated_bytes >= 0);
+ DCHECK(allocated_bytes >= 0);
if (heap_->gc_state() != Heap::NOT_IN_GC || !FLAG_incremental_marking ||
(state_ != SWEEPING && state_ != MARKING)) {
return allocation_info_.top();
}
- void set_top(Address top) {
- DCHECK(to_space_.current_page()->ContainsLimit(top));
- allocation_info_.set_top(top);
- }
-
// Return the address of the allocation pointer limit in the active semispace.
Address limit() {
DCHECK(to_space_.current_page()->ContainsLimit(allocation_info_.limit()));
DCHECK_OBJECT_ALIGNED(start_of_string + new_size);
Heap* heap = string->GetHeap();
- NewSpace* newspace = heap->new_space();
- if (newspace->Contains(start_of_string) &&
- newspace->top() == start_of_string + old_size) {
- // Last allocated object in new space. Simply lower allocation top.
- newspace->set_top(start_of_string + new_size);
- } else {
- // Sizes are pointer size aligned, so that we can use filler objects
- // that are a multiple of pointer size.
- heap->CreateFillerObjectAt(start_of_string + new_size, delta);
- }
+ // Sizes are pointer size aligned, so that we can use filler objects
+ // that are a multiple of pointer size.
+ heap->CreateFillerObjectAt(start_of_string + new_size, delta);
heap->AdjustLiveBytes(*string, -delta, Heap::CONCURRENT_TO_SWEEPER);
// We are storing the new length using release store after creating a filler