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

Issue 1111693003: Remove the concept of a cleanup task (Closed)

Created:
5 years, 7 months ago by Sami
Modified:
5 years, 6 months ago
CC:
blink-reviews, blink-reviews-dom_chromium.org, dglazkov+blink, eae+blinkwatch, falken, horo+watch_chromium.org, kinuko+worker_chromium.org, rwlbuis, sadrul
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Remove the concept of a cleanup task The only cleanup task in Blink which is not internal to a worker thread is the task to close a WebSQL database. Because 1) only worker threads support the concept of a cleanup task, and 2) WebSQL isn't supported on worker threads anymore after https://codereview.chromium.org/561093003/, we can safely remove the logic to handle cleanup tasks on worker threads. BUG=463143 TBR=jochen@chromium.org Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=195191

Patch Set 1 #

Total comments: 2

Patch Set 2 : Potential shutdown sequence with some debug logging. #

Total comments: 2

Patch Set 3 : Cleanup. #

Total comments: 6

Patch Set 4 : Sadrul's comments. #

Patch Set 5 : ASSERT => ASSERT_UNUSED #

Total comments: 13

Patch Set 6 : Rebased. #

Patch Set 7 : Review comments. #

Total comments: 2

Patch Set 8 : Simplify assertion. #

Total comments: 2

Patch Set 9 : Rename mutex. #

Patch Set 10 : ASSERT_UNUSED. #

Patch Set 11 : Rebased. #

Patch Set 12 : Shut down scheduler before clearing the heap. #

Patch Set 13 : Don't run tasks if thread was never initialized. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+69 lines, -110 lines) Patch
M Source/core/dom/ExecutionContextTask.h View 1 chunk +0 lines, -2 lines 0 comments Download
M Source/core/html/parser/HTMLParserThread.cpp View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/workers/WorkerGlobalScope.cpp View 1 2 3 4 5 6 3 chunks +6 lines, -24 lines 0 comments Download
M Source/core/workers/WorkerThread.h View 1 2 3 4 5 6 7 8 3 chunks +6 lines, -4 lines 0 comments Download
M Source/core/workers/WorkerThread.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 10 chunks +38 lines, -64 lines 0 comments Download
M Source/modules/webdatabase/DatabaseThread.cpp View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M Source/modules/webdatabase/DatabaseTracker.cpp View 1 chunk +0 lines, -5 lines 0 comments Download
M Source/platform/WebThreadSupportingGC.h View 1 2 3 2 chunks +4 lines, -4 lines 0 comments Download
M Source/platform/WebThreadSupportingGC.cpp View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +7 lines, -3 lines 0 comments Download
M public/platform/WebScheduler.h View 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 45 (9 generated)
Sami
Hi. This refactoring isn't fully working yet, but I wanted to get some early feedback ...
5 years, 7 months ago (2015-04-29 18:51:29 UTC) #2
haraken
On 2015/04/29 18:51:29, Sami wrote: > Hi. This refactoring isn't fully working yet, but I ...
5 years, 7 months ago (2015-04-30 00:55:52 UTC) #3
kinuko
Yes this concept has been a bit awkward, we should clean up this. https://codereview.chromium.org/1111693003/diff/1/Source/core/workers/WorkerThread.cpp File ...
5 years, 7 months ago (2015-04-30 04:03:44 UTC) #4
alex clarke (OOO till 29th)
https://codereview.chromium.org/1111693003/diff/20001/Source/core/workers/WorkerThread.cpp File Source/core/workers/WorkerThread.cpp (left): https://codereview.chromium.org/1111693003/diff/20001/Source/core/workers/WorkerThread.cpp#oldcode427 Source/core/workers/WorkerThread.cpp:427: virtual bool isCleanupTask() const { return true; } I ...
5 years, 7 months ago (2015-05-05 17:45:06 UTC) #6
Sami
This seems to work based on local testing, so please have another look. https://codereview.chromium.org/1111693003/diff/1/Source/core/workers/WorkerThread.cpp File ...
5 years, 7 months ago (2015-05-06 17:37:32 UTC) #7
sadrul
Some drive-by comments: https://codereview.chromium.org/1111693003/diff/40001/Source/core/workers/WorkerThread.cpp File Source/core/workers/WorkerThread.cpp (right): https://codereview.chromium.org/1111693003/diff/40001/Source/core/workers/WorkerThread.cpp#newcode75 Source/core/workers/WorkerThread.cpp:75: ASSERT(!m_wasClosed); Would it make sense to ...
5 years, 7 months ago (2015-05-06 18:04:50 UTC) #8
Sami
Drive-bys most definitely appreciated! Thanks, PTAL. https://codereview.chromium.org/1111693003/diff/40001/Source/core/workers/WorkerThread.cpp File Source/core/workers/WorkerThread.cpp (right): https://codereview.chromium.org/1111693003/diff/40001/Source/core/workers/WorkerThread.cpp#newcode75 Source/core/workers/WorkerThread.cpp:75: ASSERT(!m_wasClosed); On 2015/05/06 ...
5 years, 7 months ago (2015-05-07 14:20:14 UTC) #9
Sami
Friendly ping?
5 years, 7 months ago (2015-05-08 14:30:22 UTC) #10
kinuko
Sorry for slow review, looking good overall. https://codereview.chromium.org/1111693003/diff/80001/Source/core/workers/WorkerThread.cpp File Source/core/workers/WorkerThread.cpp (right): https://codereview.chromium.org/1111693003/diff/80001/Source/core/workers/WorkerThread.cpp#newcode363 Source/core/workers/WorkerThread.cpp:363: MutexLocker lock(m_threadCreationMutex); ...
5 years, 7 months ago (2015-05-09 10:20:10 UTC) #11
haraken
https://codereview.chromium.org/1111693003/diff/80001/Source/core/workers/WorkerGlobalScope.cpp File Source/core/workers/WorkerGlobalScope.cpp (right): https://codereview.chromium.org/1111693003/diff/80001/Source/core/workers/WorkerGlobalScope.cpp#newcode160 Source/core/workers/WorkerGlobalScope.cpp:160: void WorkerGlobalScope::close() I'm just curious if we can add ...
5 years, 7 months ago (2015-05-09 15:54:36 UTC) #12
Sami
Thanks for the review! Comments addressed. https://codereview.chromium.org/1111693003/diff/80001/Source/core/workers/WorkerGlobalScope.cpp File Source/core/workers/WorkerGlobalScope.cpp (right): https://codereview.chromium.org/1111693003/diff/80001/Source/core/workers/WorkerGlobalScope.cpp#newcode160 Source/core/workers/WorkerGlobalScope.cpp:160: void WorkerGlobalScope::close() On ...
5 years, 7 months ago (2015-05-11 10:35:32 UTC) #13
Sami
https://codereview.chromium.org/1111693003/diff/80001/Source/core/workers/WorkerThread.cpp File Source/core/workers/WorkerThread.cpp (right): https://codereview.chromium.org/1111693003/diff/80001/Source/core/workers/WorkerThread.cpp#newcode363 Source/core/workers/WorkerThread.cpp:363: MutexLocker lock(m_threadCreationMutex); On 2015/05/11 10:35:32, Sami wrote: > On ...
5 years, 7 months ago (2015-05-11 10:37:34 UTC) #14
haraken
LGTM on my side. https://codereview.chromium.org/1111693003/diff/120001/Source/core/workers/WorkerThread.cpp File Source/core/workers/WorkerThread.cpp (right): https://codereview.chromium.org/1111693003/diff/120001/Source/core/workers/WorkerThread.cpp#newcode74 Source/core/workers/WorkerThread.cpp:74: ASSERT_UNUSED(globalScope, !globalScope->isClosing()); Slightly more common: ...
5 years, 7 months ago (2015-05-11 13:06:46 UTC) #15
Sami
Thanks! https://codereview.chromium.org/1111693003/diff/120001/Source/core/workers/WorkerThread.cpp File Source/core/workers/WorkerThread.cpp (right): https://codereview.chromium.org/1111693003/diff/120001/Source/core/workers/WorkerThread.cpp#newcode74 Source/core/workers/WorkerThread.cpp:74: ASSERT_UNUSED(globalScope, !globalScope->isClosing()); On 2015/05/11 13:06:46, haraken wrote: > ...
5 years, 7 months ago (2015-05-11 13:15:05 UTC) #16
kinuko
https://codereview.chromium.org/1111693003/diff/80001/Source/core/workers/WorkerThread.cpp File Source/core/workers/WorkerThread.cpp (right): https://codereview.chromium.org/1111693003/diff/80001/Source/core/workers/WorkerThread.cpp#newcode363 Source/core/workers/WorkerThread.cpp:363: MutexLocker lock(m_threadCreationMutex); On 2015/05/11 10:37:34, Sami wrote: > On ...
5 years, 7 months ago (2015-05-11 13:26:40 UTC) #17
Sami
https://codereview.chromium.org/1111693003/diff/80001/Source/core/workers/WorkerThread.cpp File Source/core/workers/WorkerThread.cpp (right): https://codereview.chromium.org/1111693003/diff/80001/Source/core/workers/WorkerThread.cpp#newcode363 Source/core/workers/WorkerThread.cpp:363: MutexLocker lock(m_threadCreationMutex); On 2015/05/11 13:26:40, kinuko wrote: > On ...
5 years, 7 months ago (2015-05-11 14:02:37 UTC) #18
kinuko
On 2015/05/11 14:02:37, Sami wrote: > https://codereview.chromium.org/1111693003/diff/80001/Source/core/workers/WorkerThread.cpp > File Source/core/workers/WorkerThread.cpp (right): > > https://codereview.chromium.org/1111693003/diff/80001/Source/core/workers/WorkerThread.cpp#newcode363 > ...
5 years, 7 months ago (2015-05-11 14:22:46 UTC) #19
kinuko
https://codereview.chromium.org/1111693003/diff/140001/Source/core/workers/WorkerThread.cpp File Source/core/workers/WorkerThread.cpp (right): https://codereview.chromium.org/1111693003/diff/140001/Source/core/workers/WorkerThread.cpp#newcode85 Source/core/workers/WorkerThread.cpp:85: m_workerThread->shutdown(); Hm, sorry I have one more question. Why ...
5 years, 7 months ago (2015-05-11 14:32:35 UTC) #20
Sami
On 2015/05/11 14:22:46, kinuko wrote: > Oh I see, you're right, I was overlooking the ...
5 years, 7 months ago (2015-05-11 14:36:17 UTC) #21
kinuko
Thanks. On 2015/05/11 14:32:35, kinuko wrote: > https://codereview.chromium.org/1111693003/diff/140001/Source/core/workers/WorkerThread.cpp > File Source/core/workers/WorkerThread.cpp (right): > > https://codereview.chromium.org/1111693003/diff/140001/Source/core/workers/WorkerThread.cpp#newcode85 ...
5 years, 7 months ago (2015-05-11 14:43:56 UTC) #22
Sami
https://codereview.chromium.org/1111693003/diff/140001/Source/core/workers/WorkerThread.cpp File Source/core/workers/WorkerThread.cpp (right): https://codereview.chromium.org/1111693003/diff/140001/Source/core/workers/WorkerThread.cpp#newcode85 Source/core/workers/WorkerThread.cpp:85: m_workerThread->shutdown(); On 2015/05/11 14:32:35, kinuko wrote: > Hm, sorry ...
5 years, 7 months ago (2015-05-11 14:46:13 UTC) #23
kinuko
On 2015/05/11 14:46:13, Sami wrote: > https://codereview.chromium.org/1111693003/diff/140001/Source/core/workers/WorkerThread.cpp > File Source/core/workers/WorkerThread.cpp (right): > > https://codereview.chromium.org/1111693003/diff/140001/Source/core/workers/WorkerThread.cpp#newcode85 > ...
5 years, 7 months ago (2015-05-11 15:01:58 UTC) #24
Sami
On 2015/05/11 15:01:58, kinuko wrote: > I see thanks for the explanation. So either shutdown() ...
5 years, 7 months ago (2015-05-11 15:06:09 UTC) #25
Sami
TBR'ing public/platform/WebScheduler.h for jochen@ since it's just adding back a virtual we had there before.
5 years, 7 months ago (2015-05-11 15:15:02 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1111693003/160001
5 years, 7 months ago (2015-05-11 15:15:35 UTC) #30
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_gn_rel on tryserver.blink (JOB_FAILED, http://build.chromium.org/p/tryserver.blink/builders/linux_chromium_gn_rel/builds/35213)
5 years, 7 months ago (2015-05-11 15:35:03 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1111693003/180001
5 years, 7 months ago (2015-05-11 15:38:48 UTC) #35
commit-bot: I haz the power
Committed patchset #10 (id:180001) as https://src.chromium.org/viewvc/blink?view=rev&revision=195191
5 years, 7 months ago (2015-05-11 17:48:40 UTC) #36
sof
I can't reproduce locally with an asan-debug build, but this seems like a plausible candidate ...
5 years, 7 months ago (2015-05-12 13:22:21 UTC) #38
Sami
On 2015/05/12 13:22:21, sof wrote: > I can't reproduce locally with an asan-debug build, but ...
5 years, 7 months ago (2015-05-12 13:26:30 UTC) #39
sof
On 2015/05/12 13:26:30, Sami wrote: > On 2015/05/12 13:22:21, sof wrote: > > I can't ...
5 years, 7 months ago (2015-05-12 13:37:09 UTC) #40
Dirk Pranke
A revert of this CL (patchset #10 id:180001) has been created in https://codereview.chromium.org/1134933003/ by dpranke@chromium.org. ...
5 years, 7 months ago (2015-05-12 22:48:46 UTC) #41
Sami
The two problems found by AddressSanitizer were: 1. The scheduler was being shut down *after* ...
5 years, 7 months ago (2015-05-13 16:43:09 UTC) #42
kinuko
On 2015/05/13 16:43:09, Sami wrote: > The two problems found by AddressSanitizer were: > > ...
5 years, 7 months ago (2015-05-14 06:06:52 UTC) #43
Sami
On 2015/05/14 06:06:52, kinuko wrote: > This is looking good, but I recommend that uploading ...
5 years, 7 months ago (2015-05-14 10:16:10 UTC) #44
kinuko
5 years, 7 months ago (2015-05-14 10:59:35 UTC) #45
On 2015/05/14 10:16:10, Sami wrote:
> On 2015/05/14 06:06:52, kinuko wrote:
> > This is looking good, but I recommend that uploading this change as a new
> patch
> > (e.g. upload the original patch that has landed as a new issue, then and
> upload
> > fixed one) so that each review is associated to only one commit log.
> 
> Thanks, done: https://codereview.chromium.org/1127123010/ (Although I prefer
> keeping everything in a single review because it is easier to track code
review
> history.)

Thanks!  I thought it was discouraged as I was told not to do so several times,
but looking it back now it seems it's just subjective. Thanks for doing this
anyways.

(Just found this thread:
https://groups.google.com/a/chromium.org/d/msg/chromium-dev/IcBDPaERTiI/1gOC7...)

Powered by Google App Engine
This is Rietveld 408576698