Page 1 of 1

Setcookie does not work in Version (90.0.4430.212)

PostPosted: Thu Dec 02, 2021 7:58 pm
by jcij
Here are my ways to Setcookie .
Method 1:
Code: Select all
CefRefPtr<CefCookieManager>manager = CefCookieManager::GetGlobalManager(nullptr);
CefPostTask(TID_IO, CefCreateClosureTask(base::Bind(base::IgnoreResult(&CefCookieManager::SetCookie), manager, url, cookie, callback)));

Method 2:
Code: Select all
CefRefPtr<CefWaitableEvent> event = CefWaitableEvent::CreateWaitableEvent(true, false);
bool result = manager->SetCookie(url, cookie, new CefSetCookieCallback(event));
event->Wait();


Both of the above can take effect on Version (76.0.3809.132),but not on Version (90.0.4430.212).