Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(574)

Side by Side Diff: src/heap/mark-compact.cc

Issue 1064713005: collect phantom handle data before it gets overwritten (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« src/global-handles.cc ('K') | « src/heap/heap.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/base/atomicops.h" 7 #include "src/base/atomicops.h"
8 #include "src/base/bits.h" 8 #include "src/base/bits.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/compilation-cache.h" 10 #include "src/compilation-cache.h"
(...skipping 3782 matching lines...) Expand 10 before | Expand all | Expand 10 after
3793 3793
3794 heap_->string_table()->Iterate(&updating_visitor); 3794 heap_->string_table()->Iterate(&updating_visitor);
3795 3795
3796 // Update pointers from external string table. 3796 // Update pointers from external string table.
3797 heap_->UpdateReferencesInExternalStringTable( 3797 heap_->UpdateReferencesInExternalStringTable(
3798 &UpdateReferenceInExternalStringTableEntry); 3798 &UpdateReferenceInExternalStringTableEntry);
3799 3799
3800 EvacuationWeakObjectRetainer evacuation_object_retainer; 3800 EvacuationWeakObjectRetainer evacuation_object_retainer;
3801 heap()->ProcessAllWeakReferences(&evacuation_object_retainer); 3801 heap()->ProcessAllWeakReferences(&evacuation_object_retainer);
3802 3802
3803 // Collects callback info for handles that are pending (about to be
3804 // collected) and either phantom or internal-fields. Releases the global
3805 // handles. See also PostGarbageCollectionProcessing.
3806 isolate()->global_handles()->CollectAllPhantomCallbackData();
3807
3808 // Visit invalidated code (we ignored all slots on it) and clear mark-bits 3803 // Visit invalidated code (we ignored all slots on it) and clear mark-bits
3809 // under it. 3804 // under it.
3810 ProcessInvalidatedCode(&updating_visitor); 3805 ProcessInvalidatedCode(&updating_visitor);
3811 3806
3812 heap_->isolate()->inner_pointer_to_code_cache()->Flush(); 3807 heap_->isolate()->inner_pointer_to_code_cache()->Flush();
3813 3808
3814 slots_buffer_allocator_.DeallocateChain(&migration_slots_buffer_); 3809 slots_buffer_allocator_.DeallocateChain(&migration_slots_buffer_);
3815 DCHECK(migration_slots_buffer_ == NULL); 3810 DCHECK(migration_slots_buffer_ == NULL);
3816 3811
3817 // The hashing of weak_object_to_code_table is no longer valid. 3812 // The hashing of weak_object_to_code_table is no longer valid.
(...skipping 918 matching lines...) Expand 10 before | Expand all | Expand 10 after
4736 SlotsBuffer* buffer = *buffer_address; 4731 SlotsBuffer* buffer = *buffer_address;
4737 while (buffer != NULL) { 4732 while (buffer != NULL) {
4738 SlotsBuffer* next_buffer = buffer->next(); 4733 SlotsBuffer* next_buffer = buffer->next();
4739 DeallocateBuffer(buffer); 4734 DeallocateBuffer(buffer);
4740 buffer = next_buffer; 4735 buffer = next_buffer;
4741 } 4736 }
4742 *buffer_address = NULL; 4737 *buffer_address = NULL;
4743 } 4738 }
4744 } 4739 }
4745 } // namespace v8::internal 4740 } // namespace v8::internal
OLDNEW
« src/global-handles.cc ('K') | « src/heap/heap.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698