Add cancelable lambda tasks
Often, tasks just need to call a single API method. By implementing such tasks via a lambda, we save a lot of boilerplate. Additionally, since lambdas are defined inside other function bodies, they have access to private methods, which sometimes allows for better encapsulation. This CL introduces {CancelableLambdaTask} and {CancelableIdleLambdaTask} and uses them to replace some custom tasks. More can be refactored later. R=ahaas@chromium.org Bug: v8:8238 Change-Id: I88bd2c9bd57ebc32d082528f2e4251d741a0d021 Reviewed-on: https://chromium-review.googlesource.com/c/1256773 Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Reviewed-by: Andreas Haas <ahaas@chromium.org> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> Reviewed-by: Hannes Payer <hpayer@chromium.org> Cr-Commit-Position: refs/heads/master@{#56367}
Showing
Please
register
or
sign in
to comment