DescriptionOilpan: We need to collect all garbage before shutting down the worker thread
- Before checking ASSERT(m_workerGlobalScope->hasOneRef()) at the end of worker thread execution, we need to collect all garbage. Specifically, we need to call Heap::collectGarbage() before the ASSERT. Note that we don't need to call V8's GC because wrappers of the worker thread are stored in DOMWrapperMap and they are already cleared in ~WorkerScriptController().
- The essential part of this CL is to add Heap::collectGarbage() before the ASSERT.
- This CL moves ThreadState::cleanup() into ThreadState::detach(), because cleanup() should be always coupled with detach().
- This CL adds Heap::collectAllGarbage() that calls Heap::collectGarabge() multiple times. Until we remove all persistent handles, we need to call multiple times to break persistent chains and collect all garbage.
BUG=340522
NOTRY=true
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=168717
Patch Set 1 #
Total comments: 8
Patch Set 2 : #
Total comments: 2
Patch Set 3 : #
Messages
Total messages: 21 (0 generated)
|