Chromium Code Reviews| Index: third_party/WebKit/Source/platform/heap/ThreadState.cpp |
| diff --git a/third_party/WebKit/Source/platform/heap/ThreadState.cpp b/third_party/WebKit/Source/platform/heap/ThreadState.cpp |
| index 4b975f7563be186de4180620a0a86bc2c6d30bfa..72e4e2b531526f129009d941ee43b67b9e9645bb 100644 |
| --- a/third_party/WebKit/Source/platform/heap/ThreadState.cpp |
| +++ b/third_party/WebKit/Source/platform/heap/ThreadState.cpp |
| @@ -136,10 +136,7 @@ ThreadState::ThreadState(bool perThreadHeapEnabled) |
| m_likelyToBePromptlyFreed = wrapArrayUnique(new int[likelyToBePromptlyFreedArraySize]); |
| clearArenaAges(); |
| - // There is little use of weak references and collections off the main thread; |
| - // use a much lower initial block reservation. |
| - size_t initialBlockSize = isMainThread() ? CallbackStack::kDefaultBlockSize : CallbackStack::kMinimalBlockSize; |
| - m_threadLocalWeakCallbackStack = new CallbackStack(initialBlockSize); |
| + m_threadLocalWeakCallbackStack = new CallbackStack(); |
| } |
| ThreadState::~ThreadState() |
| @@ -963,7 +960,8 @@ void ThreadState::preGC() |
| // should only process callbacks that's found to be reachable by |
| // the latest GC, when it eventually gets to next perform |
| // thread-local weak processing. |
| - m_threadLocalWeakCallbackStack->clear(); |
| + m_threadLocalWeakCallbackStack->decommit(); |
|
sof
2016/07/05 14:19:02
Naming this clear() or reset() would be clearer, p
haraken
2016/07/06 01:58:11
We're already calling decommit() at the end of Thr
sof
2016/07/06 13:22:17
Ah, of course we already are; good.
|
| + m_threadLocalWeakCallbackStack->commit(); |
| } |
| void ThreadState::postGC(BlinkGC::GCType gcType) |