New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 789816 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Jan 8
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

ReportBadMessageCallback should invoke the connection error handler?

Project Member Reported by leon....@intel.com, Nov 30 2017

Issue description

Currently, for all mojo::[Strong][Associated]Binding[Set], when received a bad message, their ReportBadMessageCallback will just close current dispatch connection, but won't invoke the connection error handler to notify user about this.

The question is: should we consider such disconnection scenario caused by receiving a bad message as one type of connection error and fire the connection error handler for it?

This issue comes up from https://chromium-review.googlesource.com/c/chromium/src/+/778360/13/mojo/public/cpp/bindings/binding_set.h#188
 

Comment 1 by roc...@chromium.org, Nov 30 2017

I am torn on this. On one hand, the binding user is already aware of the
failure condition since they reported it. We don't invoke the error handler
when e.g. the binding user explicitly closes the binding.

On the other hand, ReportBadMessage is effectively a form of validation
failure, and all validation failures should invoke the error handler.

Leaning towards changing the behavior as proposed, under the condition that
the error handler be invoked asynchronously by the binding object in this
case.

Comment 2 by yzshen@chromium.org, Nov 30 2017

Hi, Ken.

Given it is an explicit action by the binding user which guarantees to close the Binding object, I slightly lean towards keeping the current behavior, and documenting it more clearly.

I feel that it is a little different from other standard validation errors in that the standard errors are automatically handled, without an action from the user. So we need a way to notify the user in that case.

WDYT? Thanks!
Cc: -roc...@chromium.org rockot@google.com
Status: WontFix (was: Untriaged)
Since this argument hasn't come up again, closing the ticket and will reopen the discussion if necessary.

Sign in to add a comment