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

Unified Diff: src/heap/heap.cc

Issue 2245133004: [heap] Add basic infrastructure for incremental wrapper tracing. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix comment Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/flag-definitions.h ('k') | src/heap/incremental-marking.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/heap.cc
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index 9d6204df2a53974b81b37bb965a1ae2f288aa7ea..8178a1ab4854217aa3986576f3d4b47c4c8eb2bb 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -5454,7 +5454,15 @@ void Heap::TracePossibleWrapper(JSObject* js_object) {
}
void Heap::RegisterExternallyReferencedObject(Object** object) {
- mark_compact_collector()->RegisterExternallyReferencedObject(object);
+ HeapObject* heap_object = HeapObject::cast(*object);
+ DCHECK(Contains(heap_object));
+ if (FLAG_incremental_marking_wrappers && incremental_marking()->IsMarking()) {
+ IncrementalMarking::MarkGrey(this, heap_object);
+ } else {
+ DCHECK(mark_compact_collector()->in_use());
+ MarkBit mark_bit = ObjectMarking::MarkBitFrom(heap_object);
+ mark_compact_collector()->MarkObject(heap_object, mark_bit);
+ }
}
void Heap::TearDown() {
« no previous file with comments | « src/flag-definitions.h ('k') | src/heap/incremental-marking.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698