Commit 9dc63392 authored by James Cook's avatar James Cook Committed by Commit Bot

Add docs to a DCHECK in mojo bindings

Confusion about when to use Binding<> vs. BindingSet<> can cause an
attempt to bind to an interface that is already bound. There is an
existing DCHECK for this -- just add some docs to make that more clear.

Bug: 794581
Change-Id: I14194770190e90e80403c027a65e7820949331f8
Reviewed-on: https://chromium-review.googlesource.com/827903
Commit-Queue: James Cook <jamescook@chromium.org>
Reviewed-by: default avatarScott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#524260}
parent 3e2f9479
......@@ -87,7 +87,7 @@ void BindingStateBase::BindInternal(
bool has_sync_methods,
MessageReceiverWithResponderStatus* stub,
uint32_t interface_version) {
DCHECK(!router_);
DCHECK(!is_bound()) << "Attempting to bind interface that is already bound.";
auto sequenced_runner =
GetTaskRunnerToUseFromUserProvidedTaskRunner(std::move(runner));
......
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