New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 790843 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Mar 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 3
Type: Task



Sign in to add a comment

Consider simplifying the usage of AsyncOperation

Project Member Reported by junwei...@intel.com, Dec 1 2017

Issue description

It 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
 

Comment 1 by mcasas@chromium.org, Mar 10 2018

Status: Assigned (was: Untriaged)

Comment 2 by junwei...@intel.com, Mar 12 2018

Status: Started (was: Assigned)
Project Member

Comment 3 by bugdroid1@chromium.org, 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

Status: Fixed (was: Started)

Sign in to add a comment