Disallow lazy assignment of RenderWidgetHostImpl routing IDs.
Currently, when RenderFrameHosts need a RenderWidgetHost, the RWH is
lazily assigned a routing ID and surface ID. Unfortunately, this does
not work when binding a RenderWidgetHost to the main RenderFrameHost:
certain initialization paths require that the routing ID / surface be
pre-allocated, in order to service a sync IPC.
Rather than creating two distinct paths for binding a RenderWidgetHost
to a RenderFrameHost, just require all initialization paths to
pre-allocate the routing ID and surface.
BUG=419087
Review URL: https://codereview.chromium.org/1309233006
Cr-Commit-Position: refs/heads/master@{#346477}
diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h
index 91012555..42b9d06 100644
--- a/content/browser/web_contents/web_contents_impl.h
+++ b/content/browser/web_contents/web_contents_impl.h
@@ -485,10 +485,13 @@
int main_frame_route_id,
const ViewHostMsg_CreateWindow_Params& params,
SessionStorageNamespace* session_storage_namespace) override;
- void CreateNewWidget(int render_process_id,
- int route_id,
+ void CreateNewWidget(int32 render_process_id,
+ int32 route_id,
+ int32 surface_id,
blink::WebPopupType popup_type) override;
- void CreateNewFullscreenWidget(int render_process_id, int route_id) override;
+ void CreateNewFullscreenWidget(int32 render_process_id,
+ int32 route_id,
+ int32 surface_id) override;
void ShowCreatedWindow(int route_id,
WindowOpenDisposition disposition,
const gfx::Rect& initial_rect,
@@ -914,8 +917,9 @@
const base::string16& title);
// Helper for CreateNewWidget/CreateNewFullscreenWidget.
- void CreateNewWidget(int render_process_id,
- int route_id,
+ void CreateNewWidget(int32 render_process_id,
+ int32 route_id,
+ int32 surface_id,
bool is_fullscreen,
blink::WebPopupType popup_type);