New issue
Advanced search Search tips

Issue 762453 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Nov 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocking:
issue 759166
issue 702318



Sign in to add a comment

Plumb task type from TaskRunnerHelper to TaskQueue::Task

Project Member Reported by altimin@chromium.org, Sep 6 2017

Issue description

Save additional task metadata by plumbing task type to scheduler and save it inside TaskQueue::Type for using in metrics.
 
Blocking: 702318
Blocking: 759166
Cc: maxlg@chromium.org
Project Member

Comment 4 by bugdroid1@chromium.org, Sep 7 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/107dd69cd0f07713fc1b38d5449c041d39291f44

commit 107dd69cd0f07713fc1b38d5449c041d39291f44
Author: Alexander Timin <altimin@chromium.org>
Date: Thu Sep 07 14:54:18 2017

[blink] Move TaskType to public/platform.

Move TaskType definition to public/platform. This will allow scheduler
to capture task type metadata and use it for instrumentation purposes
and content/ layer to post tasks to per-frame scheduler with proper
attribution.

R=haraken@chromium.org
BUG= 762453 

Change-Id: I3139545505408c958061fd3dd8fc9391c39de5f2
Reviewed-on: https://chromium-review.googlesource.com/654917
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Hajime Hoshi <hajimehoshi@chromium.org>
Commit-Queue: Alexander Timin <altimin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#500300}
[modify] https://crrev.com/107dd69cd0f07713fc1b38d5449c041d39291f44/third_party/WebKit/Source/core/dom/BUILD.gn
[modify] https://crrev.com/107dd69cd0f07713fc1b38d5449c041d39291f44/third_party/WebKit/Source/core/dom/TaskRunnerHelper.h
[add] https://crrev.com/107dd69cd0f07713fc1b38d5449c041d39291f44/third_party/WebKit/Source/core/dom/TaskTypeTraits.h
[modify] https://crrev.com/107dd69cd0f07713fc1b38d5449c041d39291f44/third_party/WebKit/Source/core/loader/WorkerThreadableLoader.cpp
[modify] https://crrev.com/107dd69cd0f07713fc1b38d5449c041d39291f44/third_party/WebKit/Source/core/workers/ParentFrameTaskRunners.cpp
[modify] https://crrev.com/107dd69cd0f07713fc1b38d5449c041d39291f44/third_party/WebKit/Source/core/workers/ParentFrameTaskRunners.h
[modify] https://crrev.com/107dd69cd0f07713fc1b38d5449c041d39291f44/third_party/WebKit/Source/modules/websockets/WorkerWebSocketChannel.cpp
[modify] https://crrev.com/107dd69cd0f07713fc1b38d5449c041d39291f44/third_party/WebKit/public/BUILD.gn
[add] https://crrev.com/107dd69cd0f07713fc1b38d5449c041d39291f44/third_party/WebKit/public/platform/TaskType.h

Project Member

Comment 5 by bugdroid1@chromium.org, Sep 12 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/df3b7f1038fd9d4510499ce28fc4ff16f7c23d33

commit df3b7f1038fd9d4510499ce28fc4ff16f7c23d33
Author: Alexander Timin <altimin@chromium.org>
Date: Tue Sep 12 13:37:00 2017

[blink] Do not use raw pointers with SingleThreadTaskRunner in Blink.

In a small number of places Blink uses SingleThreadTaskRunners to work
around blink/content boundary. The common practice was to
forward-declare SingleThreadTaskRunner class and pass it as a raw
pointer.

This practice worked given that there were few SingleThreadTaskRunners
and many places holding references to them. But this is changing now —
for the attribution purposes SingleThreadTaskRunners will become
lightweight wrappers containing metadata and are going to be created
on demand, so each consumer probably will hold to its own unique copy
of STTR. That means that raw pointers should not be used and STTR should
be passed around using refptrs.

Given that scoped_refptrs are banned in Blink and the ban should not be lifted,
public/platform/scheduler/ now contains an alias (SingleThreadTaskRunnerRefPtr)
which should be used when STTR is passed around in Blink.

R=haraken@chromium.org,kinuko@chromium.org,jochen@chromium.org
CC=hajimehoshi@chromium.org,japhet@chromium.org
BUG= 762453 

Change-Id: I34e0b243b774c62a643bc7fd48d0f3938715101e
Reviewed-on: https://chromium-review.googlesource.com/654904
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Commit-Queue: Alexander Timin <altimin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#501252}
[modify] https://crrev.com/df3b7f1038fd9d4510499ce28fc4ff16f7c23d33/components/plugins/renderer/webview_plugin.cc
[modify] https://crrev.com/df3b7f1038fd9d4510499ce28fc4ff16f7c23d33/components/plugins/renderer/webview_plugin.h
[modify] https://crrev.com/df3b7f1038fd9d4510499ce28fc4ff16f7c23d33/components/printing/renderer/print_render_frame_helper.cc
[modify] https://crrev.com/df3b7f1038fd9d4510499ce28fc4ff16f7c23d33/content/child/service_worker/service_worker_network_provider.cc
[modify] https://crrev.com/df3b7f1038fd9d4510499ce28fc4ff16f7c23d33/content/ppapi_plugin/ppapi_blink_platform_impl.cc
[modify] https://crrev.com/df3b7f1038fd9d4510499ce28fc4ff16f7c23d33/content/ppapi_plugin/ppapi_blink_platform_impl.h
[modify] https://crrev.com/df3b7f1038fd9d4510499ce28fc4ff16f7c23d33/content/public/renderer/render_frame.h
[modify] https://crrev.com/df3b7f1038fd9d4510499ce28fc4ff16f7c23d33/content/renderer/fetchers/resource_fetcher_impl.cc
[modify] https://crrev.com/df3b7f1038fd9d4510499ce28fc4ff16f7c23d33/content/renderer/render_frame_impl.cc
[modify] https://crrev.com/df3b7f1038fd9d4510499ce28fc4ff16f7c23d33/content/renderer/render_frame_impl.h
[modify] https://crrev.com/df3b7f1038fd9d4510499ce28fc4ff16f7c23d33/content/renderer/renderer_blink_platform_impl.cc
[modify] https://crrev.com/df3b7f1038fd9d4510499ce28fc4ff16f7c23d33/content/renderer/renderer_blink_platform_impl.h
[modify] https://crrev.com/df3b7f1038fd9d4510499ce28fc4ff16f7c23d33/content/renderer/service_worker/service_worker_context_client.cc
[modify] https://crrev.com/df3b7f1038fd9d4510499ce28fc4ff16f7c23d33/content/renderer/service_worker/service_worker_fetch_context_impl.cc
[modify] https://crrev.com/df3b7f1038fd9d4510499ce28fc4ff16f7c23d33/content/renderer/service_worker/service_worker_fetch_context_impl.h
[modify] https://crrev.com/df3b7f1038fd9d4510499ce28fc4ff16f7c23d33/content/renderer/service_worker/worker_fetch_context_impl.cc
[modify] https://crrev.com/df3b7f1038fd9d4510499ce28fc4ff16f7c23d33/content/renderer/service_worker/worker_fetch_context_impl.h
[modify] https://crrev.com/df3b7f1038fd9d4510499ce28fc4ff16f7c23d33/content/test/test_blink_web_unit_test_support.cc
[modify] https://crrev.com/df3b7f1038fd9d4510499ce28fc4ff16f7c23d33/content/test/test_blink_web_unit_test_support.h
[modify] https://crrev.com/df3b7f1038fd9d4510499ce28fc4ff16f7c23d33/content/test/test_render_frame.cc
[modify] https://crrev.com/df3b7f1038fd9d4510499ce28fc4ff16f7c23d33/content/test/test_render_frame.h
[modify] https://crrev.com/df3b7f1038fd9d4510499ce28fc4ff16f7c23d33/third_party/WebKit/Source/core/exported/WorkerShadowPage.cpp
[modify] https://crrev.com/df3b7f1038fd9d4510499ce28fc4ff16f7c23d33/third_party/WebKit/Source/core/exported/WorkerShadowPage.h
[modify] https://crrev.com/df3b7f1038fd9d4510499ce28fc4ff16f7c23d33/third_party/WebKit/Source/core/frame/FrameTestHelpers.h
[modify] https://crrev.com/df3b7f1038fd9d4510499ce28fc4ff16f7c23d33/third_party/WebKit/Source/core/frame/WebLocalFrameImpl.cpp
[modify] https://crrev.com/df3b7f1038fd9d4510499ce28fc4ff16f7c23d33/third_party/WebKit/Source/core/frame/WebLocalFrameImpl.h
[modify] https://crrev.com/df3b7f1038fd9d4510499ce28fc4ff16f7c23d33/third_party/WebKit/Source/platform/WebTaskRunner.h
[modify] https://crrev.com/df3b7f1038fd9d4510499ce28fc4ff16f7c23d33/third_party/WebKit/Source/platform/WebThread.cpp
[modify] https://crrev.com/df3b7f1038fd9d4510499ce28fc4ff16f7c23d33/third_party/WebKit/Source/platform/exported/Platform.cpp
[modify] https://crrev.com/df3b7f1038fd9d4510499ce28fc4ff16f7c23d33/third_party/WebKit/Source/platform/loader/testing/FetchTestingPlatformSupport.cpp
[modify] https://crrev.com/df3b7f1038fd9d4510499ce28fc4ff16f7c23d33/third_party/WebKit/Source/platform/loader/testing/FetchTestingPlatformSupport.h
[modify] https://crrev.com/df3b7f1038fd9d4510499ce28fc4ff16f7c23d33/third_party/WebKit/Source/platform/scheduler/child/web_task_runner_impl.cc
[modify] https://crrev.com/df3b7f1038fd9d4510499ce28fc4ff16f7c23d33/third_party/WebKit/Source/platform/scheduler/child/web_task_runner_impl.h
[modify] https://crrev.com/df3b7f1038fd9d4510499ce28fc4ff16f7c23d33/third_party/WebKit/Source/platform/scheduler/child/webthread_impl_for_worker_scheduler.cc
[modify] https://crrev.com/df3b7f1038fd9d4510499ce28fc4ff16f7c23d33/third_party/WebKit/Source/platform/scheduler/child/webthread_impl_for_worker_scheduler.h
[modify] https://crrev.com/df3b7f1038fd9d4510499ce28fc4ff16f7c23d33/third_party/WebKit/Source/platform/scheduler/renderer/webthread_impl_for_renderer_scheduler.cc
[modify] https://crrev.com/df3b7f1038fd9d4510499ce28fc4ff16f7c23d33/third_party/WebKit/Source/platform/scheduler/renderer/webthread_impl_for_renderer_scheduler.h
[modify] https://crrev.com/df3b7f1038fd9d4510499ce28fc4ff16f7c23d33/third_party/WebKit/Source/platform/scheduler/test/fake_web_task_runner.cc
[modify] https://crrev.com/df3b7f1038fd9d4510499ce28fc4ff16f7c23d33/third_party/WebKit/Source/platform/scheduler/test/fake_web_task_runner.h
[modify] https://crrev.com/df3b7f1038fd9d4510499ce28fc4ff16f7c23d33/third_party/WebKit/Source/platform/scheduler/utility/webthread_impl_for_utility_thread.cc
[modify] https://crrev.com/df3b7f1038fd9d4510499ce28fc4ff16f7c23d33/third_party/WebKit/Source/platform/scheduler/utility/webthread_impl_for_utility_thread.h
[modify] https://crrev.com/df3b7f1038fd9d4510499ce28fc4ff16f7c23d33/third_party/WebKit/Source/platform/testing/TestingPlatformSupport.cpp
[modify] https://crrev.com/df3b7f1038fd9d4510499ce28fc4ff16f7c23d33/third_party/WebKit/Source/platform/testing/TestingPlatformSupport.h
[modify] https://crrev.com/df3b7f1038fd9d4510499ce28fc4ff16f7c23d33/third_party/WebKit/public/platform/Platform.h
[modify] https://crrev.com/df3b7f1038fd9d4510499ce28fc4ff16f7c23d33/third_party/WebKit/public/platform/WebThread.h
[modify] https://crrev.com/df3b7f1038fd9d4510499ce28fc4ff16f7c23d33/third_party/WebKit/public/platform/WebWorkerFetchContext.h
[modify] https://crrev.com/df3b7f1038fd9d4510499ce28fc4ff16f7c23d33/third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerNetworkProvider.h
[modify] https://crrev.com/df3b7f1038fd9d4510499ce28fc4ff16f7c23d33/third_party/WebKit/public/platform/scheduler/child/webthread_base.h
[add] https://crrev.com/df3b7f1038fd9d4510499ce28fc4ff16f7c23d33/third_party/WebKit/public/platform/scheduler/single_thread_task_runner.h
[modify] https://crrev.com/df3b7f1038fd9d4510499ce28fc4ff16f7c23d33/third_party/WebKit/public/web/WebFrameClient.h
[modify] https://crrev.com/df3b7f1038fd9d4510499ce28fc4ff16f7c23d33/third_party/WebKit/public/web/WebLocalFrame.h

Project Member

Comment 6 by bugdroid1@chromium.org, Oct 6 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ccf7cad524e8e164bed6681f9fc61f3dd1b59926

commit ccf7cad524e8e164bed6681f9fc61f3dd1b59926
Author: Hajime Hoshi <hajimehoshi@chromium.org>
Date: Fri Oct 06 08:14:31 2017

scheduler: Move implementation of WebTaskRunner to WebTaskRunnerImpl

This CL moves the implementations of WebTaskRunner to
WebTaskRunnerImpl. This allows the implementation to use TaskQueue
directly instead of SingleThreadTaskRunner.

This CL also introduces TaskQueue::PostTaskWithMetadata, which is
preparation to add task type attributions to functions to post tasks in
the future.

This is a part of adding-task-type work (https://docs.google.com/document/d/1Py2ZdjpaCMdpVtKfdHMITAn5gst_owjQiqlbPm3mCxc/edit?ts=59d49142#)

Bug:  762453 
Change-Id: I41d7ebe4ed9878b94fb5a61b381b053194597232
Reviewed-on: https://chromium-review.googlesource.com/702198
Commit-Queue: Hajime Hoshi <hajimehoshi@chromium.org>
Reviewed-by: Alexander Timin <altimin@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#507006}
[modify] https://crrev.com/ccf7cad524e8e164bed6681f9fc61f3dd1b59926/third_party/WebKit/Source/platform/WebTaskRunner.cpp
[modify] https://crrev.com/ccf7cad524e8e164bed6681f9fc61f3dd1b59926/third_party/WebKit/Source/platform/WebTaskRunner.h
[modify] https://crrev.com/ccf7cad524e8e164bed6681f9fc61f3dd1b59926/third_party/WebKit/Source/platform/scheduler/base/task_queue.cc
[modify] https://crrev.com/ccf7cad524e8e164bed6681f9fc61f3dd1b59926/third_party/WebKit/Source/platform/scheduler/base/task_queue.h
[modify] https://crrev.com/ccf7cad524e8e164bed6681f9fc61f3dd1b59926/third_party/WebKit/Source/platform/scheduler/child/web_task_runner_impl.cc
[modify] https://crrev.com/ccf7cad524e8e164bed6681f9fc61f3dd1b59926/third_party/WebKit/Source/platform/scheduler/child/web_task_runner_impl.h
[modify] https://crrev.com/ccf7cad524e8e164bed6681f9fc61f3dd1b59926/third_party/WebKit/Source/platform/scheduler/test/fake_web_task_runner.cc
[modify] https://crrev.com/ccf7cad524e8e164bed6681f9fc61f3dd1b59926/third_party/WebKit/Source/platform/scheduler/test/fake_web_task_runner.h

Project Member

Comment 7 by bugdroid1@chromium.org, Oct 11 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/64853efbe61349fa76a5403ff9fb448638ffb585

commit 64853efbe61349fa76a5403ff9fb448638ffb585
Author: Hajime Hoshi <hajimehoshi@chromium.org>
Date: Wed Oct 11 12:56:07 2017

scheduler: Add enum base::Nestable

This CL introduces a new enum base::Nestable to replace current boolean
values for code health.

Bug:  762453 
Change-Id: Ieffcc3fa95337cacefcd390ad3ed90d5d0f4077e
Reviewed-on: https://chromium-review.googlesource.com/701909
Commit-Queue: Hajime Hoshi <hajimehoshi@chromium.org>
Reviewed-by: Alexander Timin <altimin@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#507961}
[modify] https://crrev.com/64853efbe61349fa76a5403ff9fb448638ffb585/base/message_loop/incoming_task_queue.cc
[modify] https://crrev.com/64853efbe61349fa76a5403ff9fb448638ffb585/base/message_loop/incoming_task_queue.h
[modify] https://crrev.com/64853efbe61349fa76a5403ff9fb448638ffb585/base/message_loop/message_loop.cc
[modify] https://crrev.com/64853efbe61349fa76a5403ff9fb448638ffb585/base/message_loop/message_loop_task_runner.cc
[modify] https://crrev.com/64853efbe61349fa76a5403ff9fb448638ffb585/base/message_loop/message_pump_perftest.cc
[modify] https://crrev.com/64853efbe61349fa76a5403ff9fb448638ffb585/base/pending_task.cc
[modify] https://crrev.com/64853efbe61349fa76a5403ff9fb448638ffb585/base/pending_task.h
[modify] https://crrev.com/64853efbe61349fa76a5403ff9fb448638ffb585/base/task_scheduler/task.cc
[modify] https://crrev.com/64853efbe61349fa76a5403ff9fb448638ffb585/components/timers/alarm_timer_chromeos.cc
[modify] https://crrev.com/64853efbe61349fa76a5403ff9fb448638ffb585/third_party/WebKit/Source/platform/scheduler/base/task_queue.cc
[modify] https://crrev.com/64853efbe61349fa76a5403ff9fb448638ffb585/third_party/WebKit/Source/platform/scheduler/base/task_queue.h
[modify] https://crrev.com/64853efbe61349fa76a5403ff9fb448638ffb585/third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.cc
[modify] https://crrev.com/64853efbe61349fa76a5403ff9fb448638ffb585/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.cc
[modify] https://crrev.com/64853efbe61349fa76a5403ff9fb448638ffb585/third_party/WebKit/Source/platform/scheduler/base/task_queue_selector_unittest.cc
[modify] https://crrev.com/64853efbe61349fa76a5403ff9fb448638ffb585/third_party/WebKit/Source/platform/scheduler/base/work_queue_sets_unittest.cc
[modify] https://crrev.com/64853efbe61349fa76a5403ff9fb448638ffb585/third_party/WebKit/Source/platform/scheduler/base/work_queue_unittest.cc
[modify] https://crrev.com/64853efbe61349fa76a5403ff9fb448638ffb585/third_party/WebKit/Source/platform/scheduler/child/web_task_runner_impl.cc
[modify] https://crrev.com/64853efbe61349fa76a5403ff9fb448638ffb585/third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl_unittest.cc

Project Member

Comment 8 by bugdroid1@chromium.org, Oct 18 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8e3d84890376b25f8e3d3bf348a0211a9e7dfb12

commit 8e3d84890376b25f8e3d3bf348a0211a9e7dfb12
Author: Hajime Hoshi <hajimehoshi@chromium.org>
Date: Wed Oct 18 06:19:46 2017

Replace WebTaskRunner* with RefPtr<WebTaskRunner>

This CL is a preparation for the change that WebTaskRunnerImpl will
always be created for each call of WebFrameSchedulerImpl::
*TaskRunner(). This CL replaces WebTaskRunner* with
RefPtr<WebTaskRunner>.

This is part of the big CL for changing WebFrameSchedulerImpl::
*TaskRunner() to create WebTaskRunnerImpl anytime:
https://chromium-review.googlesource.com/c/chromium/src/+/704459

Bug:  762453 
Change-Id: Iad2b4ae62bbc73d5c20a90c79c2a1fc947bbd3cc
Reviewed-on: https://chromium-review.googlesource.com/722861
Commit-Queue: Hajime Hoshi <hajimehoshi@chromium.org>
Reviewed-by: Alexander Timin <altimin@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Takeshi Yoshino <tyoshino@chromium.org>
Cr-Commit-Position: refs/heads/master@{#509701}
[modify] https://crrev.com/8e3d84890376b25f8e3d3bf348a0211a9e7dfb12/third_party/WebKit/Source/core/clipboard/ClipboardPromise.cpp
[modify] https://crrev.com/8e3d84890376b25f8e3d3bf348a0211a9e7dfb12/third_party/WebKit/Source/core/clipboard/ClipboardPromise.h
[modify] https://crrev.com/8e3d84890376b25f8e3d3bf348a0211a9e7dfb12/third_party/WebKit/Source/core/exported/LocalFrameClientImpl.cpp
[modify] https://crrev.com/8e3d84890376b25f8e3d3bf348a0211a9e7dfb12/third_party/WebKit/Source/core/exported/LocalFrameClientImpl.h
[modify] https://crrev.com/8e3d84890376b25f8e3d3bf348a0211a9e7dfb12/third_party/WebKit/Source/core/frame/LocalFrame.cpp
[modify] https://crrev.com/8e3d84890376b25f8e3d3bf348a0211a9e7dfb12/third_party/WebKit/Source/core/frame/LocalFrame.h
[modify] https://crrev.com/8e3d84890376b25f8e3d3bf348a0211a9e7dfb12/third_party/WebKit/Source/core/frame/LocalFrameClient.h
[modify] https://crrev.com/8e3d84890376b25f8e3d3bf348a0211a9e7dfb12/third_party/WebKit/Source/core/loader/EmptyClients.h
[modify] https://crrev.com/8e3d84890376b25f8e3d3bf348a0211a9e7dfb12/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
[modify] https://crrev.com/8e3d84890376b25f8e3d3bf348a0211a9e7dfb12/third_party/WebKit/Source/core/loader/FrameFetchContext.h
[modify] https://crrev.com/8e3d84890376b25f8e3d3bf348a0211a9e7dfb12/third_party/WebKit/Source/core/loader/WorkerFetchContext.cpp
[modify] https://crrev.com/8e3d84890376b25f8e3d3bf348a0211a9e7dfb12/third_party/WebKit/Source/core/loader/WorkerFetchContext.h
[modify] https://crrev.com/8e3d84890376b25f8e3d3bf348a0211a9e7dfb12/third_party/WebKit/Source/platform/loader/fetch/FetchContext.h
[modify] https://crrev.com/8e3d84890376b25f8e3d3bf348a0211a9e7dfb12/third_party/WebKit/Source/platform/loader/fetch/ResourceLoader.cpp
[modify] https://crrev.com/8e3d84890376b25f8e3d3bf348a0211a9e7dfb12/third_party/WebKit/Source/platform/loader/testing/MockFetchContext.h

Project Member

Comment 9 by bugdroid1@chromium.org, Oct 19 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/65056ef25ff531d401b5c4811ef45c117db6b0a2

commit 65056ef25ff531d401b5c4811ef45c117db6b0a2
Author: Hajime Hoshi <hajimehoshi@chromium.org>
Date: Thu Oct 19 06:29:10 2017

RAII way for handling observers of NetworkStateNotifier

This CL changes how to manage observers of NetworkStateNotifier to use
handles in RAII way. Before this CL, we depended on the fact that
WebTaskRunner objects returned from TaskRunnerHelper::Get were always
same for the same execution context. Now we are trying to change the
fact and WebTaskRunnerImpl will always be created for each call.

This is part of the big CL for changing WebFrameSchedulerImpl::
*TaskRunner() to create WebTaskRunnerImpl anytime:
https://chromium-review.googlesource.com/c/chromium/src/+/704459

Bug:  762453 
Change-Id: I5308e7cb0493d84c25e4da7f3562cd0fcff0f3af
Reviewed-on: https://chromium-review.googlesource.com/722859
Commit-Queue: Hajime Hoshi <hajimehoshi@chromium.org>
Reviewed-by: Josh Karlin <jkarlin@chromium.org>
Reviewed-by: Alexander Timin <altimin@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#510012}
[modify] https://crrev.com/65056ef25ff531d401b5c4811ef45c117db6b0a2/third_party/WebKit/Source/core/dom/Document.cpp
[modify] https://crrev.com/65056ef25ff531d401b5c4811ef45c117db6b0a2/third_party/WebKit/Source/modules/netinfo/NetworkInformation.cpp
[modify] https://crrev.com/65056ef25ff531d401b5c4811ef45c117db6b0a2/third_party/WebKit/Source/modules/netinfo/NetworkInformation.h
[modify] https://crrev.com/65056ef25ff531d401b5c4811ef45c117db6b0a2/third_party/WebKit/Source/platform/network/NetworkStateNotifier.cpp
[modify] https://crrev.com/65056ef25ff531d401b5c4811ef45c117db6b0a2/third_party/WebKit/Source/platform/network/NetworkStateNotifier.h
[modify] https://crrev.com/65056ef25ff531d401b5c4811ef45c117db6b0a2/third_party/WebKit/Source/platform/network/NetworkStateNotifierTest.cpp

Project Member

Comment 10 by bugdroid1@chromium.org, Oct 19 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/785e4a9105450c2ec7d1bb38c6de4d087271a4cc

commit 785e4a9105450c2ec7d1bb38c6de4d087271a4cc
Author: Hajime Hoshi <hajimehoshi@chromium.org>
Date: Thu Oct 19 12:49:28 2017

scheduler: Create WebTaskRunnerImpl anytime at WebFrameSchedulerImpl::*TaskRunner()

This CL changes WebFrameSchedulerImpl::*TaskRunner() to create
WebTaskRunnerImpl objects anytime so that the relationship between
WebTaskRunnerImpl and TaskQueue will be n:1. This is a preparation to
make WebFrameSchedulerImpl's task runner getters accept task type and
store it inside WebTaskRunnerImpl.

This is part of the big CL that includes all the necessary changes:
https://chromium-review.googlesource.com/c/chromium/src/+/704459

This is a part of adding-task-type work (https://docs.google.com/document/d/1Py2ZdjpaCMdpVtKfdHMITAn5gst_owjQiqlbPm3mCxc/edit?ts=59d49142#)

Bug:  762453 
Change-Id: Iae1263717990ea959a2ed62ba86c63ef593be600
Reviewed-on: https://chromium-review.googlesource.com/727420
Reviewed-by: Alexander Timin <altimin@chromium.org>
Commit-Queue: Hajime Hoshi <hajimehoshi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#510064}
[modify] https://crrev.com/785e4a9105450c2ec7d1bb38c6de4d087271a4cc/third_party/WebKit/Source/platform/scheduler/renderer/web_frame_scheduler_impl.cc
[modify] https://crrev.com/785e4a9105450c2ec7d1bb38c6de4d087271a4cc/third_party/WebKit/Source/platform/scheduler/renderer/web_frame_scheduler_impl.h

Project Member

Comment 11 by bugdroid1@chromium.org, Oct 20 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/17d9831dcb64ea84379aeb27a77540b14a9f12a9

commit 17d9831dcb64ea84379aeb27a77540b14a9f12a9
Author: Hajime Hoshi <hajimehoshi@chromium.org>
Date: Fri Oct 20 07:06:13 2017

scheduler: Refactoring: Add WorkerGlobalScopeScheduler::GetTaskRunner

This CL moves the implementation of TaskRunnerHelper::Get to
WorkerGlobalScopeScheduler::GetTaskRunner so that selecting a task
runner with task type can be done inside schedulers.

This is a part of adding-task-type work (https://docs.google.com/document/d/1Py2ZdjpaCMdpVtKfdHMITAn5gst_owjQiqlbPm3mCxc/edit?ts=59d49142#)

Bug:  762453 
Change-Id: Ie626824632cfe716119c7c1c2bf1151eec951d5b
Reviewed-on: https://chromium-review.googlesource.com/727827
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Alexander Timin <altimin@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Hajime Hoshi <hajimehoshi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#510365}
[modify] https://crrev.com/17d9831dcb64ea84379aeb27a77540b14a9f12a9/third_party/WebKit/Source/core/dom/TaskRunnerHelper.cpp
[modify] https://crrev.com/17d9831dcb64ea84379aeb27a77540b14a9f12a9/third_party/WebKit/Source/platform/scheduler/child/worker_global_scope_scheduler.cc
[modify] https://crrev.com/17d9831dcb64ea84379aeb27a77540b14a9f12a9/third_party/WebKit/Source/platform/scheduler/child/worker_global_scope_scheduler.h
[modify] https://crrev.com/17d9831dcb64ea84379aeb27a77540b14a9f12a9/third_party/WebKit/Source/platform/scheduler/child/worker_global_scope_scheduler_unittest.cc

Project Member

Comment 12 by bugdroid1@chromium.org, Oct 20 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/cda3db87025354e791510e203c17d2b19586d141

commit cda3db87025354e791510e203c17d2b19586d141
Author: Hajime Hoshi <hajimehoshi@chromium.org>
Date: Fri Oct 20 07:33:53 2017

scheduler: Refactoring: Add WebFrameScheduler::GetTaskRunner

This CL moves the implemenration of TaskRunnerHelper::Get to
WebFrameScheduler::GetTaskRunner so that selecting a task runner with
task type can be done inside schedulers.

This is a part of adding-task-type work (https://docs.google.com/document/d/1Py2ZdjpaCMdpVtKfdHMITAn5gst_owjQiqlbPm3mCxc/edit?ts=59d49142#)

Bug:  762453 
Change-Id: I7e4137eabd87ff152b488410d199e4e050208064
Reviewed-on: https://chromium-review.googlesource.com/727862
Commit-Queue: Hajime Hoshi <hajimehoshi@chromium.org>
Reviewed-by: Alexander Timin <altimin@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#510367}
[modify] https://crrev.com/cda3db87025354e791510e203c17d2b19586d141/third_party/WebKit/Source/core/dom/TaskRunnerHelper.cpp
[modify] https://crrev.com/cda3db87025354e791510e203c17d2b19586d141/third_party/WebKit/Source/core/loader/EmptyClients.cpp
[modify] https://crrev.com/cda3db87025354e791510e203c17d2b19586d141/third_party/WebKit/Source/core/loader/NavigationScheduler.cpp
[modify] https://crrev.com/cda3db87025354e791510e203c17d2b19586d141/third_party/WebKit/Source/platform/WebFrameScheduler.h
[modify] https://crrev.com/cda3db87025354e791510e203c17d2b19586d141/third_party/WebKit/Source/platform/loader/testing/MockFetchContext.h
[modify] https://crrev.com/cda3db87025354e791510e203c17d2b19586d141/third_party/WebKit/Source/platform/scheduler/renderer/web_frame_scheduler_impl.cc
[modify] https://crrev.com/cda3db87025354e791510e203c17d2b19586d141/third_party/WebKit/Source/platform/scheduler/renderer/web_frame_scheduler_impl.h
[modify] https://crrev.com/cda3db87025354e791510e203c17d2b19586d141/third_party/WebKit/Source/platform/scheduler/test/fake_web_frame_scheduler.h

Project Member

Comment 13 by bugdroid1@chromium.org, Oct 24 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/287beb836493392d8197c3c15e9c306cd5148cee

commit 287beb836493392d8197c3c15e9c306cd5148cee
Author: Hajime Hoshi <hajimehoshi@chromium.org>
Date: Tue Oct 24 09:08:27 2017

scheduler: Remove TaskQueueImpl::Task::Task()

Bug:  762453 
Change-Id: I14f022eafede30e92ff6641d4bc7df12c7e4d78b
Reviewed-on: https://chromium-review.googlesource.com/730803
Reviewed-by: Alexander Timin <altimin@chromium.org>
Commit-Queue: Hajime Hoshi <hajimehoshi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#511064}
[modify] https://crrev.com/287beb836493392d8197c3c15e9c306cd5148cee/third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.cc
[modify] https://crrev.com/287beb836493392d8197c3c15e9c306cd5148cee/third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.h

Project Member

Comment 14 by bugdroid1@chromium.org, Oct 26 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2cf7ced182964ddff6ee4e3d8ede4db04e055f03

commit 2cf7ced182964ddff6ee4e3d8ede4db04e055f03
Author: Hajime Hoshi <hajimehoshi@chromium.org>
Date: Thu Oct 26 07:06:10 2017

scheduler: Make WorkerGlobalScopeScheduler::GetTaskRunner create WebTaskRunnerImpl anytime

This CL basically does the same thing as https://chromium-review.googlesource.com/c/chromium/src/+/727420.
This CL makes WorkerGlobalScopeScheduler::GetTaskRunner create
WebTaskRunnerImpl anytime so that WebTaskRunner can know the task type.

This is a part of adding-task-type work (https://docs.google.com/document/d/1Py2ZdjpaCMdpVtKfdHMITAn5gst_owjQiqlbPm3mCxc/edit?ts=59d49142#)

Bug:  762453 
Change-Id: Ic497c0cded3a4779546be8547661abcc25a978e0
Reviewed-on: https://chromium-review.googlesource.com/737750
Reviewed-by: Alexander Timin <altimin@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Commit-Queue: Hajime Hoshi <hajimehoshi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#511755}
[modify] https://crrev.com/2cf7ced182964ddff6ee4e3d8ede4db04e055f03/third_party/WebKit/Source/platform/scheduler/child/worker_global_scope_scheduler.cc
[modify] https://crrev.com/2cf7ced182964ddff6ee4e3d8ede4db04e055f03/third_party/WebKit/Source/platform/scheduler/child/worker_global_scope_scheduler.h
[modify] https://crrev.com/2cf7ced182964ddff6ee4e3d8ede4db04e055f03/third_party/WebKit/Source/platform/scheduler/child/worker_global_scope_scheduler_unittest.cc

Project Member

Comment 15 by bugdroid1@chromium.org, Oct 26 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e0c5e2aa906d6b390db4f60c3996492830abdf29

commit e0c5e2aa906d6b390db4f60c3996492830abdf29
Author: Hajime Hoshi <hajimehoshi@chromium.org>
Date: Thu Oct 26 07:52:15 2017

scheduler: Add TaskType to TaskQueue::Task and TaskQueue::PostedTask

This CL adds TaskType to TaskQueue::Task and TaskQueue::PostedTask so
that tasks have information where they come and will be helpful to
analyize e.g. which type of tasks are time consumer.

This is a part of adding-task-type work (https://docs.google.com/document/d/1Py2ZdjpaCMdpVtKfdHMITAn5gst_owjQiqlbPm3mCxc/edit?ts=59d49142#)

Bug:  762453 
Change-Id: I8a2a80d9da5245d71226a43fca632ac5c9b2401c
Reviewed-on: https://chromium-review.googlesource.com/735113
Commit-Queue: Hajime Hoshi <hajimehoshi@chromium.org>
Reviewed-by: Alexander Timin <altimin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#511762}
[modify] https://crrev.com/e0c5e2aa906d6b390db4f60c3996492830abdf29/third_party/WebKit/Source/platform/scheduler/base/task_queue.cc
[modify] https://crrev.com/e0c5e2aa906d6b390db4f60c3996492830abdf29/third_party/WebKit/Source/platform/scheduler/base/task_queue.h
[modify] https://crrev.com/e0c5e2aa906d6b390db4f60c3996492830abdf29/third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.cc
[modify] https://crrev.com/e0c5e2aa906d6b390db4f60c3996492830abdf29/third_party/WebKit/Source/platform/scheduler/child/web_task_runner_impl.cc

Project Member

Comment 16 by bugdroid1@chromium.org, Oct 31 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b0c35bee181463be72bf27e4784c37374a8beae8

commit b0c35bee181463be72bf27e4784c37374a8beae8
Author: Hajime Hoshi <hajimehoshi@chromium.org>
Date: Tue Oct 31 13:26:57 2017

scheduler: Keep TaskType in WebTaskRunnerImpl and use it when posting

This CL adds TaskType to WebTaskRunnerImpl so that tasks have information
where they come and will be helpful to analyize e.g. which type of tasks
are time consumer.

This is a part of adding-task-type work (https://docs.google.com/document/d/1Py2ZdjpaCMdpVtKfdHMITAn5gst_owjQiqlbPm3mCxc/edit?ts=59d49142#)

Bug:  762453 
Change-Id: Ic709475469ea54f9f832423b5dfa0f203c975fd3
Reviewed-on: https://chromium-review.googlesource.com/738158
Reviewed-by: Alexander Timin <altimin@chromium.org>
Commit-Queue: Hajime Hoshi <hajimehoshi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#512808}
[modify] https://crrev.com/b0c35bee181463be72bf27e4784c37374a8beae8/third_party/WebKit/Source/platform/scheduler/child/web_task_runner_impl.cc
[modify] https://crrev.com/b0c35bee181463be72bf27e4784c37374a8beae8/third_party/WebKit/Source/platform/scheduler/child/web_task_runner_impl.h
[modify] https://crrev.com/b0c35bee181463be72bf27e4784c37374a8beae8/third_party/WebKit/Source/platform/scheduler/child/worker_global_scope_scheduler.cc
[modify] https://crrev.com/b0c35bee181463be72bf27e4784c37374a8beae8/third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl_unittest.cc
[modify] https://crrev.com/b0c35bee181463be72bf27e4784c37374a8beae8/third_party/WebKit/Source/platform/scheduler/renderer/web_frame_scheduler_impl.cc
[modify] https://crrev.com/b0c35bee181463be72bf27e4784c37374a8beae8/third_party/WebKit/Source/platform/scheduler/renderer/web_frame_scheduler_impl.h
[modify] https://crrev.com/b0c35bee181463be72bf27e4784c37374a8beae8/third_party/WebKit/Source/platform/scheduler/renderer/web_frame_scheduler_impl_unittest.cc
[modify] https://crrev.com/b0c35bee181463be72bf27e4784c37374a8beae8/third_party/WebKit/Source/platform/scheduler/renderer/web_view_scheduler_impl_unittest.cc

Owner: hajimehoshi@chromium.org
Status: Started (was: Available)
+altimin, is this finished?
Status: Fixed (was: Started)

Sign in to add a comment