Commit c53d5cc7 authored by Tal Pressman's avatar Tal Pressman Committed by Commit Bot

[MBI] Change SetUpMojoIfNeeded to DCHECK.

The various AgentSchedulingGroupHost::Create* methods assume that the
caller already called InitProcessAndMojos, so there is no need to call
SetUpMojoIfNeeded from them. Instead, replace it with DCHECKs to make
sure the process is initialized and the mojo remote is bound.

Bug: 1111231
Change-Id: I95736b806adaabceae560131dd2a816dfc614f95
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2437993Reviewed-by: default avatarKouhei Ueno <kouhei@chromium.org>
Reviewed-by: default avatarAlex Moshchuk <alexmos@chromium.org>
Reviewed-by: default avatarDominic Farolino <dom@chromium.org>
Commit-Queue: Tal Pressman <talp@chromium.org>
Cr-Commit-Position: refs/heads/master@{#813051}
parent 656e27a9
...@@ -240,12 +240,14 @@ mojom::RouteProvider* AgentSchedulingGroupHost::GetRemoteRouteProvider() { ...@@ -240,12 +240,14 @@ mojom::RouteProvider* AgentSchedulingGroupHost::GetRemoteRouteProvider() {
} }
void AgentSchedulingGroupHost::CreateFrame(mojom::CreateFrameParamsPtr params) { void AgentSchedulingGroupHost::CreateFrame(mojom::CreateFrameParamsPtr params) {
SetUpMojoIfNeeded(); DCHECK(process_.IsInitializedAndNotDead());
DCHECK(mojo_remote_.is_bound());
mojo_remote_.get()->CreateFrame(std::move(params)); mojo_remote_.get()->CreateFrame(std::move(params));
} }
void AgentSchedulingGroupHost::CreateView(mojom::CreateViewParamsPtr params) { void AgentSchedulingGroupHost::CreateView(mojom::CreateViewParamsPtr params) {
SetUpMojoIfNeeded(); DCHECK(process_.IsInitializedAndNotDead());
DCHECK(mojo_remote_.is_bound());
mojo_remote_.get()->CreateView(std::move(params)); mojo_remote_.get()->CreateView(std::move(params));
} }
......
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