| Index: third_party/WebKit/Source/platform/heap/Heap.cpp
|
| diff --git a/third_party/WebKit/Source/platform/heap/Heap.cpp b/third_party/WebKit/Source/platform/heap/Heap.cpp
|
| index 69cbac7e9dff8c35817455a37765f05a7c1e92fc..d676331908191215109d75c322f67f0ee5688d57 100644
|
| --- a/third_party/WebKit/Source/platform/heap/Heap.cpp
|
| +++ b/third_party/WebKit/Source/platform/heap/Heap.cpp
|
| @@ -138,19 +138,14 @@ void Heap::init()
|
|
|
| void Heap::shutdown()
|
| {
|
| + ASSERT(s_markingStack);
|
| +
|
| if (Platform::current() && Platform::current()->currentThread())
|
| Platform::current()->unregisterMemoryDumpProvider(BlinkGCMemoryDumpProvider::instance());
|
| - s_shutdownCalled = true;
|
| - ThreadState::shutdownHeapIfNecessary();
|
| -}
|
|
|
| -void Heap::doShutdown()
|
| -{
|
| - // We don't want to call doShutdown() twice.
|
| - if (!s_markingStack)
|
| - return;
|
| + // The main thread must be the last thread that gets detached.
|
| + RELEASE_ASSERT(ThreadState::attachedThreads().size() == 0);
|
|
|
| - ASSERT(!ThreadState::attachedThreads().size());
|
| delete s_heapDoesNotContainCache;
|
| s_heapDoesNotContainCache = nullptr;
|
| delete s_freePagePool;
|
|
|