commit | 22c21a9cc728e7958e3ac1033cfdc6ed0f0a8b10 | [log] [tgz] |
---|---|---|
author | Alex Clarke <alexclarke@chromium.org> | Sat Jul 06 07:31:07 2019 |
committer | Commit Bot <commit-bot@chromium.org> | Sat Jul 06 07:31:07 2019 |
tree | c05155c29bd98242f67e6e48d3376e4bda8076d3 | |
parent | 445098837b2d25cc00cc6ee6a14a9095494dbb98 [diff] |
Prepare for PostTask returning a promise This patch introduces a PostTaskExecutor which will be used by PostTask. In addition to reduce binary bloat from PostTask and ThenOn/CatchOn templates I've arranged for the AbstractPromise to be constructed out of line. This required it was possible to construct the Executor in the templates to be passed to a non-inlined function which creates the AbstractPromise. The binary size savings seem quite significant, the overhead of a new ThenOn template instantiation is more than halved. AbstractPromise::Executor has been pulled out into it's own file for clarity. Most of this patch is churn due to this change. PromiseHolder has been moved to promise/helpers.h because we'll need to use it in various tests when the task runners are refactored to use scoped_refptr<AbstractPromise> instead of OnceClosure. Bug: 906125 Change-Id: I7f5415c92e5d5ad83ccfc72877562e377a6759fc Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1687262 Reviewed-by: François Doray <fdoray@chromium.org> Reviewed-by: Etienne Pierre-Doray <etiennep@chromium.org> Commit-Queue: Alex Clarke <alexclarke@chromium.org> Cr-Commit-Position: refs/heads/master@{#675110}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .