Skip to content
  • sammc's avatar
    Remove the MessageLoop::DestructionObserver from mojo bindings. · 14e09ca4
    sammc authored
    Mojo connection error handlers running during browser shutdown have been
    a cause of several crashes due to the error handlers running after their
    dependency (e.g. a KeyedService or a RenderProcessHost) has shut down.
    From a brief survey of users of StrongBinding, none appear to perform
    any tear-down that is necessary during process shutdown. Further, the
    vast majority of threads (and thread pools) run for close to the life of
    the process, so any these connection error handlers will generally only
    be triggered during shutdown. Thus, in production this causes slower,
    less-stable browser shutdowns without any real benefit.
    
    Additionally, SequencedTaskRunner does not have a MessageLoop and is not
    expected to support a similar destruction observer. Thus, to improve
    compatibility with future support for running mojo bindings on
    SequencedTaskRunners, this removes MessageLoop::DestructionObserver from
    mojo bindings.
    
    BUG=678155
    CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
    
    Review-Url: https://codereview.chromium.org/2633053002
    Cr-Commit-Position: refs/heads/master@{#447085}
    14e09ca4