|
|
Chromium Code Reviews|
Created:
4 years, 1 month ago by nhiroki Modified:
4 years ago CC:
chromium-reviews, shans, rjwright, blink-reviews-animation_chromium.org, mac-reviews_chromium.org, darktears, blink-reviews, kinuko+watch, scheduler-bugs_chromium.org, Eric Willigers Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionScheduler: Deprecate CancellableTaskFactory in favor of WebTaskWebTaskRunner::postCancellableTask (3)
This CL completely removes CancellableTaskFactory.
BUG=665285
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Committed: https://crrev.com/387c97d5cf93a15e1b547bf9f96c8c441fe9d035
Cr-Commit-Position: refs/heads/master@{#434428}
Patch Set 1 #
Total comments: 7
Patch Set 2 : replace postDelayedCancellableTask with postCancellableTask #Patch Set 3 : rebase #Messages
Total messages: 51 (33 generated)
Description was changed from ========== Scheduler: Deprecate CancellableTaskFactory in favor of WebTaskScheduller::postCancellableTask (3) This CL completely removes CancellableTaskFactory. BUG=665285 ========== to ========== Scheduler: Deprecate CancellableTaskFactory in favor of WebTaskScheduller::postCancellableTask (3) This CL completely removes CancellableTaskFactory. BUG=665285 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel ==========
Patchset #1 (id:1) has been deleted
The CQ bit was checked by nhiroki@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: mac_optional_gpu_tests_rel on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_optional_gpu_...)
The CQ bit was checked by nhiroki@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from ========== Scheduler: Deprecate CancellableTaskFactory in favor of WebTaskScheduller::postCancellableTask (3) This CL completely removes CancellableTaskFactory. BUG=665285 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel ========== to ========== Scheduler: Deprecate CancellableTaskFactory in favor of WebTaskWebTaskRunner::postCancellableTask (3) This CL completely removes CancellableTaskFactory. BUG=665285 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel ==========
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: mac_optional_gpu_tests_rel on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_optional_gpu_...)
The CQ bit was checked by nhiroki@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: android_n5x_swarming_rel on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_n5x_...)
Patchset #2 (id:40001) has been deleted
Patchset #1 (id:20001) has been deleted
nhiroki@chromium.org changed reviewers: + bajones@chromium.org, haraken@chromium.org, tzik@chromium.org
Hi, can you review this? +bajones@ for modules/webgl/ +haraken@ and tzik@ for the entire changes (Do you know who is an appropriate reviewer of platform/mac?) Thanks. https://codereview.chromium.org/2514733002/diff/60001/third_party/WebKit/Sour... File third_party/WebKit/Source/platform/mac/ScrollAnimatorMac.mm (right): https://codereview.chromium.org/2514733002/diff/60001/third_party/WebKit/Sour... third_party/WebKit/Source/platform/mac/ScrollAnimatorMac.mm:1067: wrapWeakPersistent(this)), Can we make this wrapPersistent(this)? I'm assuming that ScrollAnimatorMac::dispose() is always called when ScrollAnimatorMac is no longer necessary and it cuts a strong reference from a posted task to |this|. (I tried to confirm this but I couldn't trace who calls ScrollAnimatorMac::dispose() on the codesearch) https://codereview.chromium.org/2514733002/diff/60001/third_party/WebKit/Sour... third_party/WebKit/Source/platform/mac/ScrollAnimatorMac.mm:1068: 0.1); This fails compile on Mac bots as follows: [29712/38626] OBJCXX obj/third_party/WebKit/Source/platform/platform/ScrollAnimatorMac.o FAILED: obj/third_party/WebKit/Source/platform/platform/ScrollAnimatorMac.o ../../third_party/WebKit/Source/platform/mac/ScrollAnimatorMac.mm:1068:7: error: implicit conversion from 'double' to 'long long' changes value from 0.1 to 0 [-Werror,-Wliteral-conversion] 0.1); ^~~ 1 error generated. I'm not sure why the original code was compilable. postDelayedTask() also takes "long long" as the 3rd argument. Anyway, should we replace this with postCancellableTask()? https://codereview.chromium.org/2514733002/diff/60001/third_party/WebKit/Sour... third_party/WebKit/Source/platform/mac/ScrollAnimatorMac.mm:1095: wrapWeakPersistent(this))); ditto.
tzik@: I just want to confirm, but have you already implemented a mechanism that stops triggering cancellable tasks after the host object is marked as dead by Oilpan's GC? (I couldn't find the code.) It looks dangerous to increase usages of postCancellableTask without having the mechanism. https://codereview.chromium.org/2514733002/diff/60001/third_party/WebKit/Sour... File third_party/WebKit/Source/platform/mac/ScrollAnimatorMac.mm (right): https://codereview.chromium.org/2514733002/diff/60001/third_party/WebKit/Sour... third_party/WebKit/Source/platform/mac/ScrollAnimatorMac.mm:1067: wrapWeakPersistent(this)), On 2016/11/21 05:45:54, nhiroki wrote: > Can we make this wrapPersistent(this)? I'm assuming that > ScrollAnimatorMac::dispose() is always called when ScrollAnimatorMac is no > longer necessary and it cuts a strong reference from a posted task to |this|. > > (I tried to confirm this but I couldn't trace who calls > ScrollAnimatorMac::dispose() on the codesearch) It's called by a pre-finalizer: https://cs.chromium.org/chromium/src/third_party/WebKit/Source/platform/mac/S... In other words, dispose() is called after all strong references to the scroll animator object is gone and Oilpan has decided to destruct the object. So we should use wrapWeakPersistent. That said, using wrapPersistent won't cause a big issue because the timer will be invoked and the persistent handle is dropped in a finite time period. https://codereview.chromium.org/2514733002/diff/60001/third_party/WebKit/Sour... third_party/WebKit/Source/platform/mac/ScrollAnimatorMac.mm:1068: 0.1); On 2016/11/21 05:45:54, nhiroki wrote: > This fails compile on Mac bots as follows: > > [29712/38626] OBJCXX > obj/third_party/WebKit/Source/platform/platform/ScrollAnimatorMac.o > FAILED: obj/third_party/WebKit/Source/platform/platform/ScrollAnimatorMac.o > ../../third_party/WebKit/Source/platform/mac/ScrollAnimatorMac.mm:1068:7: error: > implicit conversion from 'double' to 'long long' changes value from 0.1 to 0 > [-Werror,-Wliteral-conversion] > 0.1); > ^~~ > 1 error generated. > > I'm not sure why the original code was compilable. postDelayedTask() also takes > "long long" as the 3rd argument. Anyway, should we replace this with > postCancellableTask()? Yeah, 0.1 looks like a random number. +1 to changing it to postCancellableTask.
The CQ bit was checked by nhiroki@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Thanks for your comments. Updated. https://codereview.chromium.org/2514733002/diff/60001/third_party/WebKit/Sour... File third_party/WebKit/Source/platform/mac/ScrollAnimatorMac.mm (right): https://codereview.chromium.org/2514733002/diff/60001/third_party/WebKit/Sour... third_party/WebKit/Source/platform/mac/ScrollAnimatorMac.mm:1067: wrapWeakPersistent(this)), On 2016/11/21 06:42:24, haraken wrote: > On 2016/11/21 05:45:54, nhiroki wrote: > > Can we make this wrapPersistent(this)? I'm assuming that > > ScrollAnimatorMac::dispose() is always called when ScrollAnimatorMac is no > > longer necessary and it cuts a strong reference from a posted task to |this|. > > > > (I tried to confirm this but I couldn't trace who calls > > ScrollAnimatorMac::dispose() on the codesearch) > > It's called by a pre-finalizer: > > https://cs.chromium.org/chromium/src/third_party/WebKit/Source/platform/mac/S... > > In other words, dispose() is called after all strong references to the scroll > animator object is gone and Oilpan has decided to destruct the object. So we > should use wrapWeakPersistent. > > That said, using wrapPersistent won't cause a big issue because the timer will > be invoked and the persistent handle is dropped in a finite time period. Thank you for the clarification :) https://codereview.chromium.org/2514733002/diff/60001/third_party/WebKit/Sour... third_party/WebKit/Source/platform/mac/ScrollAnimatorMac.mm:1068: 0.1); On 2016/11/21 06:42:24, haraken wrote: > On 2016/11/21 05:45:54, nhiroki wrote: > > This fails compile on Mac bots as follows: > > > > [29712/38626] OBJCXX > > obj/third_party/WebKit/Source/platform/platform/ScrollAnimatorMac.o > > FAILED: obj/third_party/WebKit/Source/platform/platform/ScrollAnimatorMac.o > > ../../third_party/WebKit/Source/platform/mac/ScrollAnimatorMac.mm:1068:7: > error: > > implicit conversion from 'double' to 'long long' changes value from 0.1 to 0 > > [-Werror,-Wliteral-conversion] > > 0.1); > > ^~~ > > 1 error generated. > > > > I'm not sure why the original code was compilable. postDelayedTask() also > takes > > "long long" as the 3rd argument. Anyway, should we replace this with > > postCancellableTask()? > > Yeah, 0.1 looks like a random number. +1 to changing it to postCancellableTask. Done.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Updates to modules/webgl LGTM
On 2016/11/21 06:42:24, haraken wrote: > tzik@: I just want to confirm, but have you already implemented a mechanism that > stops triggering cancellable tasks after the host object is marked as dead by > Oilpan's GC? (I couldn't find the code.) > > It looks dangerous to increase usages of postCancellableTask without having the > mechanism. > Yes. It just relies on WeakPersistent invalidation to handle that case. When an object is marked as dead, WeakPersistent to the object will be cleared, and that implies the task cancellation.
lgtm
haraken@, ping?
On 2016/11/24 08:05:10, nhiroki (slow-sheriff) wrote: > haraken@, ping? Sorry, I missed this. LGTM.
On 2016/11/24 08:16:21, haraken wrote: > On 2016/11/24 08:05:10, nhiroki (slow-sheriff) wrote: > > haraken@, ping? > > Sorry, I missed this. LGTM. Np! Thank you :)
The CQ bit was checked by nhiroki@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: cast_shell_linux on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL) chromeos_amd64-generic_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL) chromeos_x86-generic_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL) chromium_presubmit on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL) linux_chromium_chromeos_compile_dbg_ng on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL) linux_chromium_chromeos_ozone_rel_ng on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL) linux_chromium_chromeos_rel_ng on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL) linux_chromium_clobber_rel_ng on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL) linux_chromium_compile_dbg_ng on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL) linux_optional_gpu_tests_rel on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL)
The CQ bit was checked by nhiroki@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: linux_chromium_chromeos_compile_dbg_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) linux_chromium_chromeos_ozone_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by nhiroki@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from haraken@chromium.org, bajones@chromium.org, tzik@chromium.org Link to the patchset: https://codereview.chromium.org/2514733002/#ps100001 (title: "rebase")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: cast_shell_linux on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linu...)
The CQ bit was checked by nhiroki@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch.
Bot data: {"patchset_id": 100001, "attempt_start_ts": 1480034714461530,
"parent_rev": "1d3c9963617d47a306bf0587913e12f6593480b0", "commit_rev":
"56b94c93b75f4d5486dc4771546cecb3e99e7d63"}
Message was sent while issue was closed.
Description was changed from ========== Scheduler: Deprecate CancellableTaskFactory in favor of WebTaskWebTaskRunner::postCancellableTask (3) This CL completely removes CancellableTaskFactory. BUG=665285 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel ========== to ========== Scheduler: Deprecate CancellableTaskFactory in favor of WebTaskWebTaskRunner::postCancellableTask (3) This CL completely removes CancellableTaskFactory. BUG=665285 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel ==========
Message was sent while issue was closed.
Committed patchset #3 (id:100001)
Message was sent while issue was closed.
Description was changed from ========== Scheduler: Deprecate CancellableTaskFactory in favor of WebTaskWebTaskRunner::postCancellableTask (3) This CL completely removes CancellableTaskFactory. BUG=665285 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel ========== to ========== Scheduler: Deprecate CancellableTaskFactory in favor of WebTaskWebTaskRunner::postCancellableTask (3) This CL completely removes CancellableTaskFactory. BUG=665285 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel Committed: https://crrev.com/387c97d5cf93a15e1b547bf9f96c8c441fe9d035 Cr-Commit-Position: refs/heads/master@{#434428} ==========
Message was sent while issue was closed.
Patchset 3 (id:??) landed as https://crrev.com/387c97d5cf93a15e1b547bf9f96c8c441fe9d035 Cr-Commit-Position: refs/heads/master@{#434428} |
