Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(752)

Side by Side Diff: athena/wm/window_manager_impl.cc

Issue 471803002: athena: Fix a use-after-free case. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "athena/wm/public/window_manager.h" 5 #include "athena/wm/public/window_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "athena/common/container_priorities.h" 9 #include "athena/common/container_priorities.h"
10 #include "athena/input/public/accelerator_manager.h" 10 #include "athena/input/public/accelerator_manager.h"
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 wm_state_.reset(new wm::WMState()); 128 wm_state_.reset(new wm::WMState());
129 aura::client::ActivationClient* activation_client = 129 aura::client::ActivationClient* activation_client =
130 aura::client::GetActivationClient(container_->GetRootWindow()); 130 aura::client::GetActivationClient(container_->GetRootWindow());
131 shadow_controller_.reset(new wm::ShadowController(activation_client)); 131 shadow_controller_.reset(new wm::ShadowController(activation_client));
132 instance = this; 132 instance = this;
133 InstallAccelerators(); 133 InstallAccelerators();
134 } 134 }
135 135
136 WindowManagerImpl::~WindowManagerImpl() { 136 WindowManagerImpl::~WindowManagerImpl() {
137 overview_.reset(); 137 overview_.reset();
138 split_view_controller_.reset();
mfomitchev 2014/08/14 13:10:02 Ugh. Thanks. Sorry, I should've done the Asan buil
138 mru_window_tracker_.reset(); 139 mru_window_tracker_.reset();
139 if (container_) { 140 if (container_) {
140 container_->RemoveObserver(this); 141 container_->RemoveObserver(this);
141 container_->RemovePreTargetHandler(bezel_controller_.get()); 142 container_->RemovePreTargetHandler(bezel_controller_.get());
142 } 143 }
143 // |title_drag_controller_| needs to be reset before |container_|. 144 // |title_drag_controller_| needs to be reset before |container_|.
144 title_drag_controller_.reset(); 145 title_drag_controller_.reset();
145 container_.reset(); 146 container_.reset();
146 instance = NULL; 147 instance = NULL;
147 } 148 }
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 DCHECK(!instance); 317 DCHECK(!instance);
317 } 318 }
318 319
319 // static 320 // static
320 WindowManager* WindowManager::GetInstance() { 321 WindowManager* WindowManager::GetInstance() {
321 DCHECK(instance); 322 DCHECK(instance);
322 return instance; 323 return instance;
323 } 324 }
324 325
325 } // namespace athena 326 } // namespace athena
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698