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

Unified Diff: content/browser/web_contents/web_contents_view_aura.cc

Issue 14113034: Check for guest renderer before casting to RenderWidgetHostViewAura in (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch Created 7 years, 8 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/web_contents/web_contents_view_aura.cc
diff --git a/content/browser/web_contents/web_contents_view_aura.cc b/content/browser/web_contents/web_contents_view_aura.cc
index 582d47335df6b639630fda8a4c6b8ad56ea56c21..2446151fbe74df05ec38b847cde74acee719ea8d 100644
--- a/content/browser/web_contents/web_contents_view_aura.cc
+++ b/content/browser/web_contents/web_contents_view_aura.cc
@@ -97,8 +97,12 @@ bool ShouldNavigateBack(const NavigationController& controller,
RenderWidgetHostViewAura* ToRenderWidgetHostViewAura(
RenderWidgetHostView* view) {
- if (RenderViewHostFactory::has_factory())
+ if (!view || RenderViewHostFactory::has_factory())
return NULL; // Can't cast to RenderWidgetHostViewAura in unit tests.
+ RenderProcessHostImpl* process = static_cast<RenderProcessHostImpl*>(
+ view->GetRenderWidgetHost()->GetProcess());
+ if (process->IsGuest())
+ return NULL;
return static_cast<RenderWidgetHostViewAura*>(view);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698