Fix missing return value

This commit is contained in:
David Kocik 2024-09-06 14:49:26 +02:00
parent ceb13b1faa
commit afd0e39ae9

View File

@ -133,13 +133,13 @@ void delete_cookies(wxWebView* webview, const std::string& url)
for (const auto& cookie : ptree.get_child("cookies")) {
std::string name = cookie.second.get<std::string>("name");
std::string domain = cookie.second.get<std::string>("domain");
//BOOST_LOG_TRIVIAL(debug) << "Deleting cookie: " << name << " : " << domain;
// Delete cookie by name and domain
wxString name_and_domain = GUI::format_wxstr(L"{\"name\": \"%1%\", \"domain\": \"%2%\"}", name, domain);
webView2->CallDevToolsProtocolMethod(L"Network.deleteCookies", name_and_domain.c_str(),
Microsoft::WRL::Callback<ICoreWebView2CallDevToolsProtocolMethodCompletedHandler>(
[](HRESULT errorCode, LPCWSTR resultJson) -> HRESULT { return S_OK; }).Get());
}
}
return S_OK;
}
).Get());