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

Unified Diff: content/browser/frame_host/render_widget_host_view_guest.cc

Issue 2417693002: Allow MimeHandlerViewGuest be embedded inside OOPIFs (Closed)
Patch Set: Added a comment Created 4 years, 1 month 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
Index: content/browser/frame_host/render_widget_host_view_guest.cc
diff --git a/content/browser/frame_host/render_widget_host_view_guest.cc b/content/browser/frame_host/render_widget_host_view_guest.cc
index 2df2d5606cb8f5619d4082ca527f16c2ed1ee5a6..57890b189ebd483be7309817d8bb62d6c0fcec7f 100644
--- a/content/browser/frame_host/render_widget_host_view_guest.cc
+++ b/content/browser/frame_host/render_widget_host_view_guest.cc
@@ -253,6 +253,12 @@ void RenderWidgetHostViewGuest::Destroy() {
}
gfx::Size RenderWidgetHostViewGuest::GetPhysicalBackingSize() const {
+ // We obtain the reference to native view from the owner RenderWidgetHostView.
+ // If the guest is embedded inside a cross-process frame, it is possible to
+ // reach here after the frame is detached in which case there will be no owner
+ // view.
+ if (!GetOwnerRenderWidgetHostView())
+ return gfx::Size();
return RenderWidgetHostViewBase::GetPhysicalBackingSize();
}

Powered by Google App Engine
This is Rietveld 408576698