| Index: third_party/WebKit/Source/platform/heap/ThreadState.h
|
| diff --git a/third_party/WebKit/Source/platform/heap/ThreadState.h b/third_party/WebKit/Source/platform/heap/ThreadState.h
|
| index 74edd20aefa36099c945f6add4484aa9731d6139..93a2c8596cfed1f87c0334aba4673dee01a239cf 100644
|
| --- a/third_party/WebKit/Source/platform/heap/ThreadState.h
|
| +++ b/third_party/WebKit/Source/platform/heap/ThreadState.h
|
| @@ -301,6 +301,15 @@ class PLATFORM_EXPORT ThreadState {
|
| ThreadState* const m_threadState;
|
| };
|
|
|
| +#if DCHECK_IS_ON()
|
| + bool canAllocateScriptWrappable() const { return !m_noScriptWrappableCount; }
|
| + void enterNoScriptWrappableScope() { m_noScriptWrappableCount++; }
|
| + void leaveNoScriptWrappableScope() {
|
| + DCHECK(m_noScriptWrappableCount);
|
| + m_noScriptWrappableCount--;
|
| + }
|
| +#endif
|
| +
|
| void flushHeapDoesNotContainCacheIfNeeded();
|
|
|
| // Safepoint related functionality.
|
| @@ -652,6 +661,10 @@ class PLATFORM_EXPORT ThreadState {
|
| size_t m_noAllocationCount;
|
| size_t m_gcForbiddenCount;
|
| size_t m_mixinsBeingConstructedCount;
|
| +#if DCHECK_IS_ON()
|
| + size_t m_noScriptWrappableCount;
|
| +#endif
|
| +
|
| double m_accumulatedSweepingTime;
|
|
|
| BaseArena* m_arenas[BlinkGC::NumberOfArenas];
|
|
|