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

Issue 2808843003: [scheduler] Change TaskQueue observer call mechanism. (Closed)

Created:
3 years, 8 months ago by altimin
Modified:
3 years, 7 months ago
CC:
chromium-reviews, blink-reviews, kinuko+watch, scheduler-bugs_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

[scheduler] Change TaskQueue observer call mechanism. Instead of manually calling TaskQueue observer we can rely on TimeDomain calling SetScheduledTimeDomainWakeUp and we can call the observer from there. This patch also fixes the problem where pages were stuck due to a missing notification. Test coverage is improved and HasPendingImmediateWork renamed to HasTaskToRunImmediately to better reflect its meaning. R=alexclarke@chromium.org,skyostil@chromium.org BUG=699541, 710095 Review-Url: https://codereview.chromium.org/2808843003 Cr-Commit-Position: refs/heads/master@{#470957} Committed: https://chromium.googlesource.com/chromium/src/+/0f67a0c1b7f0e461114771b4297f5fc0a0202cee

Patch Set 1 #

Total comments: 4

Patch Set 2 : addressed comments #

Total comments: 6

Patch Set 3 : Tests & comments #

Total comments: 24

Patch Set 4 : Addressed comments from alexclarke@ #

Patch Set 5 : Addressed comments #

Patch Set 6 : Fix compilation #

Messages

Total messages: 46 (29 generated)
altimin
PTAL
3 years, 8 months ago (2017-04-10 16:46:17 UTC) #2
Sami
Alex, please also take a look -- I assume you guys talked about this offline? ...
3 years, 8 months ago (2017-04-10 17:45:07 UTC) #4
altimin
PTAL. It's time to land this one too. https://codereview.chromium.org/2808843003/diff/1/third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.h File third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.h (right): https://codereview.chromium.org/2808843003/diff/1/third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.h#newcode185 third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.h:185: // ...
3 years, 7 months ago (2017-05-08 15:40:12 UTC) #7
Sami
Thanks! https://codereview.chromium.org/2808843003/diff/20001/third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.cc File third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.cc (right): https://codereview.chromium.org/2808843003/diff/20001/third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.cc#newcode824 third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.cc:824: if (HasPendingImmediateWork() && main_thread_only().observer) { This could also ...
3 years, 7 months ago (2017-05-08 17:33:37 UTC) #8
altimin
PTAL https://codereview.chromium.org/2808843003/diff/20001/third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.cc File third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.cc (right): https://codereview.chromium.org/2808843003/diff/20001/third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.cc#newcode824 third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.cc:824: if (HasPendingImmediateWork() && main_thread_only().observer) { On 2017/05/08 17:33:37, ...
3 years, 7 months ago (2017-05-09 11:41:42 UTC) #12
alex clarke (OOO till 29th)
I don't understand the motivation behind this patch. https://codereview.chromium.org/2808843003/diff/40001/third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.cc File third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.cc (right): https://codereview.chromium.org/2808843003/diff/40001/third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.cc#newcode293 third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.cc:293: ScheduleDelayedWorkInTimeDomain(now); ...
3 years, 7 months ago (2017-05-09 11:51:28 UTC) #13
alex clarke (OOO till 29th)
OK so I understand now the motivation! :) A few comments. https://codereview.chromium.org/2808843003/diff/40001/third_party/WebKit/Source/platform/scheduler/base/task_queue.h File third_party/WebKit/Source/platform/scheduler/base/task_queue.h (right): ...
3 years, 7 months ago (2017-05-09 12:50:51 UTC) #15
altimin
PTAL https://codereview.chromium.org/2808843003/diff/40001/third_party/WebKit/Source/platform/scheduler/base/task_queue.h File third_party/WebKit/Source/platform/scheduler/base/task_queue.h (right): https://codereview.chromium.org/2808843003/diff/40001/third_party/WebKit/Source/platform/scheduler/base/task_queue.h#newcode41 third_party/WebKit/Source/platform/scheduler/base/task_queue.h:41: // TODO(altimin): Make it base::Optional<base::TimeTicks> to tell On ...
3 years, 7 months ago (2017-05-09 13:15:04 UTC) #17
Sami
lgtm
3 years, 7 months ago (2017-05-09 17:07:56 UTC) #18
alex clarke (OOO till 29th)
https://codereview.chromium.org/2808843003/diff/40001/third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.cc File third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.cc (right): https://codereview.chromium.org/2808843003/diff/40001/third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.cc#newcode912 third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.cc:912: if (!scheduled_time_domain_wake_up) On 2017/05/09 13:15:03, altimin wrote: > On ...
3 years, 7 months ago (2017-05-09 19:18:42 UTC) #23
alex clarke (OOO till 29th)
So I would prefer if you make those changes but I won't block this patch ...
3 years, 7 months ago (2017-05-10 10:26:39 UTC) #24
altimin
On 2017/05/10 10:26:39, alex clarke wrote: > So I would prefer if you make those ...
3 years, 7 months ago (2017-05-10 10:42:18 UTC) #26
altimin
PTAL https://codereview.chromium.org/2808843003/diff/40001/third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.cc File third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.cc (right): https://codereview.chromium.org/2808843003/diff/40001/third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.cc#newcode912 third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.cc:912: if (!scheduled_time_domain_wake_up) On 2017/05/09 19:18:42, alex clarke wrote: ...
3 years, 7 months ago (2017-05-10 10:42:26 UTC) #28
alex clarke (OOO till 29th)
Thanks, LGTM
3 years, 7 months ago (2017-05-10 10:47:02 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2808843003/100001
3 years, 7 months ago (2017-05-11 11:21:39 UTC) #42
commit-bot: I haz the power
Committed patchset #6 (id:100001) as https://chromium.googlesource.com/chromium/src/+/0f67a0c1b7f0e461114771b4297f5fc0a0202cee
3 years, 7 months ago (2017-05-11 15:06:54 UTC) #45
shimazu
3 years, 6 months ago (2017-06-01 03:35:12 UTC) #46
Message was sent while issue was closed.
A revert of this CL (patchset #6 id:100001) has been created in
https://codereview.chromium.org/2915993003/ by shimazu@chromium.org.

The reason for reverting is: This looks causing failure of loading pages when
launching the process. For example, twitter lite cannot be open from the home
screen because the hosting service worker probably cannot run on a process. 

See also https://crbug.com/725337..

Powered by Google App Engine
This is Rietveld 408576698