ClientHandler::OnBeforeResourceLoad not called

Issue #3175 wontfix
Alfred Reynolds created an issue

When navigating back to a page that had been using a service worker you do not get the OnBeforeResourceLoad callback from the MAIN_FRAME load.

Steps to reproduce:

  • Load

  • In the URL bar type and hit enter

  • In the URL bar type hit enter

    • ClientHandler::OnBeforeResourceLoad is NOT called for the main frame URL load

Tested version: 4606

Comments (7)

  1. Alfred Reynolds reporter

    I’ve debugged this a little and I see the wrong renderframehostid passed into the GetHandler() call in
    [0901/] Missing context handler for request ID: GlobalRenderFrameHostId(4, -2)
    The init_state_->iothread_state_ object here has an entry for the previous network load of the page but not the current one.
    My theory is the wrong mojo interface is getting this call, perhaps due to a resource leak?

  2. Alfred Reynolds reporter

    I have a local workaround by changing the GetHandler() call in request_context_handler_map.cpp to always return the first entry in the map if an exact frame match isn’t needed. This only works for our use case because we don’t specialize our content handler logic per browser.

  3. Alfred Reynolds reporter

    It reproduces on 4430 but not on 4147 (these are the versions I have easy access to).

  4. Marshall Greenblatt

    Marking as WontFix for now. If the problem reproduces with currently supported versions then we can reopen.

  5. Log in to comment