New issue
Advanced search Search tips

Issue 681172 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

WebBluetoothServiceImpl::CrashRendererAndClosePipe should use mojo::ReportBadMessage

Project Member Reported by dcheng@chromium.org, Jan 13 2017

Issue description

In the browser process, this will kill the bad process. I believe this will automatically disconnect the relevant message pipe as well (+rockot to confirm this).

I think we should probably be preferring this in Mojo code over the legacy APIs.
 

Comment 1 by roc...@chromium.org, Jan 13 2017

Yes if a process dies any message pipes connected to it in other processes
will eventually signal peer closure.

Comment 2 by ortuno@chromium.org, Jan 16 2017

I'm a bit concerned about the "eventually" part. If say we call mojo::ReportBadMessage and subsequently drop the callback will we get any errors?

Comment 3 by roc...@chromium.org, Jan 17 2017

When you report a bad message for a request that expects a response, you
should also either invoke the response callback anyway, or close the
binding endpoint which received the request. If the endpoint is closed,
it's safe to drop callbacks.

Comment 4 by scheib@chromium.org, Jan 17 2017

Blocking: 597053

Comment 5 by dcheng@chromium.org, Jan 17 2017

rockot@, is it possible for ReportBadMesage to just close the message pipe in question when this happens? Or does mojo not have enough information on the stack to make that determination?

Comment 6 by roc...@chromium.org, Jan 17 2017

There isn't enough information in the stack, and it would also be weird
since the pipe is ultimately owned by a single ScopedMessagePipeHandle,
which is in turn owned at the bindings layer. Bad message reporting happens
below the bindings layer. We could always have ReportBadMessage take a
ScopedMessagePipeHandle and require the underlying C API to take a handle
as well. But then it's easy for users to unintentionally pass the wrong
pipe.

Comment 7 by ortuno@chromium.org, Feb 13 2017

Status: Available (was: Untriaged)
Blocking: -597053
Cc: -scheib@chromium.org
Cc: -roc...@chromium.org rockot@google.com

Sign in to add a comment