Commit 451eb531 authored by sky@chromium.org's avatar sky@chromium.org

Changes aura::Window::observers_ to not notify observers that are

added while the Window is in the process of notifying observers. I
need this for the new worskpace code that can end up attaching new
observers during a notification (happens when a state change triggers
moving to a different window). If the new observers are also notified
of the change they get confused.

BUG=136919
TEST=none
R=ben@chromium.org


Review URL: https://chromiumcodereview.appspot.com/10832228

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@151093 0039d316-1c4b-4281-b951-d872f2087c98
parent d6138661
......@@ -66,7 +66,11 @@ Window::Window(WindowDelegate* delegate)
id_(-1),
transparent_(false),
user_data_(NULL),
ignore_events_(false) {
ignore_events_(false),
// Don't notify newly added observers during notification. This causes
// problems for code that adds an observer as part of an observer
// notification (such as the workspace code).
observers_(ObserverList<WindowObserver>::NOTIFY_EXISTING_ONLY) {
}
Window::~Window() {
......
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