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

Unified Diff: chrome/browser/views/tab_contents/tab_contents_view_gtk.cc

Issue 510004: Fix crash/leak issue in native_view_host_gtk.cc. (Closed)
Patch Set: " Created 11 years 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 | « no previous file | views/controls/native/native_view_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/tab_contents/tab_contents_view_gtk.cc
diff --git a/chrome/browser/views/tab_contents/tab_contents_view_gtk.cc b/chrome/browser/views/tab_contents/tab_contents_view_gtk.cc
index db413973ff16f8cb4b2f0b8872a848088ab62b12..3ed8c75161049a09dc93a6fc39a8b3406830d5cb 100644
--- a/chrome/browser/views/tab_contents/tab_contents_view_gtk.cc
+++ b/chrome/browser/views/tab_contents/tab_contents_view_gtk.cc
@@ -150,6 +150,9 @@ void TabContentsViewGtk::CreateView(const gfx::Size& initial_size) {
set_delete_on_destroy(false);
WidgetGtk::Init(NULL, gfx::Rect(0, 0, initial_size.width(),
initial_size.height()));
+ // We need to own the widget in order to attach/detach the native view
+ // to container.
+ gtk_object_ref(GTK_OBJECT(GetNativeView()));
}
RenderWidgetHostView* TabContentsViewGtk::CreateViewForWidget(
@@ -413,4 +416,3 @@ gboolean TabContentsViewGtk::OnMouseMove(GtkWidget* widget,
tab_contents(), views::Screen::GetCursorScreenPoint(), true);
return FALSE;
}
-
« no previous file with comments | « no previous file | views/controls/native/native_view_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698