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: content/renderer/render_frame_impl.cc

Issue 1973133002: ✀ Remove postMessage plumbing for swappedout:// ✀ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase to use std::move instead of release(). Created 4 years, 7 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 | « content/renderer/render_frame_impl.h ('k') | content/renderer/render_frame_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 79bdb6c8e4208d92625cf513e9fa736178563dc3..ae5e079270b43573834d673984803494d88676da 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -1004,7 +1004,6 @@ RenderFrameImpl::RenderFrameImpl(const CreateParams& params)
in_frame_tree_(false),
render_view_(params.render_view->AsWeakPtr()),
routing_id_(params.routing_id),
- render_frame_proxy_(NULL),
is_detaching_(false),
proxy_routing_id_(MSG_ROUTING_NONE),
#if defined(ENABLE_PLUGINS)
@@ -1573,11 +1572,6 @@ void RenderFrameImpl::OnSwapOut(
if (is_main_frame_)
render_view_->SetSwappedOut(true);
- // Set the proxy here, since OnStop() below could cause an onload event
- // handler to execute, which could trigger code such as
- // willCheckAndDispatchMessageEvent() that needs the proxy.
- set_render_frame_proxy(proxy);
-
// Transfer settings such as initial drawing parameters to the remote frame,
// if one is created, that will replace this frame.
if (!is_main_frame_)
@@ -4150,34 +4144,6 @@ blink::WebMIDIClient* RenderFrameImpl::webMIDIClient() {
return midi_dispatcher_;
}
-bool RenderFrameImpl::willCheckAndDispatchMessageEvent(
- blink::WebLocalFrame* source_frame,
- blink::WebFrame* target_frame,
- blink::WebSecurityOrigin target_origin,
- blink::WebDOMMessageEvent event) {
- DCHECK(!frame_ || frame_ == target_frame);
-
- // TODO(alexmos, nasko): When swapped-out:// disappears, this should be
- // cleaned up so that RenderFrameProxy::postMessageEvent is the only path for
- // cross-process postMessages.
-
- // It is possible to get here on a swapped-out frame without a
- // |render_frame_proxy_|. This happens when:
- // - This process only has one active RenderView and is about to go away
- // (e.g., due to cross-process navigation).
- // - The top frame has a subframe with an unload handler.
- // - The subframe sends a postMessage to the top-level frame in its unload
- // handler.
- // See https://crbug.com/475651 for details. We return false here, since we
- // don't want to deliver the message to the new process in this case.
- if (!render_frame_proxy_)
- return false;
-
- render_frame_proxy_->postMessageEvent(
- source_frame, render_frame_proxy_->web_frame(), target_origin, event);
- return true;
-}
-
blink::WebString RenderFrameImpl::userAgentOverride() {
if (!render_view_->webview() || !render_view_->webview()->mainFrame() ||
render_view_->renderer_preferences_.user_agent_override.empty()) {
« no previous file with comments | « content/renderer/render_frame_impl.h ('k') | content/renderer/render_frame_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698