Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(46)

Issue 187483002: Oilpan: We need to collect all garbage before shutting down the worker thread (Closed)

Created:
6 years, 9 months ago by haraken
Modified:
6 years, 9 months ago
CC:
blink-reviews, falken, horo+watch_chromium.org, kinuko+watch, Mads Ager (chromium)
Visibility:
Public.

Description

Oilpan: 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 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+27 lines, -22 lines) Patch
M Source/core/workers/WorkerThread.cpp View 1 2 1 chunk +3 lines, -5 lines 0 comments Download
M Source/heap/Heap.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/heap/Heap.cpp View 1 chunk +11 lines, -0 lines 0 comments Download
M Source/heap/HeapTest.cpp View 1 chunk +0 lines, -1 line 0 comments Download
M Source/heap/ThreadState.h View 1 2 chunks +9 lines, -9 lines 0 comments Download
M Source/heap/ThreadState.cpp View 1 2 chunks +3 lines, -7 lines 0 comments Download

Messages

Total messages: 21 (0 generated)
haraken
PTAL I think this CL will fix worker-related crashes that happen when moving Events to ...
6 years, 9 months ago (2014-03-05 05:08:35 UTC) #1
kouhei (in TOK)
https://codereview.chromium.org/187483002/diff/1/Source/heap/ThreadState.cpp File Source/heap/ThreadState.cpp (right): https://codereview.chromium.org/187483002/diff/1/Source/heap/ThreadState.cpp#newcode333 Source/heap/ThreadState.cpp:333: delete state; Doesn't this mean we fail if we ...
6 years, 9 months ago (2014-03-05 05:58:14 UTC) #2
haraken
https://codereview.chromium.org/187483002/diff/1/Source/heap/ThreadState.cpp File Source/heap/ThreadState.cpp (right): https://codereview.chromium.org/187483002/diff/1/Source/heap/ThreadState.cpp#newcode333 Source/heap/ThreadState.cpp:333: delete state; On 2014/03/05 05:58:15, kouhei wrote: > Doesn't ...
6 years, 9 months ago (2014-03-05 06:00:57 UTC) #3
kouhei (in TOK)
On 2014/03/05 06:00:57, haraken wrote: > https://codereview.chromium.org/187483002/diff/1/Source/heap/ThreadState.cpp > File Source/heap/ThreadState.cpp (right): > > https://codereview.chromium.org/187483002/diff/1/Source/heap/ThreadState.cpp#newcode333 > ...
6 years, 9 months ago (2014-03-05 06:16:55 UTC) #4
haraken
On 2014/03/05 06:16:55, kouhei wrote: > On 2014/03/05 06:00:57, haraken wrote: > > https://codereview.chromium.org/187483002/diff/1/Source/heap/ThreadState.cpp > ...
6 years, 9 months ago (2014-03-05 06:19:11 UTC) #5
Mads Ager (chromium)
LGTM, but please just #ifdef out the assert since this will get caught by the ...
6 years, 9 months ago (2014-03-05 07:40:34 UTC) #6
wibling-chromium
LGTM with Mads' comments addressed.
6 years, 9 months ago (2014-03-05 08:36:08 UTC) #7
haraken
Thanks for review! https://codereview.chromium.org/187483002/diff/1/Source/core/workers/WorkerThread.cpp File Source/core/workers/WorkerThread.cpp (right): https://codereview.chromium.org/187483002/diff/1/Source/core/workers/WorkerThread.cpp#newcode145 Source/core/workers/WorkerThread.cpp:145: Heap::collectAllGarbage(ThreadState::NoHeapPointersOnStack); On 2014/03/05 07:40:34, Mads Ager ...
6 years, 9 months ago (2014-03-05 08:50:25 UTC) #8
haraken
The CQ bit was checked by haraken@chromium.org
6 years, 9 months ago (2014-03-05 08:50:54 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/haraken@chromium.org/187483002/20001
6 years, 9 months ago (2014-03-05 08:53:06 UTC) #10
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-05 09:36:08 UTC) #11
commit-bot: I haz the power
Retried try job too often on mac_blink_rel for step(s) blink_heap_unittests, blink_platform_unittests, webkit_lint, webkit_python_tests, webkit_tests, webkit_unit_tests, ...
6 years, 9 months ago (2014-03-05 09:36:08 UTC) #12
zerny-chromium
lgtm https://codereview.chromium.org/187483002/diff/20001/Source/core/workers/WorkerThread.cpp File Source/core/workers/WorkerThread.cpp (right): https://codereview.chromium.org/187483002/diff/20001/Source/core/workers/WorkerThread.cpp#newcode140 Source/core/workers/WorkerThread.cpp:140: #ifdef !ENABLE_OILPAN #if !ENABLE_OILPAN As seen in the ...
6 years, 9 months ago (2014-03-05 09:43:22 UTC) #13
kouhei (in TOK)
https://codereview.chromium.org/187483002/diff/20001/Source/core/workers/WorkerThread.cpp File Source/core/workers/WorkerThread.cpp (right): https://codereview.chromium.org/187483002/diff/20001/Source/core/workers/WorkerThread.cpp#newcode140 Source/core/workers/WorkerThread.cpp:140: #ifdef !ENABLE_OILPAN On 2014/03/05 09:43:23, zerny-chromium wrote: > #if ...
6 years, 9 months ago (2014-03-05 09:47:40 UTC) #14
haraken
The CQ bit was checked by haraken@chromium.org
6 years, 9 months ago (2014-03-06 10:49:44 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/haraken@chromium.org/187483002/40001
6 years, 9 months ago (2014-03-06 10:49:53 UTC) #16
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-06 12:02:44 UTC) #17
commit-bot: I haz the power
Try jobs failed on following builders: linux_blink
6 years, 9 months ago (2014-03-06 12:02:44 UTC) #18
haraken
The CQ bit was checked by haraken@chromium.org
6 years, 9 months ago (2014-03-07 07:58:22 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/haraken@chromium.org/187483002/40001
6 years, 9 months ago (2014-03-07 07:58:39 UTC) #20
commit-bot: I haz the power
6 years, 9 months ago (2014-03-07 07:58:56 UTC) #21
Message was sent while issue was closed.
Change committed as 168717

Powered by Google App Engine
This is Rietveld 408576698