ClientHandler::OnBeforeResourceLoad not called
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
cefclient.exe--url=googlechrome.github.io/samples/service-worker/basic
- ClientHandler::OnBeforeResourceLoad with http://googlechrome.github.io/samples/service-worker/basic is called
-
In the URL bar type
google.com
and hit enter -
In the URL bar type
googlechrome.github.io/samples/service-worker/basic
and hit enter- ClientHandler::OnBeforeResourceLoad is NOT called for the main frame URL load
Tested version: 4606
Comments (7)
-
reporter -
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. -
reporter - attached request_handler_map.diff
-
Does this reproduce with 4577 or 4515 branch? Thanks.
-
reporter It reproduces on 4430 but not on 4147 (these are the versions I have easy access to).
-
- changed component to Framework-NeedsUserFeedback
Does this reproduce with currently supported versions?
-
- changed status to wontfix
Marking as WontFix for now. If the problem reproduces with currently supported versions then we can reopen.
- Log in to comment
I’ve debugged this a little and I see the wrong renderframehostid passed into the
GetHandler()
call in resource_request_handler_wrapper.cc:[0901/151232.253:WARNING:resource_request_handler_wrapper.cc(1072)] Missing context handler for request https://googlechrome.github.io/samples/service-worker/basic/index.html 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?