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

Issue 563203002: [Blink-WebWorkers] WorkerSharedTimer cancels extra delayed tasks. (Closed)

Created:
6 years, 3 months ago by Mayur Kankanwadi
Modified:
6 years, 2 months ago
CC:
abarth-chromium, blink-reviews, dglazkov+blink, falken, horo+watch_chromium.org, jamesr, kinuko+worker_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Project:
blink
Visibility:
Public.

Description

[Blink-WebWorkers] WorkerSharedTimer cancels extra delayed tasks. This CL has the Blink side changes to cancel extra delayed tasks posted in WorkerSharedTimer. Previously extra tasks were being posted and allowed to complete if multiple interval timers were scheduled on worker threads. Now we will cancel any extra delayed task, made redundant due to newly scheduled lesser timer interval tasks. BUG=410786 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=182930 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=183066

Patch Set 1 #

Patch Set 2 : Fixed a compilation error. #

Patch Set 3 : Removed hash set, which was used to store previous tasks. Now using single ptr. #

Total comments: 1

Patch Set 4 : Changes to create cancelable task. Removed weak_ptr. #

Total comments: 6

Patch Set 5 : Review comments from #7 incorporated. #

Patch Set 6 : Rebase done. #

Total comments: 1

Patch Set 7 : Added condition to check if the timer is active. This should fix the trybot failures. #

Patch Set 8 : Added layout tests. #

Total comments: 2

Patch Set 9 : Added extra layout tests. #

Patch Set 10 : Tweaked layout test. #

Patch Set 11 : Fix for layout tests. #

Total comments: 2

Patch Set 12 : Rebase. #

Patch Set 13 : Simplified logic removing last timer ptr. #

Patch Set 14 : Fix for Linux ASAN crash. #

Messages

Total messages: 39 (3 generated)
jochen (gone - plz use gerrit)
Here's how I would do this: instead of using createSameThreadTask(WorkerSharedTimer::OnTimeout), create a new class similar ...
6 years, 3 months ago (2014-09-12 14:11:55 UTC) #2
Mayur Kankanwadi
Ok, so instead of going deep till the level of message_loop, we are just letting ...
6 years, 3 months ago (2014-09-12 14:21:24 UTC) #3
Mayur Kankanwadi
jochen: I could just add the bool cancelled to WorkerThreadTask itself. Do the check WorkerThreadTask::run ...
6 years, 3 months ago (2014-09-12 14:36:41 UTC) #4
Mayur Kankanwadi
Got it. :) On to creating a new class. On 2014/09/12 14:36:41, Mayur Kankanwadi wrote: ...
6 years, 3 months ago (2014-09-12 14:52:25 UTC) #5
Mayur Kankanwadi
Hi jochen, Please review. --Mayur Kankanwadi. On 2014/09/12 14:52:25, Mayur Kankanwadi wrote: > Got it. ...
6 years, 3 months ago (2014-09-15 09:02:05 UTC) #6
jochen (gone - plz use gerrit)
https://codereview.chromium.org/563203002/diff/60001/Source/core/workers/WorkerThread.cpp File Source/core/workers/WorkerThread.cpp (right): https://codereview.chromium.org/563203002/diff/60001/Source/core/workers/WorkerThread.cpp#newcode88 Source/core/workers/WorkerThread.cpp:88: class WorkerThreadTask : public blink::WebThread::Task { why do you ...
6 years, 3 months ago (2014-09-15 14:29:42 UTC) #7
Mayur Kankanwadi
https://codereview.chromium.org/563203002/diff/60001/Source/core/workers/WorkerThread.cpp File Source/core/workers/WorkerThread.cpp (right): https://codereview.chromium.org/563203002/diff/60001/Source/core/workers/WorkerThread.cpp#newcode88 Source/core/workers/WorkerThread.cpp:88: class WorkerThreadTask : public blink::WebThread::Task { On 2014/09/15 14:29:41, ...
6 years, 3 months ago (2014-09-15 14:38:27 UTC) #8
Mayur Kankanwadi
Hi jochen, Updated & rebased patch with your comments. Please review. Regards, --Mayur Kankanwadi. On ...
6 years, 3 months ago (2014-09-16 09:32:33 UTC) #9
Mayur Kankanwadi
Hi jochen, The bots are failing in webkit_tests. I ran the full suite as well ...
6 years, 3 months ago (2014-09-16 13:38:32 UTC) #10
Mayur Kankanwadi
Added a fix, this should fix the trybot failures. On 2014/09/16 13:38:32, Mayur Kankanwadi wrote: ...
6 years, 3 months ago (2014-09-16 14:12:38 UTC) #11
jochen (gone - plz use gerrit)
the crashes look related to your patch e.g. https://storage.googleapis.com/chromium-layout-test-archives/linux_blink_dbg/25313/layout-test-results/fast/workers/worker-timeout-stderr.txt has a somewhat useful stack trace. ...
6 years, 3 months ago (2014-09-16 14:17:05 UTC) #12
Mayur Kankanwadi
Please check comments inline: On 2014/09/16 14:17:05, jochen wrote: > the crashes look related to ...
6 years, 3 months ago (2014-09-16 14:25:30 UTC) #13
Mayur Kankanwadi
Added layout tests. PTAL.
6 years, 3 months ago (2014-09-17 14:41:05 UTC) #14
jochen (gone - plz use gerrit)
https://codereview.chromium.org/563203002/diff/140001/LayoutTests/fast/workers/resources/worker-timeout-order.js File LayoutTests/fast/workers/resources/worker-timeout-order.js (right): https://codereview.chromium.org/563203002/diff/140001/LayoutTests/fast/workers/resources/worker-timeout-order.js#newcode9 LayoutTests/fast/workers/resources/worker-timeout-order.js:9: setTimeout(function () { postMessage(1); }, 100); can you use ...
6 years, 3 months ago (2014-09-17 14:47:40 UTC) #15
jochen (gone - plz use gerrit)
On 2014/09/16 at 14:25:30, mayurk.vk wrote: > Please check comments inline: > On 2014/09/16 14:17:05, ...
6 years, 3 months ago (2014-09-17 14:48:40 UTC) #16
Mayur Kankanwadi
PTAL.
6 years, 3 months ago (2014-09-18 14:34:11 UTC) #17
Mayur Kankanwadi
https://codereview.chromium.org/563203002/diff/140001/LayoutTests/fast/workers/resources/worker-timeout-order.js File LayoutTests/fast/workers/resources/worker-timeout-order.js (right): https://codereview.chromium.org/563203002/diff/140001/LayoutTests/fast/workers/resources/worker-timeout-order.js#newcode9 LayoutTests/fast/workers/resources/worker-timeout-order.js:9: setTimeout(function () { postMessage(1); }, 100); On 2014/09/17 14:47:39, ...
6 years, 3 months ago (2014-09-18 14:34:25 UTC) #18
jochen (gone - plz use gerrit)
thx for adding the tests. did you verify when the timeouts happen? my concern is ...
6 years, 3 months ago (2014-09-18 18:38:40 UTC) #19
Mayur Kankanwadi
Hi jochen, I tweaked the worker-timeout-cancel-order.html layout test and in the workerthread marked our task ...
6 years, 3 months ago (2014-09-19 07:19:48 UTC) #20
jochen (gone - plz use gerrit)
almost there https://codereview.chromium.org/563203002/diff/200001/Source/core/workers/WorkerThread.cpp File Source/core/workers/WorkerThread.cpp (right): https://codereview.chromium.org/563203002/diff/200001/Source/core/workers/WorkerThread.cpp#newcode149 Source/core/workers/WorkerThread.cpp:149: if (m_lastQueuedTaskTimer->isActive()) { ok, if you want ...
6 years, 3 months ago (2014-09-19 13:37:09 UTC) #21
Mayur Kankanwadi
https://codereview.chromium.org/563203002/diff/200001/Source/core/workers/WorkerThread.cpp File Source/core/workers/WorkerThread.cpp (right): https://codereview.chromium.org/563203002/diff/200001/Source/core/workers/WorkerThread.cpp#newcode149 Source/core/workers/WorkerThread.cpp:149: if (m_lastQueuedTaskTimer->isActive()) { On 2014/09/19 13:37:09, jochen (slow for ...
6 years, 3 months ago (2014-09-19 13:53:24 UTC) #22
jochen (gone - plz use gerrit)
On 2014/09/19 at 13:53:24, mayurk.vk wrote: > https://codereview.chromium.org/563203002/diff/200001/Source/core/workers/WorkerThread.cpp > File Source/core/workers/WorkerThread.cpp (right): > > https://codereview.chromium.org/563203002/diff/200001/Source/core/workers/WorkerThread.cpp#newcode149 ...
6 years, 3 months ago (2014-09-22 09:40:52 UTC) #23
Mayur Kankanwadi
On 2014/09/22 09:40:52, jochen (slow for reviews) wrote: > On 2014/09/19 at 13:53:24, mayurk.vk wrote: ...
6 years, 3 months ago (2014-09-22 09:47:40 UTC) #24
jochen (gone - plz use gerrit)
On 2014/09/22 at 09:47:40, mayurk.vk wrote: > On 2014/09/22 09:40:52, jochen (slow for reviews) wrote: ...
6 years, 3 months ago (2014-09-22 13:56:29 UTC) #25
Mayur Kankanwadi
I think this log will help to explain. I have added my comments starting with ...
6 years, 3 months ago (2014-09-23 14:08:02 UTC) #26
jochen (gone - plz use gerrit)
hum, the example doesn't include a situation where a fire interval that is bigger than ...
6 years, 2 months ago (2014-09-26 18:45:08 UTC) #27
Mayur Kankanwadi
On 2014/09/26 18:45:08, jochen (slow for reviews) wrote: > hum, the example doesn't include a ...
6 years, 2 months ago (2014-09-30 10:59:58 UTC) #28
jochen (gone - plz use gerrit)
lgtm, thanks!
6 years, 2 months ago (2014-09-30 13:16:36 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/563203002/240001
6 years, 2 months ago (2014-09-30 13:32:04 UTC) #31
commit-bot: I haz the power
Committed patchset #13 (id:240001) as 182930
6 years, 2 months ago (2014-09-30 15:06:48 UTC) #32
Zhenyao Mo
A revert of this CL (patchset #13 id:240001) has been created in https://codereview.chromium.org/617023003/ by zmo@chromium.org. ...
6 years, 2 months ago (2014-09-30 21:10:07 UTC) #33
Mayur Kankanwadi
On 2014/09/30 21:10:07, Zhenyao Mo wrote: > A revert of this CL (patchset #13 id:240001) ...
6 years, 2 months ago (2014-10-01 13:52:56 UTC) #34
jochen (gone - plz use gerrit)
still lgtm
6 years, 2 months ago (2014-10-01 14:01:51 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/563203002/260001
6 years, 2 months ago (2014-10-01 14:11:21 UTC) #37
Mayur Kankanwadi
On 2014/10/01 14:01:51, jochen wrote: > still lgtm Thanks.
6 years, 2 months ago (2014-10-01 14:29:43 UTC) #38
commit-bot: I haz the power
6 years, 2 months ago (2014-10-01 15:28:35 UTC) #39
Message was sent while issue was closed.
Committed patchset #14 (id:260001) as 183066

Powered by Google App Engine
This is Rietveld 408576698