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

Unified Diff: chrome/browser/renderer_host/resource_message_filter_gtk.cc

Issue 2860024: GTK: add more syncronization to GtkNativeViewIdManager to avoid a crash. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: lock acquisition order Created 10 years, 6 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 | « no previous file | gfx/gtk_native_view_id_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_host/resource_message_filter_gtk.cc
diff --git a/chrome/browser/renderer_host/resource_message_filter_gtk.cc b/chrome/browser/renderer_host/resource_message_filter_gtk.cc
index 56b53fe7e8557911826fc1b3a5cfd113d46420b2..97e1c1426260bc94debe332993ad0d909ef412dd 100644
--- a/chrome/browser/renderer_host/resource_message_filter_gtk.cc
+++ b/chrome/browser/renderer_host/resource_message_filter_gtk.cc
@@ -70,6 +70,7 @@ void ResourceMessageFilter::DoOnGetWindowRect(gfx::NativeViewId view,
gfx::Rect rect;
XID window;
+ AutoLock lock(Singleton<GtkNativeViewManager>()->unrealize_lock());
if (Singleton<GtkNativeViewManager>()->GetXIDForId(&window, view)) {
if (window) {
int x, y;
@@ -109,13 +110,16 @@ void ResourceMessageFilter::DoOnGetRootWindowRect(gfx::NativeViewId view,
gfx::Rect rect;
XID window;
+ AutoLock lock(Singleton<GtkNativeViewManager>()->unrealize_lock());
if (Singleton<GtkNativeViewManager>()->GetXIDForId(&window, view)) {
if (window) {
const XID toplevel = GetTopLevelWindow(window);
- int x, y;
- unsigned width, height;
- if (x11_util::GetWindowGeometry(&x, &y, &width, &height, toplevel))
- rect = gfx::Rect(x, y, width, height);
+ if (toplevel) {
+ int x, y;
+ unsigned width, height;
+ if (x11_util::GetWindowGeometry(&x, &y, &width, &height, toplevel))
+ rect = gfx::Rect(x, y, width, height);
+ }
}
}
« no previous file with comments | « no previous file | gfx/gtk_native_view_id_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698