Commit 3c7019f9 authored by Wez's avatar Wez Committed by Commit Bot

[ui] Add explanatory comment on WidgetObserver usage.

Bug: 1055483
Change-Id: Ic4a205e0c801bbd1ccc4e4cbf80cfd7aff099f95
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2087616
Auto-Submit: Wez <wez@chromium.org>
Commit-Queue: Scott Violet <sky@chromium.org>
Reviewed-by: default avatarScott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#749158}
parent 9054029a
...@@ -104,6 +104,8 @@ class AuraLinuxApplication : public ui::AXPlatformNodeDelegateBase, ...@@ -104,6 +104,8 @@ class AuraLinuxApplication : public ui::AXPlatformNodeDelegateBase,
void OnWidgetDestroying(Widget* widget) override { void OnWidgetDestroying(Widget* widget) override {
auto iter = std::find(widgets_.begin(), widgets_.end(), widget); auto iter = std::find(widgets_.begin(), widgets_.end(), widget);
// Since |widget| is about to be destroyed, there is no point in removing
// |this| from its list of observers.
if (iter != widgets_.end()) if (iter != widgets_.end())
widgets_.erase(iter); widgets_.erase(iter);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment