| Index: third_party/WebKit/Source/platform/heap/SafePoint.h
|
| diff --git a/third_party/WebKit/Source/platform/heap/SafePoint.h b/third_party/WebKit/Source/platform/heap/SafePoint.h
|
| index 0b96633b51b4b40dcd08a8fa33228eb410f5901a..f312ea612b8c719bd1960a3546091ff7021b07a7 100644
|
| --- a/third_party/WebKit/Source/platform/heap/SafePoint.h
|
| +++ b/third_party/WebKit/Source/platform/heap/SafePoint.h
|
| @@ -13,13 +13,12 @@ namespace blink {
|
| class SafePointScope final {
|
| WTF_MAKE_NONCOPYABLE(SafePointScope);
|
| public:
|
| - explicit SafePointScope(BlinkGC::StackState stackState, ThreadState* state = ThreadState::current())
|
| + explicit SafePointScope(BlinkGC::StackState stackState, ThreadState* state = ThreadState::current(), bool delayEnter = false)
|
| : m_state(state)
|
| {
|
| - if (m_state) {
|
| - RELEASE_ASSERT(!m_state->isAtSafePoint());
|
| - m_state->enterSafePoint(stackState, this);
|
| - }
|
| + if (delayEnter)
|
| + return;
|
| + enter(stackState);
|
| }
|
|
|
| ~SafePointScope()
|
| @@ -28,6 +27,15 @@ public:
|
| m_state->leaveSafePoint();
|
| }
|
|
|
| + void enter(BlinkGC::StackState stackState)
|
| + {
|
| + if (!m_state)
|
| + return;
|
| +
|
| + RELEASE_ASSERT(!m_state->isAtSafePoint());
|
| + m_state->enterSafePoint(stackState, this);
|
| + }
|
| +
|
| private:
|
| ThreadState* m_state;
|
| };
|
|
|