Yes. That's the callback I was referring to.
Unfortunately, there seems to be additional issues in that app.
I tested my app again with the old cookie path initialization without a callback.
When I call "cef_cookie_manager_get_global_manager" inside CefBrowserProcessHandler.OnContextInitialized without a callback and try to set a new path for the cookies I get a crash with this trace :
- Code: Select all
ntoskrnl.exe!KiSwapContext+0x26
ntoskrnl.exe!KiSwapThread+0x266
ntoskrnl.exe!KiCommitThreadWait+0x1df
ntoskrnl.exe!KeWaitForSingleObject+0x393
ntoskrnl.exe!DbgkpQueueMessage+0x279
ntoskrnl.exe!DbgkpSendApiMessage+0x44
ntoskrnl.exe!DbgkForwardException+0xeb
ntoskrnl.exe!KiDispatchException+0x24a
ntoskrnl.exe!CommonDispatchException+0x4a
ntoskrnl.exe!Kei386EoiHelper+0x1de
libcef.dll!network::CookieManager::AddGlobalChangeListener+0x60
libcef.dll!network::mojom::CookieManagerProxy_AddGlobalChangeListener_Message::Dispatch+0x2b
libcef.dll!network::mojom::CookieManagerStubDispatch::Accept+0x623
libcef.dll!network::mojom::CookieManagerStub<mojo::RawPtrImplRefTraits<network::mojom::CookieManager> >::Accept+0x13
libcef.dll!mojo::internal::MultiplexRouter::ProcessIncomingMessage+0x17d
libcef.dll!mojo::internal::MultiplexRouter::Accept+0xae
libcef.dll!mojo::Connector::ReadSingleMessage+0xf1
libcef.dll!mojo::Connector::ReadAllAvailableMessages+0x48
libcef.dll!mojo::Connector::OnHandleReadyInternal+0x23
libcef.dll!base::internal::Invoker<base::internal::BindState<void (network::mojom::CookieManager_DeleteCookies_ProxyToResponder::*)(unsigned int) __attribute__((thiscall)),std::unique_ptr<network::mojom::CookieManager_DeleteCookies_ProxyToResponder,std::d
libcef.dll!mojo::SimpleWatcher::DiscardReadyState+0xf
libcef.dll!base::internal::Invoker<base::internal::BindState<void (*)(const base::RepeatingCallback<void (unsigned int)> &, unsigned int, const mojo::HandleSignalsState &),base::RepeatingCallback<void (unsigned int)> >,void (unsigned int, const mojo::Hand
libcef.dll!mojo::SimpleWatcher::OnHandleReady+0x89
libcef.dll!base::internal::Invoker<base::internal::BindState<void (mojo::SimpleWatcher::*)(int, unsigned int, const mojo::HandleSignalsState &) __attribute__((thiscall)),base::WeakPtr<mojo::SimpleWatcher>,int,unsigned int,mojo::HandleSignalsState>,void ()
libcef.dll!base::debug::TaskAnnotator::RunTask+0xe2
libcef.dll!base::MessageLoop::RunTask+0x1be
libcef.dll!base::MessageLoop::DeferOrRunPendingTask+0x53
libcef.dll!base::MessageLoop::DoWork+0xd3
libcef.dll!base::MessagePumpForIO::DoRunLoop+0x135
libcef.dll!base::MessagePumpWin::Run+0x41
libcef.dll!base::MessageLoop::Run+0x1f
libcef.dll!base::RunLoop::Run+0x2e
libcef.dll!base::Thread::Run+0xb
libcef.dll!content::BrowserProcessSubThread::IOThreadRun+0x24
libcef.dll!base::Thread::ThreadMain+0x14d
libcef.dll!base::`anonymous namespace'::ThreadFunc+0xbb
kernel32.dll!BaseThreadInitThunk+0xe
ntdll.dll!__RtlUserThreadStart+0x70
ntdll.dll!_RtlUserThreadStart+0x1b
Please, post your trace when you fix your Visual Studio issues. Perhaps we are experiencing a different issue.
I forgot to tell that I fixed this by moving the cookie path initialization code to a different thread. Now I get the global cookie manager with a callback inside a custom thread while CEF continues initializing.