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

Unified Diff: Source/heap/ThreadState.h

Issue 220203005: Oilpan: introduce sticky forcedForTesting flag to ensure that a precise (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix js-test.js use in test. Created 6 years, 9 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/heap/Heap.cpp ('k') | Source/heap/ThreadState.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/heap/ThreadState.h
diff --git a/Source/heap/ThreadState.h b/Source/heap/ThreadState.h
index 3e799158c144d011152f6ef167165fbfacc7b935..776dccb31cedfc9720db8ba603b22f234b103f2b 100644
--- a/Source/heap/ThreadState.h
+++ b/Source/heap/ThreadState.h
@@ -278,6 +278,15 @@ public:
void setGCRequested();
void clearGCRequested();
+ // Was the last GC forced for testing? This is set when garbage collection
+ // is forced for testing and there are pointers on the stack. It remains
+ // set until a garbage collection is triggered with no pointers on the stack.
+ // This is used for layout tests that trigger GCs and check if objects are
+ // dead at a given point in time. That only reliably works when we get
+ // precise GCs with no conservative stack scanning.
+ void setForcedForTesting(bool);
+ bool forcePreciseGCForTesting();
+
bool sweepRequested();
void setSweepRequested();
void clearSweepRequested();
@@ -497,6 +506,8 @@ private:
m_safePointScopeMarker = 0;
}
+ void performPendingGC(StackState);
+
// Finds the Blink HeapPage in this thread-specific heap
// corresponding to a given address. Return 0 if the address is
// not contained in any of the pages. This does not consider
@@ -540,6 +551,7 @@ private:
bool m_atSafePoint;
Vector<Interruptor*> m_interruptors;
bool m_gcRequested;
+ bool m_forcePreciseGCForTesting;
volatile int m_sweepRequested;
bool m_sweepInProgress;
size_t m_noAllocationCount;
« no previous file with comments | « Source/heap/Heap.cpp ('k') | Source/heap/ThreadState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698