Commit 67c253e7 authored by creis's avatar creis Committed by Commit bot

Allow out-of-process iframes to paint in --site-per-process.

This is a quick hack to make the initializeChildFrame message go through
RenderFrameProxy rather than RenderFrameImpl, since the RenderFrameHost
is deleted before it can receive the message.

We can clean up the hack by moving initializeChildFrame to
WebRemoteFrameClient and removing WebFrame::setIsRemote.

BUG=416102,407160
TEST=Simple OOPIF paints in --site-per-process.

Review URL: https://codereview.chromium.org/591503003

Cr-Commit-Position: refs/heads/master@{#295813}
parent 775670bf
......@@ -1065,8 +1065,17 @@ void RenderFrameImpl::OnSwapOut(int proxy_routing_id) {
// Let subframes know that the frame is now rendered remotely, for the
// purposes of compositing and input events.
if (!is_main_frame)
if (!is_main_frame) {
// TODO(creis): Remove setIsRemote and send initializeChildFrame from the
// RenderFrameProxy, since the RenderFrameHost may be deleted first. In
// the meantime, temporarily set this frame's proxy so that the message
// is sent via RenderFrameProxy.
// See http://crbug.com/416102.
DCHECK(!render_frame_proxy_);
set_render_frame_proxy(proxy);
frame_->setIsRemote(true);
set_render_frame_proxy(NULL);
}
// Replace the page with a blank dummy URL. The unload handler will not be
// run a second time, thanks to a check in FrameLoader::stopLoading.
......@@ -3182,7 +3191,7 @@ void RenderFrameImpl::forwardInputEvent(const blink::WebInputEvent* event) {
void RenderFrameImpl::initializeChildFrame(const blink::WebRect& frame_rect,
float scale_factor) {
Send(new FrameHostMsg_InitializeChildFrame(
render_frame_proxy_->Send(new FrameHostMsg_InitializeChildFrame(
routing_id_, frame_rect, scale_factor));
}
......
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