commit | 7c187b7e2ab5d06ffc3286b5729d9d2934d0f716 | [log] [tgz] |
---|---|---|
author | Lowell Manners <lowell@chromium.org> | Mon Feb 11 14:54:56 2019 |
committer | Commit Bot <commit-bot@chromium.org> | Mon Feb 11 14:54:56 2019 |
tree | c2fc225d82a85958ed3398eee095127dd3037f6e | |
parent | 49deb96b74bc22894e326478d6d86886f2f797a5 [diff] |
Convert cloud_policy_manager_browsertest.cc to use GetSafeWeakWrapper. GetSafeWeakWrapper takes care of calling Detach(), so tests don't have to. This change also fixes some memory safety issues in this test where stack-allocated variables were being captured reference [&], for callbacks that may be invoked after the stack-allocated variables have been deallocated. Capturing stack-allocated variables by reference appears to have worked before this change only because the Detach() call on line 197 prevented callbacks from being run a second time. Bug: 924960 Change-Id: I89e4a217ad4793104c560c7a61a34b3171765ec6 Reviewed-on: https://chromium-review.googlesource.com/c/1454358 Reviewed-by: Julian Pastarmov <pastarmovj@chromium.org> Commit-Queue: Lowell Manners <lowell@chromium.org> Cr-Commit-Position: refs/heads/master@{#630753}
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 .