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