|
|
Created:
5 years, 3 months ago by alex clarke (OOO till 29th) Modified:
5 years, 3 months ago CC:
blink-reviews, gavinp+loader_chromium.org, Nate Chapin, kinuko+watch, tyoshino+watch_chromium.org Base URL:
https://chromium.googlesource.com/chromium/blink.git@master Target Ref:
refs/heads/master Project:
blink Visibility:
Public. |
DescriptionMake NavigationScheduler post loading tasks instead of timers
Similar to https://codereview.chromium.org/1312353004/
We would like to be able to prioritize loading tasks, but in order to
do that we need to make sure loading tasks are posted to the right queue
to make sure tasks run in the expected order. If this task is posted as
a timer, and loading tasks are prioritzed, it's possible
FrameHostMsg_DidStopLoading will be sent before the corresponding
FrameHostMsg_DidStartLoading ipc which causes various browser tests to
break.
Must be submitted after https://codereview.chromium.org/1303153005/
BUG=497761, 510398
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=201780
Patch Set 1 #
Total comments: 4
Messages
Total messages: 22 (9 generated)
alexclarke@chromium.org changed reviewers: + skyostil@chromium.org
The CQ bit was checked by alexclarke@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1305933007/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1305933007/1
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_...)
The CQ bit was checked by alexclarke@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1305933007/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1305933007/1
alexclarke@chromium.org changed reviewers: + haraken@chromium.org
haraken@chromium.org: Please review changes in this patch. I did try this with a oilpan build and didn't see any (new) leaks but considering the fun with the last patch I thought you'd make a good reviewer.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
haraken@chromium.org changed reviewers: + sigbjornf@opera.com
https://codereview.chromium.org/1305933007/diff/1/Source/core/loader/Navigati... File Source/core/loader/NavigationScheduler.cpp (right): https://codereview.chromium.org/1305933007/diff/1/Source/core/loader/Navigati... Source/core/loader/NavigationScheduler.cpp:270: , m_navigateTaskFactory(WTF::bind(&NavigationScheduler::navigateTask, this)) Sigbjorn: NavigationScheduler is a part of object. What happens if we create a closure that points to a part of object? (i.e., how does the closure keep it alive?)
https://codereview.chromium.org/1305933007/diff/1/Source/core/loader/Navigati... File Source/core/loader/NavigationScheduler.cpp (right): https://codereview.chromium.org/1305933007/diff/1/Source/core/loader/Navigati... Source/core/loader/NavigationScheduler.cpp:270: , m_navigateTaskFactory(WTF::bind(&NavigationScheduler::navigateTask, this)) On 2015/09/03 23:43:30, haraken wrote: > > Sigbjorn: NavigationScheduler is a part of object. What happens if we create a > closure that points to a part of object? (i.e., how does the closure keep it > alive?) It will work out fine, but https://codereview.chromium.org/1312843009/ makes these task factories no longer be part objects. If the task (CancellableTask, in this case) has a weak pointer back to its factory (the CancellableTaskFactory part object), then it doesn't matter where the factory object is allocated -- once it is destructed, the weak pointers are revoked & the task will no longer be able to access the closure. (cf. CancellableTaskFactory::CancellableTask::run().)
LGTM https://codereview.chromium.org/1305933007/diff/1/Source/core/loader/Navigati... File Source/core/loader/NavigationScheduler.cpp (right): https://codereview.chromium.org/1305933007/diff/1/Source/core/loader/Navigati... Source/core/loader/NavigationScheduler.cpp:270: , m_navigateTaskFactory(WTF::bind(&NavigationScheduler::navigateTask, this)) On 2015/09/04 06:28:34, sof wrote: > On 2015/09/03 23:43:30, haraken wrote: > > > > Sigbjorn: NavigationScheduler is a part of object. What happens if we create a > > closure that points to a part of object? (i.e., how does the closure keep it > > alive?) > > It will work out fine, but https://codereview.chromium.org/1312843009/ makes > these task factories no longer be part objects. > > If the task (CancellableTask, in this case) has a weak pointer back to its > factory (the CancellableTaskFactory part object), then it doesn't matter where > the factory object is allocated -- once it is destructed, the weak pointers are > revoked & the task will no longer be able to access the closure. > > (cf. CancellableTaskFactory::CancellableTask::run().) Makes sense.
The CQ bit was checked by alexclarke@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1305933007/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1305933007/1
Message was sent while issue was closed.
Committed patchset #1 (id:1) as https://src.chromium.org/viewvc/blink?view=rev&revision=201780
Message was sent while issue was closed.
A revert of this CL (patchset #1 id:1) has been created in https://codereview.chromium.org/1303153008/ by pdr@chromium.org. The reason for reverting is: I think this is causing timeouts: http://crbug.com/528352..
Message was sent while issue was closed.
jochen@chromium.org changed reviewers: + jochen@chromium.org
Message was sent while issue was closed.
https://codereview.chromium.org/1305933007/diff/1/Source/core/loader/Navigati... File Source/core/loader/NavigationScheduler.cpp (right): https://codereview.chromium.org/1305933007/diff/1/Source/core/loader/Navigati... Source/core/loader/NavigationScheduler.cpp:423: FROM_HERE, m_navigateTaskFactory.cancelAndCreate(), m_redirect->delay()); this is wrong: startOneShot takes seconds, postDelayedTask takes milliseconds. |