mirror of
https://github.com/aphrody-labs/cef.git
synced 2026-10-13 21:07:07 +00:00
When ConfigureNetworkContextParams is called during disk-backed profile initialization (via ProfileManager::CreateProfileAsync), the ChromeBrowserContext::profile_ member hasn't been set yet (the callback hasn't fired). This causes CefBrowserContext::FromBrowserContext to return nullptr, falling back to GetGlobalCookieableSchemes() instead of using the context's own cookieable_schemes settings. Fix by falling back to CefBrowserContext::FromCachePath when FromBrowserContext returns nullptr. The cache path mapping is registered in CefBrowserContext::Initialize() before CreateProfileAsync is called, so the path-based lookup succeeds during profile initialization. Add GetCookieManagerHttpOnDiskBlocked test to verify cookieable_schemes_exclude_defaults is respected for on-disk contexts.