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

Unified Diff: ui/views/controls/native/native_view_host_aura.cc

Issue 10910034: Attempt 2 at: Fixes crash that occured because NativeViewHostAura::Detach was not (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: da fix Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/controls/native/native_view_host.cc ('k') | ui/views/controls/native/native_view_host_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/native/native_view_host_aura.cc
diff --git a/ui/views/controls/native/native_view_host_aura.cc b/ui/views/controls/native/native_view_host_aura.cc
index 81983112835ab9846685eb0c778325b485f03ec1..cfebcb3b7ec7c0ecb0c750301515aabe5eca1a61 100644
--- a/ui/views/controls/native/native_view_host_aura.cc
+++ b/ui/views/controls/native/native_view_host_aura.cc
@@ -35,6 +35,8 @@ void NativeViewHostAura::NativeViewDetaching(bool destroyed) {
if (!destroyed) {
host_->native_view()->RemoveObserver(this);
host_->native_view()->Hide();
+ if (host_->native_view()->parent())
+ host_->native_view()->parent()->RemoveChild(host_->native_view());
}
}
« no previous file with comments | « ui/views/controls/native/native_view_host.cc ('k') | ui/views/controls/native/native_view_host_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698