DescriptionRefactor postMessage for out-of-process iframes.
This CL moves cross-process postMessage plumbing from RenderView
to RenderFrame:
- The renderer-to-browser RouteMessageEvent message is now sent
through RenderFrameProxy rather than a swapped-out RenderView.
- The bulk of WebContentsImpl::RouteMessageEvent is moved into
RenderFrameProxyHost::RouteMessageEvent. Unfortunately, we still
need to call up to WebContents for dealing with <webview> and
on-demand creation of swapped-out RVs for the opener chain. This
will be cleaned up as part of https://crbug.com/225940.
- the browser-to-renderer PostMessageEvent message is now handled in
RenderFrameImpl::OnPostMessageEvent, instead of RenderViewImpl.
These changes make it possible to send messages between cross-process
subframes when in --site-per-process mode. This is exercised in a new
test, SitePerProcessBrowserTest.SubframePostMessage. More work will
be needed to support postMessages involving subframes in cross-process
openers (see https://crbug.com/225940 and https://crbug.com/423587).
With this change, the RFHM::SupportCrossProcessPostMessage test now
works in --site-per-process mode, so it is enabled on the Site
Isolation FYI bots.
BUG=389721
TBR=jam@chromium.org
Committed: https://crrev.com/e7da5a1508504fded712749adc154a69424afa9e
Cr-Commit-Position: refs/heads/master@{#324341}
Patch Set 1 #Patch Set 2 : #Patch Set 3 : Fix MimeHandlerViewTest.Iframe (no proxy when source is a subframe in cross-process window) #Patch Set 4 : Add legacy support for sending postMessages to Android WebView #Patch Set 5 : Misc cleanup #Patch Set 6 : Enable SupportCrossProcessPostMessage test on FYI bots #
Total comments: 9
Patch Set 7 : Rebase #Patch Set 8 : Update test comment #Patch Set 9 : Rebase #
Total comments: 4
Patch Set 10 : Charlie's comments; moving set_render_frame_proxy() up in OnSwapOut #
Total comments: 14
Patch Set 11 : Charlie's nits #Messages
Total messages: 15 (5 generated)
|