Fix use-after-scope in ash window controller
The temporary base::Optional<PersistentWindowInfo> object is destroyed
at the end of the full expression in this statement:
const auto& persistent_window_info =
*window_state->persistent_window_info();
Avoid the lifetime issue by making a copy of the small struct.
This bug was found by ASan after a clang change to more accurately track
the lifetime of temporaries like these.
TBR=afakhry@chromium.org
Bug: 869067
Change-Id: Ibb4cd6761ec29fc09cd42c75b8d7bb13844f5352
Reviewed-on: https://chromium-review.googlesource.com/1157256Reviewed-by:
Reid Kleckner <rnk@chromium.org>
Commit-Queue: Reid Kleckner <rnk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#579579}
Showing
Please register or sign in to comment