summaryrefslogtreecommitdiffstats
path: root/ash
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-28 15:57:17 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-28 15:57:17 +0000
commit436d9e4fba50e9ffe00386bbf5b738219c723922 (patch)
treec86425d24214396fbf4740ebbe330853a89e1438 /ash
parenta636d8e56d0db4000e4139d00f6033a027a225d2 (diff)
downloadchromium_src-436d9e4fba50e9ffe00386bbf5b738219c723922.zip
chromium_src-436d9e4fba50e9ffe00386bbf5b738219c723922.tar.gz
chromium_src-436d9e4fba50e9ffe00386bbf5b738219c723922.tar.bz2
Fixes crash in closing window while in workspaces. The crash was
occuring because NativeWidgetAura was deleting the restore bounds but leaving them on the window so that when WorkspaceLayoutManager also deleted the restore bounds we crashed. I'm changing NativeWidgetAura to clear the property. Since obervers are passed the old value I'm also changing the code to use a scoped_ptr so that the old value hasn't been deleted when observers are notified. BUG=none TEST=none R=ben@chromium.org Review URL: https://chromiumcodereview.appspot.com/9479026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@123980 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash')
-rw-r--r--ash/wm/property_util.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/ash/wm/property_util.cc b/ash/wm/property_util.cc
index 4ae645b..d8db42c 100644
--- a/ash/wm/property_util.cc
+++ b/ash/wm/property_util.cc
@@ -13,7 +13,7 @@
namespace ash {
void SetRestoreBounds(aura::Window* window, const gfx::Rect& bounds) {
- delete GetRestoreBounds(window);
+ scoped_ptr<const gfx::Rect> old_bounds(GetRestoreBounds(window));
window->SetProperty(aura::client::kRestoreBoundsKey, new gfx::Rect(bounds));
}
@@ -27,7 +27,7 @@ const gfx::Rect* GetRestoreBounds(aura::Window* window) {
}
void ClearRestoreBounds(aura::Window* window) {
- delete GetRestoreBounds(window);
+ scoped_ptr<const gfx::Rect> old_bounds(GetRestoreBounds(window));
window->ClearProperty(aura::client::kRestoreBoundsKey);
}