Commit e5e10b54 authored by mmocny@chromium.org's avatar mmocny@chromium.org

Fix for bug with pages loading in a background tab.

Occasionally, chrome would segfault when a background tab was loading.  I was running into this issue quite often when testing opening many tabs.


BUG=None
TEST=None


Review URL: http://codereview.chromium.org/7978011

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102123 0039d316-1c4b-4281-b951-d872f2087c98
parent ede38d10
......@@ -985,9 +985,13 @@ void RenderWidgetHostViewViews::GetDefaultScreenInfo(
void RenderWidgetHostViewViews::GetScreenInfo(WebKit::WebScreenInfo* results) {
#if !defined(USE_AURA)
views::Widget* widget = GetWidget() ? GetWidget()->GetTopLevelWidget() : NULL;
if (widget)
if (widget && widget->GetNativeView())
content::GetScreenInfoFromNativeWindow(widget->GetNativeView()->window,
results);
else
RenderWidgetHostView::GetDefaultScreenInfo(results);
#else
RenderWidgetHostView::GetDefaultScreenInfo(results);
#endif
}
......
......@@ -171,11 +171,13 @@ const Widget* NativeWidgetViews::GetWidget() const {
}
gfx::NativeView NativeWidgetViews::GetNativeView() const {
return GetParentNativeWidget()->GetNativeView();
return GetParentNativeWidget() ?
GetParentNativeWidget()->GetNativeView() : NULL;
}
gfx::NativeWindow NativeWidgetViews::GetNativeWindow() const {
return GetParentNativeWidget()->GetNativeWindow();
return GetParentNativeWidget() ?
GetParentNativeWidget()->GetNativeWindow() : NULL;
}
Widget* NativeWidgetViews::GetTopLevelWidget() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment