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

Issue 876623002: Adds a CancellableTaskFactory and exposes postLoadingTasks to Blink (Closed)

Created:
5 years, 11 months ago by alex clarke (OOO till 29th)
Modified:
5 years, 10 months ago
CC:
aandrey+blink_chromium.org, blink-reviews, blink-reviews-wtf_chromium.org, dglazkov+blink, Mikhail, scheduler-bugs_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Adds a CancellableTaskFactory and exposes postLoadingTasks to Blink This patch is needed to let us post HTML parsing tasks on the renderer scheduler's loading task queue. The CancellableTaskFactory is inspired by base::CancelableCallback and is intended to replace the the startOneShot(0) timers without the overhead of the blink timer heap. BUG=391005 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=189509

Patch Set 1 #

Total comments: 21

Patch Set 2 : Bundle in the HTML Parser changes too #

Total comments: 6

Patch Set 3 : Sami's changes #

Patch Set 4 : Fix compile issue #

Total comments: 4

Patch Set 5 : Exposed ClosureRunnerTask as per Ross's suggestion #

Total comments: 2

Patch Set 6 : Fixed the broken test #

Patch Set 7 : Rebase #

Patch Set 8 : Oops forgot to add a file #

Patch Set 9 : Err thanks MSVC #

Patch Set 10 : Get rid of platform export #

Patch Set 11 : Fixes #

Patch Set 12 : Maybe it does need PLATFORM_EXPORT #

Patch Set 13 : PACIFY MSVC #

Patch Set 14 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+361 lines, -29 lines) Patch
M Source/core/html/parser/BackgroundHTMLParser.cpp View 1 2 3 4 2 chunks +6 lines, -1 line 0 comments Download
M Source/core/html/parser/HTMLParserScheduler.h View 1 2 3 chunks +3 lines, -4 lines 0 comments Download
M Source/core/html/parser/HTMLParserScheduler.cpp View 1 2 3 2 chunks +8 lines, -14 lines 0 comments Download
M Source/platform/blink_platform.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +5 lines, -0 lines 0 comments Download
A Source/platform/scheduler/CancellableTaskFactory.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +63 lines, -0 lines 0 comments Download
A Source/platform/scheduler/CancellableTaskFactory.cpp View 1 1 chunk +34 lines, -0 lines 0 comments Download
A Source/platform/scheduler/CancellableTaskFactoryTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +171 lines, -0 lines 0 comments Download
A Source/platform/scheduler/ClosureRunnerTask.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +37 lines, -0 lines 0 comments Download
A + Source/platform/scheduler/ClosureRunnerTask.cpp View 1 2 3 4 5 6 7 1 chunk +6 lines, -8 lines 0 comments Download
M Source/platform/scheduler/Scheduler.h View 1 2 3 4 2 chunks +6 lines, -0 lines 0 comments Download
M Source/platform/scheduler/Scheduler.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +9 lines, -1 line 0 comments Download
M Source/wtf/WeakPtr.h View 1 chunk +5 lines, -0 lines 0 comments Download
M public/platform/WebScheduler.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +7 lines, -0 lines 0 comments Download
M public/platform/WebThread.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 65 (26 generated)
alex clarke (OOO till 29th)
5 years, 11 months ago (2015-01-26 11:37:40 UTC) #2
alex clarke (OOO till 29th)
jochen@chromium.org: Please review changes in
5 years, 11 months ago (2015-01-26 11:38:26 UTC) #4
jochen (gone - plz use gerrit)
what do you need the cancellable tasks for? They're not referenced anywhere in this cl. ...
5 years, 10 months ago (2015-01-26 15:53:32 UTC) #5
Sami
+rmcilroy since he wanted to have a peek too. I think the cancellable task factory ...
5 years, 10 months ago (2015-01-26 16:08:15 UTC) #7
alex clarke (OOO till 29th)
I've bundled in the HTML Parser changes as requested. PTAL https://codereview.chromium.org/876623002/diff/1/Source/platform/scheduler/CancellableTaskFactory.cpp File Source/platform/scheduler/CancellableTaskFactory.cpp (right): https://codereview.chromium.org/876623002/diff/1/Source/platform/scheduler/CancellableTaskFactory.cpp#newcode21 ...
5 years, 10 months ago (2015-01-26 17:00:46 UTC) #8
Sami
https://codereview.chromium.org/876623002/diff/20001/Source/core/html/parser/HTMLParserScheduler.cpp File Source/core/html/parser/HTMLParserScheduler.cpp (right): https://codereview.chromium.org/876623002/diff/20001/Source/core/html/parser/HTMLParserScheduler.cpp#newcode116 Source/core/html/parser/HTMLParserScheduler.cpp:116: Platform::current()->scheduler()->postLoadingTask(WebTraceLocation(FROM_HERE), m_cancelableContinueParse.task()); I think it's a little unfortunate that ...
5 years, 10 months ago (2015-01-26 17:18:35 UTC) #9
alex clarke (OOO till 29th)
https://codereview.chromium.org/876623002/diff/20001/Source/core/html/parser/HTMLParserScheduler.cpp File Source/core/html/parser/HTMLParserScheduler.cpp (right): https://codereview.chromium.org/876623002/diff/20001/Source/core/html/parser/HTMLParserScheduler.cpp#newcode116 Source/core/html/parser/HTMLParserScheduler.cpp:116: Platform::current()->scheduler()->postLoadingTask(WebTraceLocation(FROM_HERE), m_cancelableContinueParse.task()); On 2015/01/26 17:18:34, Sami wrote: > I ...
5 years, 10 months ago (2015-01-26 17:31:36 UTC) #10
alex clarke (OOO till 29th)
As discussed offline with Sami, the Scheduler::postLoadingTask now accepts tasks as well as closures.
5 years, 10 months ago (2015-01-26 18:00:33 UTC) #11
Sami
Great, I think interface-wise this looks perfect. One question about the parser though. https://codereview.chromium.org/876623002/diff/60001/Source/core/html/parser/HTMLDocumentParser.cpp File ...
5 years, 10 months ago (2015-01-26 18:07:41 UTC) #12
rmcilroy
I'm liking this a lot more than the previous patch-set - thanks for iterating! I ...
5 years, 10 months ago (2015-01-26 18:09:02 UTC) #13
jochen (gone - plz use gerrit)
lgtm https://codereview.chromium.org/876623002/diff/60001/Source/platform/scheduler/CancellableTaskFactory.h File Source/platform/scheduler/CancellableTaskFactory.h (right): https://codereview.chromium.org/876623002/diff/60001/Source/platform/scheduler/CancellableTaskFactory.h#newcode52 Source/platform/scheduler/CancellableTaskFactory.h:52: friend class CancellableTask; inner classes are automatically friends, ...
5 years, 10 months ago (2015-01-27 09:59:20 UTC) #14
alex clarke (OOO till 29th)
I exposed ClosureRunnerTask as Ross suggested. PTAL. https://codereview.chromium.org/876623002/diff/1/Source/platform/scheduler/Scheduler.cpp File Source/platform/scheduler/Scheduler.cpp (right): https://codereview.chromium.org/876623002/diff/1/Source/platform/scheduler/Scheduler.cpp#newcode35 Source/platform/scheduler/Scheduler.cpp:35: class ClosureRunner ...
5 years, 10 months ago (2015-01-27 11:41:19 UTC) #15
rmcilroy
Nice, looks really good to me, thanks Alex! lgtm.
5 years, 10 months ago (2015-01-27 11:53:29 UTC) #16
Sami
Thanks, lgtm. I think we'll eventually want to make CancellableTaskFactory::task() return an OwnPtr, but let's ...
5 years, 10 months ago (2015-01-27 11:54:29 UTC) #17
alex clarke (OOO till 29th)
Thanks https://codereview.chromium.org/876623002/diff/80001/Source/platform/scheduler/CancellableTaskFactoryTest.cpp File Source/platform/scheduler/CancellableTaskFactoryTest.cpp (right): https://codereview.chromium.org/876623002/diff/80001/Source/platform/scheduler/CancellableTaskFactoryTest.cpp#newcode73 Source/platform/scheduler/CancellableTaskFactoryTest.cpp:73: factory.cancel(); On 2015/01/27 11:54:28, Sami wrote: > Did ...
5 years, 10 months ago (2015-01-27 13:02:15 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/876623002/100001
5 years, 10 months ago (2015-01-27 13:02:53 UTC) #20
commit-bot: I haz the power
Try jobs failed on following builders: mac_blink_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/mac_blink_rel/builds/40122)
5 years, 10 months ago (2015-01-27 13:08:17 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/876623002/120001
5 years, 10 months ago (2015-01-27 14:09:02 UTC) #24
kouhei (in TOK)
parser changes lgtm. Thanks!
5 years, 10 months ago (2015-01-27 14:09:11 UTC) #25
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_gn_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/linux_chromium_gn_rel/builds/24041)
5 years, 10 months ago (2015-01-27 14:15:20 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/876623002/140001
5 years, 10 months ago (2015-01-27 14:22:01 UTC) #29
commit-bot: I haz the power
Try jobs failed on following builders: win_blink_compile_dbg on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/win_blink_compile_dbg/builds/33907)
5 years, 10 months ago (2015-01-27 14:40:39 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/876623002/160001
5 years, 10 months ago (2015-01-27 14:48:13 UTC) #33
commit-bot: I haz the power
Try jobs failed on following builders: linux_blink_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/linux_blink_rel/builds/43876) mac_blink_compile_dbg on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/mac_blink_compile_dbg/builds/32989)
5 years, 10 months ago (2015-01-27 14:54:59 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/876623002/180001
5 years, 10 months ago (2015-01-27 15:05:11 UTC) #37
commit-bot: I haz the power
Try jobs failed on following builders: linux_blink_dbg on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/linux_blink_dbg/builds/42389)
5 years, 10 months ago (2015-01-27 15:23:20 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/876623002/200001
5 years, 10 months ago (2015-01-27 15:49:23 UTC) #41
commit-bot: I haz the power
Try jobs failed on following builders: linux_blink_dbg on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/linux_blink_dbg/builds/42397)
5 years, 10 months ago (2015-01-27 16:03:39 UTC) #43
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/876623002/220001
5 years, 10 months ago (2015-01-27 16:11:24 UTC) #45
commit-bot: I haz the power
Try jobs failed on following builders: win_blink_compile_dbg on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/win_blink_compile_dbg/builds/33923)
5 years, 10 months ago (2015-01-27 16:28:31 UTC) #47
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/876623002/240001
5 years, 10 months ago (2015-01-27 16:32:45 UTC) #49
commit-bot: I haz the power
Try jobs failed on following builders: linux_blink_dbg on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/linux_blink_dbg/builds/42412)
5 years, 10 months ago (2015-01-27 19:23:08 UTC) #51
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/876623002/240001
5 years, 10 months ago (2015-01-30 22:44:20 UTC) #53
commit-bot: I haz the power
Try jobs failed on following builders: mac_blink_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/mac_blink_rel/builds/40674)
5 years, 10 months ago (2015-01-30 22:48:40 UTC) #55
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/876623002/260001
5 years, 10 months ago (2015-02-02 10:30:44 UTC) #57
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/876623002/260001
5 years, 10 months ago (2015-02-03 11:09:00 UTC) #60
commit-bot: I haz the power
Try jobs failed on following builders: linux_blink_dbg on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/linux_blink_dbg/builds/43327)
5 years, 10 months ago (2015-02-03 13:50:16 UTC) #62
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/876623002/260001
5 years, 10 months ago (2015-02-04 14:27:07 UTC) #64
commit-bot: I haz the power
5 years, 10 months ago (2015-02-04 16:01:08 UTC) #65
Message was sent while issue was closed.
Committed patchset #14 (id:260001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=189509

Powered by Google App Engine
This is Rietveld 408576698