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

Unified Diff: chrome/renderer/chrome_content_renderer_client.cc

Issue 120263006: Avoid any race conditions with RenderFrame getting notified that it's prerendering. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync Created 6 years, 11 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: chrome/renderer/chrome_content_renderer_client.cc
===================================================================
--- chrome/renderer/chrome_content_renderer_client.cc (revision 243063)
+++ chrome/renderer/chrome_content_renderer_client.cc (working copy)
@@ -365,6 +365,17 @@
#if defined(ENABLE_PLUGINS)
new PepperHelper(render_frame);
#endif
+
+ // TODO(jam): when a RenderFrame is per WebFrame, this can be simplified by
+ // getting a RenderFrame's WebFrame and calling its parent() method.
+ if (render_frame->GetRenderView()->GetMainRenderFrame() != render_frame) {
+ // Avoid any race conditions from having the browser tell subframes that
+ // they're prerendering.
+ if (prerender::PrerenderHelper::IsPrerendering(
+ render_frame->GetRenderView()->GetMainRenderFrame())) {
+ new prerender::PrerenderHelper(render_frame);
+ }
+ }
}
void ChromeContentRendererClient::RenderViewCreated(
« 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