Consider simplifying the usage of AsyncOperation |
|||
Issue descriptionIt comes form CL review[1] commenting as below. Since this operation is not cancellable does it make sense to guarantee that |callback_| will be called instead of canceling the callback if this object is freed? This would simplify callers since they would not need to own the result returned by Create (it could return void). [1] https://chromium-review.googlesource.com/c/chromium/src/+/750006/17/services/shape_detection/detection_utils_win.h#101
,
Mar 12 2018
,
Mar 24 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/ac488bf55b4a205d6c85ec1de174bf924c1808f6 commit ac488bf55b4a205d6c85ec1de174bf924c1808f6 Author: junweifu <junwei.fu@intel.com> Date: Sat Mar 24 13:38:45 2018 ShapeDetection: Simplify the usage of AsyncOperation on windows 10 Since this operation is not cancellable, it's better to guarantee that |AsyncCallbackInternal| will be called instead of canceling, but |callback_| still need to take weak reference count so that it will not be run if its object has been already destroyed. This would simplify callers since they would not need to own the result returned by Create. BUG= 790843 Cq-Include-Trybots: master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win10_chromium_x64_rel_ng Change-Id: I640cbe769c999ef20d6b9310038023c4fd3d7714 Reviewed-on: https://chromium-review.googlesource.com/968121 Reviewed-by: Reilly Grant <reillyg@chromium.org> Reviewed-by: Miguel Casas <mcasas@chromium.org> Commit-Queue: Junwei Fu <junwei.fu@intel.com> Cr-Commit-Position: refs/heads/master@{#545688} [modify] https://crrev.com/ac488bf55b4a205d6c85ec1de174bf924c1808f6/services/shape_detection/detection_utils_win.h [modify] https://crrev.com/ac488bf55b4a205d6c85ec1de174bf924c1808f6/services/shape_detection/face_detection_impl_win.cc [modify] https://crrev.com/ac488bf55b4a205d6c85ec1de174bf924c1808f6/services/shape_detection/face_detection_impl_win.h [modify] https://crrev.com/ac488bf55b4a205d6c85ec1de174bf924c1808f6/services/shape_detection/face_detection_provider_win.cc [modify] https://crrev.com/ac488bf55b4a205d6c85ec1de174bf924c1808f6/services/shape_detection/face_detection_provider_win.h [modify] https://crrev.com/ac488bf55b4a205d6c85ec1de174bf924c1808f6/services/shape_detection/text_detection_impl_win.cc [modify] https://crrev.com/ac488bf55b4a205d6c85ec1de174bf924c1808f6/services/shape_detection/text_detection_impl_win.h
,
Mar 26 2018
|
|||
►
Sign in to add a comment |
|||
Comment 1 by mcasas@chromium.org
, Mar 10 2018