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

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

Issue 980653002: Oilpan: disable conservative GCs during initial GC mixin construction. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Switch to a static const for mixinLevels Created 5 years, 10 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
Index: Source/platform/heap/ThreadState.h
diff --git a/Source/platform/heap/ThreadState.h b/Source/platform/heap/ThreadState.h
index 3679356d36122a6d2663f34d95b126db10e55d0e..7229ba48968d94c8938de70a9611d3cd42e11468 100644
--- a/Source/platform/heap/ThreadState.h
+++ b/Source/platform/heap/ThreadState.h
@@ -582,6 +582,17 @@ public:
double collectionRate() const { return m_collectionRate; }
+ // By entering a gc-forbidden scope, conservative GCs will not
+ // be allowed while handling an out-of-line allocation request.
+ // Intended used when constructing subclasses of GC mixins, where
+ // the object being constructed cannot be safely traced & marked
+ // fully should a GC be allowed while its subclasses are being
+ // constructed.
+ void enterGCForbiddenScope(unsigned delta)
+ {
+ m_gcForbiddenCount += delta;
+ }
+
private:
ThreadState();
~ThreadState();
@@ -626,14 +637,7 @@ private:
void snapshotFreeList();
#endif
- // By entering a gc-forbidden scope, conservative GCs will not
- // be allowed while handling an out-of-line allocation request.
- // Intended used when constructing subclasses of GC mixins, where
- // the object being constructed cannot be safely traced & marked
- // fully should a GC be allowed while its subclasses are being
- // constructed.
- template<typename U, typename V> friend class AllocateObjectTrait;
- void enterGCForbiddenScope() { m_gcForbiddenCount++; }
+ template<typename U> friend class GarbageCollectedMixinConstructorMarker;
void leaveGCForbiddenScope()
{
ASSERT(m_gcForbiddenCount > 0);

Powered by Google App Engine
This is Rietveld 408576698