BackgroundFetchRegistrationNotifier uses set_connection_error_handler to try and detect when the Javascript object or Renderer hosting it closes.
This can detect when there's an error in the mojo binding but won't detect binding.Close(). This means that we will leak the object in many non-error cases.
One possibility would be to post a message expecting a response and never deliver that response. When the binding closes, this will trigger an error.
Alternatively there may be some other way to detect non-exceptional binding closes.
Comment 1 by peter@chromium.org
, Oct 31 2017