Commit 364cc9e9 authored by Erik Chen's avatar Erik Chen Committed by Commit Bot

Update template message for destruction of mojo callback.

The template message implies that the callback must be run before destroyed.
This has caused confusion for me, and others, e.g. see
https://bugs.chromium.org/p/chromium/issues/detail?id=788658#c4. Instead, the
error should state that either: the callback should be run before it is
destroyed, or else it should be destroyed after the pipe is closed.

Bug: 
Change-Id: Iad5a75332fe2284538ef1d428a6e4572fdc2b551
Reviewed-on: https://chromium-review.googlesource.com/794571Reviewed-by: default avatarKen Rockot <rockot@chromium.org>
Commit-Queue: Erik Chen <erikchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#519939}
parent ad24e5b6
......@@ -216,7 +216,9 @@ class {{class_name}}_{{method.name}}_ProxyToResponder {
// Is the Service destroying the callback without running it
// and without first closing the pipe?
responder_->DCheckInvalid("The callback passed to "
"{{class_name}}::{{method.name}}() was never run.");
"{{class_name}}::{{method.name}}() was never run. It should either "
"be run before destruction, or else destroyed after first closing "
"the pipe.");
}
#endif
// If the Callback was dropped then deleting the responder will close
......
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