Can't edit credit card fields in my app with recent CEF

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.

Re: Can't edit credit card fields in my app with recent CEF

Postby Astaroth » Thu Jan 16, 2020 5:57 pm

I think I've tracked the problem down. The HTTP request for the html file dies in CefLoadHandler::OnLoadError() with ERR_FAILED if I have the following code:

void CMyCefRenderProcessHandler::OnContextCreated(
CefRefPtr<CefBrowser> pBrowser,
CefRefPtr<CefFrame> pFrame,
CefRefPtr<CefV8Context> pContext) /*override*/
{
CEF_REQUIRE_RENDERER_THREAD();
pBrowser->GetMainFrame()->GetURL();
}

Adding an if (pBrowser->GetMainFrame()) check before the GetURL() call fixes the problem.

It looks pBrowser->GetMainFrame() can be nullptr, or is more often nullptr, in CEF 79. I didn't see that with CEF 77.
Astaroth
Techie
 
Posts: 35
Joined: Tue Apr 23, 2019 6:23 pm

Previous

Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 41 guests