• Wez's avatar
    [fuchsia] Check that controller is bound before sending OnTerminated. · ea4ddecc
    Wez authored
    |controller_binding_| may be unbound during WebComponent teardown,
    causing a FIDL write error to be logged, if:
    - The component was started without a ComponentController request.
    - The ComponentController was previously Detach()ed and closed.
    - The WebComponent is tearing down because the ComponentController
      channel was closed by the client.
    
    The OnTerminated event is now dispatched only if |controller_binding_|
    is still bound.
    
    Bug: 1157638
    Change-Id: Idd15e6cb07a98a27a56d3b5a9f8c1c611b04c816
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2584849
    Auto-Submit: Wez <wez@chromium.org>
    Commit-Queue: David Dorwin <ddorwin@chromium.org>
    Reviewed-by: default avatarDavid Dorwin <ddorwin@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#836171}
    ea4ddecc
web_component.cc 6.71 KB