summaryrefslogtreecommitdiffstats
path: root/ui/views/widget
diff options
context:
space:
mode:
authoroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-10 23:23:44 +0000
committeroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-10 23:23:44 +0000
commitc3a89b2f7da84d1bf4af9bc29f8eea9ad572b2fe (patch)
tree28c53efbad5ff82d7f2e04d23042cd12a358cc6e /ui/views/widget
parent43ceb00f7be7d930998b905987cdfa497ad90edf (diff)
downloadchromium_src-c3a89b2f7da84d1bf4af9bc29f8eea9ad572b2fe.zip
chromium_src-c3a89b2f7da84d1bf4af9bc29f8eea9ad572b2fe.tar.gz
chromium_src-c3a89b2f7da84d1bf4af9bc29f8eea9ad572b2fe.tar.bz2
Defer focus manager deletion only on gtk port
This should fix focus manager leak on aura. BUG=75023 TEST=memory bot should report no leak on this. Review URL: https://chromiumcodereview.appspot.com/9369057 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@121562 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/views/widget')
-rw-r--r--ui/views/widget/widget.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/ui/views/widget/widget.cc b/ui/views/widget/widget.cc
index 05951e8..fc76d58 100644
--- a/ui/views/widget/widget.cc
+++ b/ui/views/widget/widget.cc
@@ -1142,6 +1142,7 @@ void Widget::DestroyRootView() {
root_view_.reset();
// Input method has to be destroyed before focus manager.
input_method_.reset();
+#if defined(TOOLKIT_USES_GTK)
// Defer focus manager's destruction. This is for the case when the
// focus manager is referenced by a child NativeWidgetGtk (e.g. TabbedPane in
// a dialog). When gtk_widget_destroy is called on the parent, the destroy
@@ -1152,6 +1153,7 @@ void Widget::DestroyRootView() {
FocusManager* focus_manager = focus_manager_.release();
if (focus_manager)
MessageLoop::current()->DeleteSoon(FROM_HERE, focus_manager);
+#endif
}
////////////////////////////////////////////////////////////////////////////////