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

Issue 2513413003: Worker: Provide a way to access parent frame task runners from a worker thread (Closed)

Created:
4 years ago by nhiroki
Modified:
4 years ago
Reviewers:
haraken, falken
CC:
chromium-reviews, shans, rjwright, blink-reviews-animation_chromium.org, shimazu+worker_chromium.org, kinuko+worker_chromium.org, Raymond Toy, darktears, blink-reviews, horo+watch_chromium.org, falken+watch_chromium.org, hongchan, kinuko+watch, blink-worker-reviews_chromium.org, Eric Willigers
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Worker: Provide a way to access parent frame task runners from a worker thread To use per-frame task runners on a worker thread, this CL provides a way to access parent frame task runners from a worker thread. To be specific, WorkerReportingProxy will have a new interface getParentFrameTaskRunners() and classes on a worker thread will post a task using the interface. This is a part of the project to migrate to per-frame task scheduler. A general design doc about the project is available here: https://docs.google.com/document/d/10It1DFRP7H3gev9hQA-7dtTcvcMFhrxuCt3-k21yjgQ/edit?usp=sharing BUG=667310 Committed: https://crrev.com/409972dd9d6a640a5854d74b142bef19e25a36b5 Cr-Commit-Position: refs/heads/master@{#434604}

Patch Set 1 #

Total comments: 4

Patch Set 2 : associate dummy documents with per-frame scheduler #

Patch Set 3 : revert PS2 #

Patch Set 4 : update comments #

Total comments: 2

Patch Set 5 : update comments #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+79 lines, -21 lines) Patch
M third_party/WebKit/Source/core/workers/InProcessWorkerObjectProxy.h View 3 chunks +1 line, -4 lines 0 comments Download
M third_party/WebKit/Source/core/workers/InProcessWorkerObjectProxy.cpp View 2 chunks +6 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/core/workers/ThreadedWorkletObjectProxy.h View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/workers/ThreadedWorkletObjectProxy.cpp View 1 chunk +6 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/workers/WorkerReportingProxy.h View 2 chunks +4 lines, -0 lines 2 comments Download
M third_party/WebKit/Source/core/workers/WorkerThreadTestHelper.h View 4 chunks +8 lines, -1 line 0 comments Download
M third_party/WebKit/Source/modules/compositorworker/AnimationWorkletThreadTest.cpp View 3 chunks +8 lines, -1 line 0 comments Download
M third_party/WebKit/Source/modules/webaudio/AudioWorkletThreadTest.cpp View 3 chunks +8 lines, -1 line 2 comments Download
M third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.h View 2 chunks +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp View 1 2 3 4 4 chunks +16 lines, -1 line 0 comments Download
M third_party/WebKit/Source/web/WebSharedWorkerImpl.h View 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp View 1 2 3 4 4 chunks +16 lines, -6 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 46 (28 generated)
nhiroki
PTAL, thanks!
4 years ago (2016-11-21 16:54:10 UTC) #8
nhiroki
On 2016/11/21 16:54:10, nhiroki wrote: > PTAL, thanks! This is a usage example: https://codereview.chromium.org/2518073002/
4 years ago (2016-11-21 17:04:21 UTC) #9
haraken
https://codereview.chromium.org/2513413003/diff/20001/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp File third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp (right): https://codereview.chromium.org/2513413003/diff/20001/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp#newcode431 third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp:431: m_parentFrameTaskRunners = ParentFrameTaskRunners::create(nullptr); When is the correct document set ...
4 years ago (2016-11-22 01:26:17 UTC) #12
nhiroki
Thank you for your comments. https://codereview.chromium.org/2513413003/diff/20001/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp File third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp (right): https://codereview.chromium.org/2513413003/diff/20001/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp#newcode431 third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp:431: m_parentFrameTaskRunners = ParentFrameTaskRunners::create(nullptr); On ...
4 years ago (2016-11-22 03:27:21 UTC) #13
haraken
On 2016/11/22 03:27:21, nhiroki wrote: > Thank you for your comments. > > https://codereview.chromium.org/2513413003/diff/20001/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp > ...
4 years ago (2016-11-22 03:50:40 UTC) #14
nhiroki
On 2016/11/22 03:50:40, haraken wrote: > On 2016/11/22 03:27:21, nhiroki wrote: > > Thank you ...
4 years ago (2016-11-25 04:32:50 UTC) #23
haraken
On 2016/11/25 04:32:50, nhiroki wrote: > On 2016/11/22 03:50:40, haraken wrote: > > On 2016/11/22 ...
4 years ago (2016-11-25 10:27:56 UTC) #24
haraken
Discussed offline. PS1 (not PS2) LGTM. Let's pass in nullptr to ParentFrameTaskRunner but explicitly mention ...
4 years ago (2016-11-25 11:08:40 UTC) #25
nhiroki
On 2016/11/25 11:08:40, haraken wrote: > Discussed offline. PS1 (not PS2) LGTM. > > Let's ...
4 years ago (2016-11-25 11:53:45 UTC) #26
nhiroki
falken, ping? :)
4 years ago (2016-11-27 22:16:21 UTC) #31
falken
I have a comment tweak suggestion but lgtm. https://codereview.chromium.org/2513413003/diff/100001/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp File third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp (right): https://codereview.chromium.org/2513413003/diff/100001/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp#newcode427 third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp:427: // ...
4 years ago (2016-11-28 01:37:45 UTC) #34
nhiroki
Sorry, I should have recorded our offline discussion: As haraken@ said, we decided to associate ...
4 years ago (2016-11-28 01:50:10 UTC) #35
nhiroki
Thank you :) https://codereview.chromium.org/2513413003/diff/100001/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp File third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp (right): https://codereview.chromium.org/2513413003/diff/100001/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp#newcode427 third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp:427: // ServiceWorker is never associated with ...
4 years ago (2016-11-28 02:26:59 UTC) #36
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/2513413003/120001
4 years ago (2016-11-28 02:27:22 UTC) #39
kinuko
drive-by two nits https://codereview.chromium.org/2513413003/diff/120001/third_party/WebKit/Source/core/workers/WorkerReportingProxy.h File third_party/WebKit/Source/core/workers/WorkerReportingProxy.h (right): https://codereview.chromium.org/2513413003/diff/120001/third_party/WebKit/Source/core/workers/WorkerReportingProxy.h#newcode62 third_party/WebKit/Source/core/workers/WorkerReportingProxy.h:62: virtual ParentFrameTaskRunners* getParentFrameTaskRunners() = 0; This ...
4 years ago (2016-11-28 04:24:09 UTC) #40
commit-bot: I haz the power
Committed patchset #5 (id:120001)
4 years ago (2016-11-28 04:37:57 UTC) #43
commit-bot: I haz the power
Patchset 5 (id:??) landed as https://crrev.com/409972dd9d6a640a5854d74b142bef19e25a36b5 Cr-Commit-Position: refs/heads/master@{#434604}
4 years ago (2016-11-28 04:39:23 UTC) #45
nhiroki
4 years ago (2016-11-28 05:29:26 UTC) #46
Message was sent while issue was closed.
Thank you :)

https://codereview.chromium.org/2513413003/diff/120001/third_party/WebKit/Sou...
File third_party/WebKit/Source/core/workers/WorkerReportingProxy.h (right):

https://codereview.chromium.org/2513413003/diff/120001/third_party/WebKit/Sou...
third_party/WebKit/Source/core/workers/WorkerReportingProxy.h:62: virtual
ParentFrameTaskRunners* getParentFrameTaskRunners() = 0;
On 2016/11/28 04:24:09, kinuko wrote:
> This method as is might feel slightly misplaced to me.  If it's to be used
only
> for some reporting (is it?) it'd be nice to comment like that, or we might
> rather want to update the class-level comment (&| naming) of this interface if
> it could be used other than for reporting?

Good point. Now this looks a bit strange to me, too...

This ParentFrameTaskRunners is used for reporting worker activities by
WorkerReportingProxy or sending control messages (e.g., termination request) by
WorkerThread. This virtual interface is for the latter use. Maybe we could
remove this interface and then WorkerThread has its own ParentFrameTaskRunners
for control messages.

I'll work on it.

https://codereview.chromium.org/2513413003/diff/120001/third_party/WebKit/Sou...
File third_party/WebKit/Source/modules/webaudio/AudioWorkletThreadTest.cpp
(right):

https://codereview.chromium.org/2513413003/diff/120001/third_party/WebKit/Sou...
third_party/WebKit/Source/modules/webaudio/AudioWorkletThreadTest.cpp:41: //
(Empty) WorkerReportingProxy implementation:
On 2016/11/28 04:24:09, kinuko wrote:
> Empty -> well, 'almost' empty?

Acknowledged. I'll fix this in a separate CL.

Powered by Google App Engine
This is Rietveld 408576698