Commit 6c80f554 authored by kouhei's avatar kouhei Committed by Commit Bot

Bug fix: RenderFrameProxyHost should AddRoute() on AgentScheduingGroupHost

Before this CL, RenderFrameProxyHost registered itself to per-process IPC
channel. This is wrong, since RenderFrameProxy is bound to an
AgentSchedulingGroup.

This ends up AgentSchedulingGroupHost being queried `GetRoute()` to
associate interface for the RenderFrameProxyHost, but fails, since it
was never registered.

This CL fixes the issue by correcting RenderFrameProxyHost to register
its route to AgentSchedulingGroupHost.

This behavior will be enforced by a DCHECK which to be introduced in
an upcoming CL.

Bug: 1111231
Change-Id: I135547ccb2d30268e84d9f3e6b054b6b2e9069f7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2494285
Auto-Submit: Kouhei Ueno <kouhei@chromium.org>
Reviewed-by: default avatarTal Pressman <talp@chromium.org>
Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Commit-Queue: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#820166}
parent f8b0c3b3
......@@ -106,7 +106,7 @@ RenderFrameProxyHost::RenderFrameProxyHost(
frame_tree_node_(frame_tree_node),
render_frame_proxy_created_(false),
render_view_host_(std::move(render_view_host)) {
GetProcess()->AddRoute(routing_id_, this);
GetAgentSchedulingGroup().AddRoute(routing_id_, this);
CHECK(
g_routing_id_frame_proxy_map.Get()
.insert(std::make_pair(
......@@ -157,7 +157,7 @@ RenderFrameProxyHost::~RenderFrameProxyHost() {
// destructor. This line can be removed.
render_view_host_.reset();
GetProcess()->RemoveRoute(routing_id_);
GetAgentSchedulingGroup().RemoveRoute(routing_id_);
g_routing_id_frame_proxy_map.Get().erase(
RenderFrameProxyHostID(GetProcess()->GetID(), routing_id_));
g_token_frame_proxy_map.Get().erase(frame_token_);
......
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