I have a problem with CefAuthCallback (from CefRequestHandler::GetAuthCerdentials).
I pass the CefAuthCallback pointer to the my class instance, retrieve proxy user and password through javascript and call auth_callback->Continue(...) --> I get segfault.
My workflow:
GetAuthCerdentials()
- - On GetAuthcerdentials I check if it's a proxy auth request, if NO return false, If YES just continue.
- Save the AuthCallback pointer (to the own class instance)
- Call frame->LoadURL("client://working_directory/pages/proxy.html")
- - proxy.html is a static web page which send user cerdentials througth Javascript async callback to the browser process.
- async callback is registred before LoadURL is called (in stage "save the AuthCallback" --> the auth callback is part of class instance which is part of Callbac router which is responsible to solve JS async callbacks from browser --> auth_callback->Continue()|Cancel() is called from UI thread of Browser process).
OnQuery (CefMessageRouterBrowserSide::Handler)
- - Receive callback from javascript
- check if the callback has a route in the router
- pick up the callback from the router
- call the callback (the callback contains auth_callback pointer which was pass in GetAuthCerdentials())
- call auth_callback->Continue() (or any other action like auth_callback = nullptr) --> segfault
I am using CEF in verison 3.3071.1646.gbb29707 (but it happends in any other CEF so I think it's not a bug...)
I really do not know what i am doing wrong? Can anyone help me please .
Thanks,
John