Skip to content
Commit d1432590 authored by Bryant Chandler's avatar Bryant Chandler Committed by Chromium LUCI CQ
Browse files

Reland "[fuchsia] Add basic implementations of fidl::AsyncEventHandler"

This is a reland of commit f412da95

Reason for reland: The original used `DLOG`, so it failed to log
the message that the tests are waiting for in CI because the
`DCHECK` is turned off. On thinking about this again it's
probably more appropriate to `LOG` anyway, so it's changed to
that for the reland.

The reland also adds `FidlErrorEventProcessExiter`, which
covers another common case in which the response to an
unexpected disconnect is to log and exit the process.

Original change's description:
> [fuchsia] Add basic implementations of fidl::AsyncEventHandler
>
> HLCPP bindings had a `set_error_handler` method on the `InterfacePtr`
> but that's no longer available for `fidl::Client`. Instead, it takes
> a `fidl::AsyncEventHandler` that has an `on_fidl_error` method as
> well as methods for other events available on the `Protocol`. The new
> API shape creates quite a bit of extra boilerplate for just adding a
> closure or logging on fidl error (when a service is disconnected).
>
> This CL adds two basic implementations, one that just logs an error,
> and another that takes a callback.
>
> Bug: 1351487
> Change-Id: If6ba87f24751af8daafb54904652164eb47d9875
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4325064


> Reviewed-by: default avatarGuocheng Wei <guochengwei@chromium.org>
> Reviewed-by: default avatarDavid Dorwin <ddorwin@chromium.org>
> Commit-Queue: Bryant Chandler <bryantchandler@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1118929}

Bug: 1351487
Change-Id: I16f360cbe42e13346af994725668644c9b5bedc5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4352568


Reviewed-by: default avatarDavid Dorwin <ddorwin@chromium.org>
Commit-Queue: Bryant Chandler <bryantchandler@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1120055}
parent 928dca57
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment