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

Unified Diff: Source/platform/heap/MarkingVisitorImpl.h

Issue 1159773004: Oilpan: Implement a GC to take a heap snapshot (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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 | « Source/platform/heap/HeapTest.cpp ('k') | Source/platform/heap/ThreadState.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/heap/MarkingVisitorImpl.h
diff --git a/Source/platform/heap/MarkingVisitorImpl.h b/Source/platform/heap/MarkingVisitorImpl.h
index 27c8964e1f03c987231b0d8aa3313476146b6479..3265caa2dacdc26c2eca8e02514691e19e8e94a6 100644
--- a/Source/platform/heap/MarkingVisitorImpl.h
+++ b/Source/platform/heap/MarkingVisitorImpl.h
@@ -70,6 +70,9 @@ protected:
inline void registerWeakMembers(const void* closure, const void* objectPointer, WeakCallback callback)
{
ASSERT(toDerived()->markingMode() != Visitor::WeakProcessing);
+ // We don't want to run weak processings when taking a snapshot.
+ if (toDerived()->markingMode() == Visitor::SnapshotMarking)
+ return;
Heap::pushThreadLocalWeakCallback(const_cast<void*>(closure), const_cast<void*>(objectPointer), callback);
}
@@ -117,6 +120,9 @@ protected:
inline void registerWeakCellWithCallback(void** cell, WeakCallback callback)
{
ASSERT(toDerived()->markingMode() != Visitor::WeakProcessing);
+ // We don't want to run weak processings when taking a snapshot.
+ if (toDerived()->markingMode() == Visitor::SnapshotMarking)
+ return;
Heap::pushGlobalWeakCallback(cell, callback);
}
« no previous file with comments | « Source/platform/heap/HeapTest.cpp ('k') | Source/platform/heap/ThreadState.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698