Index: content/browser/renderer_host/render_view_host_impl.cc |
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc |
index 0a6e5928d58fcdcf907ae115fe277d67d8a62840..d73d075a2b3f26cc10a56a55bb5c91705f40110e 100644 |
--- a/content/browser/renderer_host/render_view_host_impl.cc |
+++ b/content/browser/renderer_host/render_view_host_impl.cc |
@@ -25,6 +25,7 @@ |
#include "base/values.h" |
#include "cc/base/switches.h" |
#include "content/browser/bad_message.h" |
+#include "content/browser/browser_plugin/browser_plugin_guest.h" |
#include "content/browser/child_process_security_policy_impl.h" |
#include "content/browser/dom_storage/session_storage_namespace_impl.h" |
#include "content/browser/frame_host/frame_tree.h" |
@@ -304,6 +305,17 @@ bool RenderViewHostImpl::CreateRenderView( |
if (max_page_id > -1) |
next_page_id = max_page_id + 1; |
+ int proxy_route_id_to_send = proxy_route_id; |
+ |
+ // Do not instruct the view to create a proxy if this is a swapped out |
+ // RenderView for an inner WebContents. |
+ // The proxy will be created using RFHM::SwapFrameWithProxy(). |
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
+ switches::kSitePerProcess) && |
+ BrowserPluginGuest::IsGuest(this)) { |
+ proxy_route_id_to_send = MSG_ROUTING_NONE; |
+ } |
+ |
ViewMsg_New_Params params; |
params.renderer_preferences = |
delegate_->GetRendererPrefs(GetProcess()->GetBrowserContext()); |
@@ -321,7 +333,7 @@ bool RenderViewHostImpl::CreateRenderView( |
params.opener_route_id = opener_route_id; |
params.swapped_out = !is_active_; |
params.replicated_frame_state = replicated_frame_state; |
- params.proxy_routing_id = proxy_route_id; |
+ params.proxy_routing_id = proxy_route_id_to_send; |
params.hidden = is_hidden(); |
params.never_visible = delegate_->IsNeverVisible(); |
params.window_was_created_with_opener = window_was_created_with_opener; |