commit | 53f933e87f1c0f284d0ad640ebb4b085640dbd30 | [log] [tgz] |
---|---|---|
author | tzik <tzik@chromium.org> | Wed Jul 25 01:56:04 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Wed Jul 25 01:56:04 2018 |
tree | 5b3c11f3f953da9420b125a57c79271d42c529dc | |
parent | 3bc7dce54257dc862bd8515972ac95d8f78b088c [diff] |
Avoid touching AddressSorterWin::Job's ref count before it's fully constructed AddressSorterWin::Job's reference count is zero at the beginning of its constructor, and used to be incremented at base::Bind there implicitly. However, if PostTaskAndReply there failed, the reference is gone and the reference count gets to 0 again. And as the result, `new Job` may return a stale pointer. This CL adds a static constructor to , and moves the ref count manipulation part out from the constructor, in order to avoid the unexpected destruction. Bug: 866456 Change-Id: I1e735d6d0bf427988ba7380569628d4264c755f5 Reviewed-on: https://chromium-review.googlesource.com/1147898 Reviewed-by: Matt Menke <mmenke@chromium.org> Commit-Queue: Taiju Tsuiki <tzik@chromium.org> Cr-Commit-Position: refs/heads/master@{#577767}
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 .