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

Issue 2236833002: Pass per-frame task runners to Workers (when possible) [2nd try] (Closed)

Created:
4 years, 4 months ago by kinuko
Modified:
4 years, 4 months ago
Reviewers:
haraken, hiroshige, Sami, nhiroki
CC:
chromium-reviews, falken, kinuko+worker_chromium.org, blink-reviews, horo+watch_chromium.org, kinuko+watch, blink-worker-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Pass per-frame task runners to Workers (when possible) [2nd try] - For in-process workers (i.e. dedicated/compositor workers): always use the associated document's task runners - For out-of-process workers (i.e. service/shared workers): keep using the default task runner of the main thread, but via TaskRunnerHelper so we could still start using different task runners for different tasks (e.g. loading vs timer) if we want. [New] Diff from previous patch (PS1, https://codereview.chromium.org/2163983004): - No longer clone and hold per-frame task runners, instead reset them when the parent context goes away using ContextLifecycleObserver (because Workers could post tasks that trigger manual deletion for non- oilpan objects and if such tasks get dropped we could leak [*]) - Support TaskType in a very limited way [*] The 'manual deletion' part in the worker code should be probably fixed / removed, but I'd like it to be fixed separately. BUG=627034 Committed: https://crrev.com/a1e7e84803441a117280bbf0d20e8d7479453691 Cr-Commit-Position: refs/heads/master@{#412347}

Patch Set 1 #

Patch Set 2 : rebase, lifecycle observer + TaskType #

Total comments: 16

Patch Set 3 : foo #

Total comments: 6

Patch Set 4 : addressed comments #

Patch Set 5 : fixing hash traits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+179 lines, -12 lines) Patch
M third_party/WebKit/Source/core/core.gypi View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/TaskRunnerHelper.h View 1 2 3 4 3 chunks +10 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/workers/InProcessWorkerMessagingProxy.h View 1 2 3 chunks +7 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/workers/InProcessWorkerMessagingProxy.cpp View 1 2 5 chunks +7 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/workers/InProcessWorkerObjectProxy.h View 2 chunks +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/workers/InProcessWorkerObjectProxy.cpp View 1 2 3 chunks +22 lines, -8 lines 0 comments Download
A third_party/WebKit/Source/core/workers/ParentFrameTaskRunners.h View 1 2 3 1 chunk +54 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/workers/ParentFrameTaskRunners.cpp View 1 2 1 chunk +45 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.h View 1 2 3 chunks +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp View 1 2 3 chunks +10 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/WebSharedWorkerImpl.h View 1 2 2 chunks +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp View 1 2 3 chunks +11 lines, -0 lines 0 comments Download

Messages

Total messages: 47 (33 generated)
kinuko
PTAL. Diff between PS1 and PS2 is the changes from original patch that got reverted. ...
4 years, 4 months ago (2016-08-11 14:13:42 UTC) #19
haraken
https://codereview.chromium.org/2236833002/diff/40001/third_party/WebKit/Source/core/workers/InProcessWorkerObjectProxy.cpp File third_party/WebKit/Source/core/workers/InProcessWorkerObjectProxy.cpp (right): https://codereview.chromium.org/2236833002/diff/40001/third_party/WebKit/Source/core/workers/InProcessWorkerObjectProxy.cpp#newcode57 third_party/WebKit/Source/core/workers/InProcessWorkerObjectProxy.cpp:57: getParentFrameTaskRunners()->get(TaskType::Unthrottled)->postTask(BLINK_FROM_HERE, crossThreadBind(&InProcessWorkerMessagingProxy::postMessageToWorkerObject, crossThreadUnretained(m_messagingProxy), message, passed(std::move(channels)))); Do you think these ...
4 years, 4 months ago (2016-08-11 14:57:43 UTC) #20
kinuko
https://codereview.chromium.org/2236833002/diff/40001/third_party/WebKit/Source/core/workers/InProcessWorkerObjectProxy.cpp File third_party/WebKit/Source/core/workers/InProcessWorkerObjectProxy.cpp (right): https://codereview.chromium.org/2236833002/diff/40001/third_party/WebKit/Source/core/workers/InProcessWorkerObjectProxy.cpp#newcode57 third_party/WebKit/Source/core/workers/InProcessWorkerObjectProxy.cpp:57: getParentFrameTaskRunners()->get(TaskType::Unthrottled)->postTask(BLINK_FROM_HERE, crossThreadBind(&InProcessWorkerMessagingProxy::postMessageToWorkerObject, crossThreadUnretained(m_messagingProxy), message, passed(std::move(channels)))); On 2016/08/11 14:57:42, haraken ...
4 years, 4 months ago (2016-08-11 23:21:37 UTC) #23
haraken
LGTM https://codereview.chromium.org/2236833002/diff/60001/third_party/WebKit/Source/core/workers/InProcessWorkerObjectProxy.cpp File third_party/WebKit/Source/core/workers/InProcessWorkerObjectProxy.cpp (right): https://codereview.chromium.org/2236833002/diff/60001/third_party/WebKit/Source/core/workers/InProcessWorkerObjectProxy.cpp#newcode69 third_party/WebKit/Source/core/workers/InProcessWorkerObjectProxy.cpp:69: getParentFrameTaskRunners()->get(TaskType::Internal)->postTask(BLINK_FROM_HERE, crossThreadBind(&InProcessWorkerMessagingProxy::confirmMessageFromWorkerObject, crossThreadUnretained(m_messagingProxy), hasPendingActivity)); I scanned the spec ...
4 years, 4 months ago (2016-08-12 00:55:46 UTC) #26
kinuko
Thanks. Let me try landing this unless I get further objections (I'll start to be ...
4 years, 4 months ago (2016-08-15 22:56:19 UTC) #27
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/2236833002/80001
4 years, 4 months ago (2016-08-15 22:57:01 UTC) #30
nhiroki
lgtm
4 years, 4 months ago (2016-08-16 00:49:49 UTC) #31
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_asan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/210153)
4 years, 4 months ago (2016-08-16 02:09:50 UTC) #33
nhiroki
Failures on linux_chromium_asan_rel_ng look real. On 2016/08/15 22:56:19, kinuko wrote: > Thanks. Let me try ...
4 years, 4 months ago (2016-08-16 02:21:52 UTC) #34
kinuko
On 2016/08/16 02:21:52, nhiroki wrote: > Failures on linux_chromium_asan_rel_ng look real. > > On 2016/08/15 ...
4 years, 4 months ago (2016-08-16 21:09:44 UTC) #39
kinuko
Checking CQ again, but please feel free to clear if anyone's uncomfortable &| take it ...
4 years, 4 months ago (2016-08-16 21:43:32 UTC) #40
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/2236833002/100001
4 years, 4 months ago (2016-08-16 21:44:12 UTC) #43
commit-bot: I haz the power
Committed patchset #5 (id:100001)
4 years, 4 months ago (2016-08-16 21:48:40 UTC) #45
commit-bot: I haz the power
4 years, 4 months ago (2016-08-16 21:52:47 UTC) #47
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/a1e7e84803441a117280bbf0d20e8d7479453691
Cr-Commit-Position: refs/heads/master@{#412347}

Powered by Google App Engine
This is Rietveld 408576698