CefCookieManager::GetGlobalManager() kills render process

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

CefCookieManager::GetGlobalManager() kills render process

Postby HarmlessDave » Fri May 15, 2015 4:49 pm

Is CefCookieManager::GetGlobalManager() only supposed to be called from the browser process? This is 3.2272.1998 and I am not creating my own CefCookieManager it's the default one. Cookie handling is working.

When I do this in a render process function called from ::OnLoadingStateChange when isLoading==0, the process dies before the second log entry is written:

Code: Select all
 LogTRACE0("VisiteCookiesAsync");
CefRefPtr<CefCookieManager> manager = CefCookieManager::GetGlobalManager();
LogTRACE("manager = %u", manager);

So do I need to send a task to the browser process, asking it to run my CookieVisitor?

I'm just trying to read the current set of cookies set for the domain for the current browser object, so if there is an easier way to do that from OnLoadingStateChange() and OnBeforeNavigation() than running a CookieVisitor that would be even better.

I checked CefClient but didn't see any examples of reading cookies.
HarmlessDave
Expert
 
Posts: 370
Joined: Fri Jul 11, 2014 2:02 pm

Re: CefCookieManager::GetGlobalManager() kills render proces

Postby HarmlessDave » Fri May 15, 2015 5:51 pm

The code runs without problems from the browser thread, and I get log messages from Visit for each cookie found.

So I think the API doc is incomplete, it should say "The methods of this class may be called on any thread [ in the browser process ] unless otherwise indicated. "

That might be obvious to long-time CEF users but it wasn't to me :)
HarmlessDave
Expert
 
Posts: 370
Joined: Fri Jul 11, 2014 2:02 pm


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 110 guests