| 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);
|
|
|