| 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);
|
| + }
|
| }
|
| }
|
|
|
|
|