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

Issue 2550373005: Make WebTaskRunner ThreadSafeRefCounted (Closed)

Created:
4 years ago by tzik
Modified:
3 years, 11 months ago
CC:
chromium-reviews, blink-reviews-platform-graphics_chromium.org, dshwang, eae+blinkwatch, dcheng, piman+watch_chromium.org, kinuko+worker_chromium.org, kinuko+watch, rwlbuis, Yoav Weiss, krit, drott+blinkwatch_chromium.org, blink-reviews-html_chromium.org, Justin Novosad, blink-reviews-dom_chromium.org, dglazkov+blink, Rik, blink-reviews-bindings_chromium.org, gavinp+loader_chromium.org, blink-reviews-paint_chromium.org, blink-reviews, falken+watch_chromium.org, ajuma+watch_chromium.org, blink-reviews-api_chromium.org, blink-worker-reviews_chromium.org, Mads Ager (chromium), sof, jbroman, loading-reviews_chromium.org, pdr+graphicswatchlist_chromium.org, haraken, loading-reviews+fetch_chromium.org, Nate Chapin, Stephen Chennney, tyoshino+watch_chromium.org, mlamouri+watch-blink_chromium.org, kouhei+heap_chromium.org, loading-reviews+parser_chromium.org, shimazu+worker_chromium.org, f(malita), oilpan-reviews, horo+watch_chromium.org, danakj+watch_chromium.org, scheduler-bugs_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make WebTaskRunner ThreadSafeRefCounted This CL makes WebTaskRunner ThreadSafeRefCounted, and update all user to use RefPtr<WebTaskRunner> instead of raw pointers or std::unique_ptr. In public/platform, WebTaskRunner is passed as a raw pointer to avoid using WTF there. CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Review-Url: https://codereview.chromium.org/2550373005 Cr-Commit-Position: refs/heads/master@{#442791} Committed: https://chromium.googlesource.com/chromium/src/+/4dbdb0dd364c7ac324c731004d1ccc69e3bdf2e2

Patch Set 1 #

Patch Set 2 : rebase #

Patch Set 3 : . #

Patch Set 4 : . #

Patch Set 5 : rebase #

Patch Set 6 : fix #

Total comments: 4

Patch Set 7 : mac fix #

Total comments: 2

Patch Set 8 : . #

Patch Set 9 : . #

Patch Set 10 : rebase #

Patch Set 11 : rebase on http://crrev.com/2623833002 #

Patch Set 12 : rebase #

Patch Set 13 : +DISALLOW_COPY_AND_ASSIGN for win build fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+286 lines, -272 lines) Patch
M third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.h View 1 2 4 chunks +6 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.cpp View 1 2 3 4 5 6 7 8 9 7 chunks +15 lines, -13 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/ScriptStreamerTest.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/dom/Document.cpp View 1 2 3 4 5 6 7 8 9 2 chunks +3 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/core/dom/ScriptRunner.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/dom/ScriptRunner.cpp View 1 2 3 4 5 1 chunk +1 line, -2 lines 0 comments Download
M third_party/WebKit/Source/core/dom/TaskRunnerHelper.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/dom/TaskRunnerHelper.cpp View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +7 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/FetchContext.h View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/fetch/MockFetchContext.h View 1 2 3 4 5 6 7 2 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/ResourceLoader.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/frame/DOMTimer.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/frame/DOMTimer.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/frame/DOMTimerCoordinator.h View 1 2 3 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/frame/DOMTimerCoordinator.cpp View 2 chunks +2 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/html/parser/BackgroundHTMLParser.h View 3 chunks +3 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/html/parser/BackgroundHTMLParser.cpp View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.h View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp View 1 2 3 4 5 6 7 8 9 2 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/html/parser/HTMLParserScheduler.h View 1 2 2 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/html/parser/HTMLParserScheduler.cpp View 1 chunk +4 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/imagebitmap/ImageBitmapFactories.h View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/imagebitmap/ImageBitmapFactories.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ImageQualityControllerTest.cpp View 1 2 3 4 5 6 7 2 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/loader/EmptyClients.cpp View 1 2 3 4 5 6 7 1 chunk +6 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/core/loader/FrameFetchContext.h View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/loader/FrameFetchContext.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/loader/resource/ImageResourceTest.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/workers/ParentFrameTaskRunners.h View 1 2 3 4 5 6 7 8 9 1 chunk +5 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/workers/ParentFrameTaskRunners.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/modules/webgl/WebGLQuery.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/webgl/WebGLQuery.cpp View 1 chunk +1 line, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/webgl/WebGLTimerQueryEXT.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/webgl/WebGLTimerQueryEXT.cpp View 1 chunk +1 line, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/Timer.h View 1 2 3 4 5 6 7 8 9 4 chunks +8 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/platform/Timer.cpp View 1 2 3 4 5 6 7 8 9 4 chunks +8 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/platform/TimerTest.cpp View 1 2 3 4 5 6 7 8 9 7 chunks +36 lines, -32 lines 0 comments Download
M third_party/WebKit/Source/platform/WebFrameScheduler.h View 1 3 chunks +5 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/platform/WebTaskRunner.h View 1 2 3 4 5 6 7 8 9 2 chunks +10 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/platform/WebTaskRunner.cpp View 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/WebTaskRunnerTest.cpp View 1 2 3 chunks +23 lines, -21 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/AcceleratedStaticBitmapImage.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.cpp View 1 2 3 4 5 6 7 8 9 2 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/OffscreenCanvasPlaceholder.h View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/OffscreenCanvasPlaceholder.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/graphics/TextureHolder.h View 1 2 2 chunks +5 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/gpu/SharedGpuContext.cpp View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/heap/GCTaskRunner.h View 1 2 3 4 5 6 7 2 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/platform/mac/ScrollAnimatorMac.h View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/mac/ScrollAnimatorMac.mm View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/platform/scheduler/child/web_scheduler_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +5 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/scheduler/child/web_scheduler_impl.cc View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/scheduler/child/web_task_runner_impl.h View 1 2 3 4 5 6 7 8 9 2 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/platform/scheduler/child/web_task_runner_impl.cc View 1 2 3 4 5 6 7 8 9 3 chunks +9 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/platform/scheduler/child/webthread_impl_for_worker_scheduler.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/scheduler/renderer/web_frame_scheduler_impl.h View 1 2 chunks +6 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/platform/scheduler/renderer/web_frame_scheduler_impl.cc View 1 2 3 4 5 6 7 8 9 3 chunks +10 lines, -10 lines 0 comments Download
M third_party/WebKit/Source/platform/scheduler/renderer/web_frame_scheduler_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +9 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/platform/scheduler/renderer/web_view_scheduler_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 7 chunks +18 lines, -15 lines 0 comments Download
M third_party/WebKit/Source/platform/scheduler/renderer/webthread_impl_for_renderer_scheduler.h View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/scheduler/renderer/webthread_impl_for_renderer_scheduler.cc View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/scheduler/test/fake_web_task_runner.h View 1 2 3 4 5 6 7 8 9 3 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/scheduler/test/fake_web_task_runner.cc View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/web/InspectorEmulationAgent.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/public/platform/scheduler/child/webthread_impl_for_worker_scheduler.h View 2 chunks +4 lines, -3 lines 0 comments Download

Messages

Total messages: 52 (41 generated)
tzik
PTAL
4 years ago (2016-12-07 12:57:38 UTC) #17
alex clarke (OOO till 29th)
lgtm https://codereview.chromium.org/2550373005/diff/100001/third_party/WebKit/Source/platform/scheduler/child/web_task_runner_impl.h File third_party/WebKit/Source/platform/scheduler/child/web_task_runner_impl.h (left): https://codereview.chromium.org/2550373005/diff/100001/third_party/WebKit/Source/platform/scheduler/child/web_task_runner_impl.h#oldcode38 third_party/WebKit/Source/platform/scheduler/child/web_task_runner_impl.h:38: std::unique_ptr<WebTaskRunner> clone() override; Nice! I'm glad to see ...
4 years ago (2016-12-07 16:34:03 UTC) #24
alex clarke (OOO till 29th)
I think you need to change WebSchedulerImpl so that the |loading_web_task_runner_| and |timer_web_task_runner_| are lazily ...
4 years ago (2016-12-07 16:37:58 UTC) #25
Sami
++( lgtm ), thanks for doing this!
4 years ago (2016-12-07 19:05:54 UTC) #26
haraken
This is awesome! LGTM. https://codereview.chromium.org/2550373005/diff/100001/third_party/WebKit/Source/platform/scheduler/child/web_task_runner_impl.h File third_party/WebKit/Source/platform/scheduler/child/web_task_runner_impl.h (right): https://codereview.chromium.org/2550373005/diff/100001/third_party/WebKit/Source/platform/scheduler/child/web_task_runner_impl.h#newcode51 third_party/WebKit/Source/platform/scheduler/child/web_task_runner_impl.h:51: scoped_refptr<TaskQueue> task_queue_; On 2016/12/07 16:34:03, ...
4 years ago (2016-12-08 01:49:03 UTC) #27
alex clarke (OOO till 29th)
https://codereview.chromium.org/2550373005/diff/100001/third_party/WebKit/Source/platform/scheduler/child/web_task_runner_impl.h File third_party/WebKit/Source/platform/scheduler/child/web_task_runner_impl.h (right): https://codereview.chromium.org/2550373005/diff/100001/third_party/WebKit/Source/platform/scheduler/child/web_task_runner_impl.h#newcode51 third_party/WebKit/Source/platform/scheduler/child/web_task_runner_impl.h:51: scoped_refptr<TaskQueue> task_queue_; On 2016/12/08 01:49:02, haraken wrote: > On ...
4 years ago (2016-12-08 11:04:55 UTC) #28
LeonardWalton143
This will be wonderful to follow for getting more information.Education is the process of obtaining ...
4 years ago (2016-12-08 11:18:37 UTC) #29
tzik
On 2016/12/07 16:37:58, alex clarke wrote: > I think you need to change WebSchedulerImpl so ...
4 years ago (2016-12-12 12:18:42 UTC) #31
tzik
https://codereview.chromium.org/2550373005/diff/120001/third_party/WebKit/Source/core/fetch/ResourceLoader.cpp File third_party/WebKit/Source/core/fetch/ResourceLoader.cpp (right): https://codereview.chromium.org/2550373005/diff/120001/third_party/WebKit/Source/core/fetch/ResourceLoader.cpp#newcode87 third_party/WebKit/Source/core/fetch/ResourceLoader.cpp:87: m_loader->setLoadingTaskRunner(loadingTaskRunner.get()); eOn 2016/12/08 01:49:02, haraken wrote: > > Why ...
4 years ago (2016-12-12 12:18:52 UTC) #32
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/2550373005/240001
3 years, 11 months ago (2017-01-11 03:47:55 UTC) #49
commit-bot: I haz the power
3 years, 11 months ago (2017-01-11 04:10:35 UTC) #52
Message was sent while issue was closed.
Committed patchset #13 (id:240001) as
https://chromium.googlesource.com/chromium/src/+/4dbdb0dd364c7ac324c731004d1c...

Powered by Google App Engine
This is Rietveld 408576698