[Paint Preview] Change cleanup order and ensure objects exist
When under memory pressure, we need to make sure all objects exist and that the callback is the last thing resolved. Otherwise `this` might be gone. Bug: 1148268 Change-Id: I0bc7c5ec29b4189f19b7936b20fc7cd6b8489d5a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2533900 Commit-Queue: Calder Kitagawa <ckitagawa@chromium.org> Auto-Submit: Calder Kitagawa <ckitagawa@chromium.org> Reviewed-by:Mehran Mahmoudi <mahmoudi@chromium.org> Cr-Commit-Position: refs/heads/master@{#826883}
Showing
Please register or sign in to comment