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

Issue 2876453002: Stop using Resource::ResourceCallback and make Resource have a TaskHandle (Closed)

Created:
3 years, 7 months ago by horo
Modified:
3 years, 7 months ago
Reviewers:
kinuko, Nate Chapin, yhirano
CC:
chromium-reviews, tyoshino+watch_chromium.org, loading-reviews_chromium.org, gavinp+loader_chromium.org, blink-reviews, loading-reviews+fetch_chromium.org, kinuko+watch, Nate Chapin
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Stop using Resource::ResourceCallback and make Resource have a TaskHandle Resource::ResourceCallback was made to be static local by crrev.com/16365011. It was intended to uses a single timer for all Resources. But I don't think this optimization has an impact in the real world web. To make the code simple, I'd like to remove the ResourceCallback and make the Resource have a TaskHandle. This change will make it easy to support off-main-thread fetch. BUG=443374 Review-Url: https://codereview.chromium.org/2876453002 Cr-Commit-Position: refs/heads/master@{#470897} Committed: https://chromium.googlesource.com/chromium/src/+/1b18cecc5e51e5946b1c224bcbfd8fd71bd7c23d

Patch Set 1 #

Total comments: 2

Patch Set 2 : check IsActive() #

Total comments: 2

Patch Set 3 : s/async_callback_task_handle_/async_finish_pending_clients_task_/ #

Messages

Total messages: 49 (31 generated)
horo
yhirano@ Please review this.
3 years, 7 months ago (2017-05-10 05:43:50 UTC) #10
yhirano
https://codereview.chromium.org/2876453002/diff/40001/third_party/WebKit/Source/platform/loader/fetch/Resource.cpp File third_party/WebKit/Source/platform/loader/fetch/Resource.cpp (right): https://codereview.chromium.org/2876453002/diff/40001/third_party/WebKit/Source/platform/loader/fetch/Resource.cpp#newcode695 third_party/WebKit/Source/platform/loader/fetch/Resource.cpp:695: if (clients_awaiting_callback_.IsEmpty()) The original code contains |task_runner_.IsActive()| in the ...
3 years, 7 months ago (2017-05-10 06:59:17 UTC) #13
horo
https://codereview.chromium.org/2876453002/diff/40001/third_party/WebKit/Source/platform/loader/fetch/Resource.cpp File third_party/WebKit/Source/platform/loader/fetch/Resource.cpp (right): https://codereview.chromium.org/2876453002/diff/40001/third_party/WebKit/Source/platform/loader/fetch/Resource.cpp#newcode695 third_party/WebKit/Source/platform/loader/fetch/Resource.cpp:695: if (clients_awaiting_callback_.IsEmpty()) On 2017/05/10 06:59:17, yhirano wrote: > The ...
3 years, 7 months ago (2017-05-10 07:05:30 UTC) #16
yhirano
lgtm
3 years, 7 months ago (2017-05-10 07:08:45 UTC) #17
kinuko
cool! (lgtm/2) https://codereview.chromium.org/2876453002/diff/60001/third_party/WebKit/Source/platform/loader/fetch/Resource.h File third_party/WebKit/Source/platform/loader/fetch/Resource.h (right): https://codereview.chromium.org/2876453002/diff/60001/third_party/WebKit/Source/platform/loader/fetch/Resource.h#newcode483 third_party/WebKit/Source/platform/loader/fetch/Resource.h:483: TaskHandle async_callback_task_handle_; nit: async_finish_pending_clients_task_ or something like ...
3 years, 7 months ago (2017-05-10 07:18:10 UTC) #19
horo
Thank you. https://codereview.chromium.org/2876453002/diff/60001/third_party/WebKit/Source/platform/loader/fetch/Resource.h File third_party/WebKit/Source/platform/loader/fetch/Resource.h (right): https://codereview.chromium.org/2876453002/diff/60001/third_party/WebKit/Source/platform/loader/fetch/Resource.h#newcode483 third_party/WebKit/Source/platform/loader/fetch/Resource.h:483: TaskHandle async_callback_task_handle_; On 2017/05/10 07:18:09, kinuko wrote: ...
3 years, 7 months ago (2017-05-10 07:35:09 UTC) #22
horo
japhet@ Could you please review this?
3 years, 7 months ago (2017-05-10 09:40:19 UTC) #24
Nate Chapin
lgtm
3 years, 7 months ago (2017-05-10 17:30:58 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/2876453002/80001
3 years, 7 months ago (2017-05-10 20:52:25 UTC) #30
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/450726)
3 years, 7 months ago (2017-05-10 23:47:07 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/2876453002/80001
3 years, 7 months ago (2017-05-11 00:56:40 UTC) #34
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/451110)
3 years, 7 months ago (2017-05-11 03:57:25 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/2876453002/80001
3 years, 7 months ago (2017-05-11 04:03:37 UTC) #38
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/451382)
3 years, 7 months ago (2017-05-11 07:08:02 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/2876453002/80001
3 years, 7 months ago (2017-05-11 07:13:33 UTC) #42
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_compile_dbg_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_compile_dbg_ng/builds/416105)
3 years, 7 months ago (2017-05-11 07:52:21 UTC) #44
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/2876453002/80001
3 years, 7 months ago (2017-05-11 07:53:59 UTC) #46
commit-bot: I haz the power
3 years, 7 months ago (2017-05-11 10:17:57 UTC) #49
Message was sent while issue was closed.
Committed patchset #3 (id:80001) as
https://chromium.googlesource.com/chromium/src/+/1b18cecc5e51e5946b1c224bcbfd...

Powered by Google App Engine
This is Rietveld 408576698