| Index: Source/platform/heap/ThreadState.h
|
| diff --git a/Source/platform/heap/ThreadState.h b/Source/platform/heap/ThreadState.h
|
| index 213170db701f44d52e20cb88735a751a38d74add..ce528c7a2716cc83229c7ee35dc5290a65269391 100644
|
| --- a/Source/platform/heap/ThreadState.h
|
| +++ b/Source/platform/heap/ThreadState.h
|
| @@ -238,13 +238,13 @@ public:
|
| public:
|
| explicit SweepForbiddenScope(ThreadState* state) : m_state(state)
|
| {
|
| - ASSERT(!m_state->m_sweepForbidden);
|
| - m_state->m_sweepForbidden = true;
|
| + ASSERT(!m_state->m_isSweepForbidden);
|
| + m_state->m_isSweepForbidden = true;
|
| }
|
| ~SweepForbiddenScope()
|
| {
|
| - ASSERT(m_state->m_sweepForbidden);
|
| - m_state->m_sweepForbidden = false;
|
| + ASSERT(m_state->m_isSweepForbidden);
|
| + m_state->m_isSweepForbidden = false;
|
| }
|
| private:
|
| ThreadState* m_state;
|
| @@ -374,7 +374,21 @@ public:
|
| ASSERT(m_gcForbiddenCount > 0);
|
| m_gcForbiddenCount--;
|
| }
|
| - bool sweepForbidden() const { return m_sweepForbidden; }
|
| + bool sweepForbidden() const { return m_isSweepForbidden; }
|
| +
|
| +#if ENABLE(ASSERT)
|
| + bool isEagerlySweeping() const { return m_isEagerlySweeping; }
|
| + void enterEagerSweepScope()
|
| + {
|
| + ASSERT(!m_isEagerlySweeping);
|
| + m_isEagerlySweeping = true;
|
| + }
|
| + void leaveEagerSweepScope()
|
| + {
|
| + ASSERT(m_isEagerlySweeping);
|
| + m_isEagerlySweeping = false;
|
| + }
|
| +#endif
|
|
|
| void prepareRegionTree();
|
| void flushHeapDoesNotContainCacheIfNeeded();
|
| @@ -709,18 +723,17 @@ private:
|
| intptr_t* m_endOfStack;
|
| void* m_safePointScopeMarker;
|
| Vector<Address> m_safePointStackCopy;
|
| - bool m_atSafePoint;
|
| Vector<Interruptor*> m_interruptors;
|
| - bool m_sweepForbidden;
|
| +
|
| size_t m_noAllocationCount;
|
| size_t m_gcForbiddenCount;
|
| +
|
| BaseHeap* m_heaps[NumberOfHeaps];
|
|
|
| int m_vectorBackingHeapIndex;
|
| size_t m_heapAges[NumberOfHeaps];
|
| size_t m_currentHeapAges;
|
|
|
| - bool m_isTerminating;
|
| GarbageCollectedMixinConstructorMarker* m_gcMixinMarker;
|
|
|
| bool m_shouldFlushHeapDoesNotContainCache;
|
| @@ -748,6 +761,13 @@ private:
|
| static const int likelyToBePromptlyFreedArraySize = (1 << 8);
|
| static const int likelyToBePromptlyFreedArrayMask = likelyToBePromptlyFreedArraySize - 1;
|
| OwnPtr<int[]> m_likelyToBePromptlyFreed;
|
| +
|
| + bool m_atSafePoint;
|
| + bool m_isTerminating;
|
| + bool m_isSweepForbidden;
|
| +#if ENABLE(ASSERT)
|
| + bool m_isEagerlySweeping;
|
| +#endif
|
| };
|
|
|
| template<ThreadAffinity affinity> class ThreadStateFor;
|
|
|