mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Restore the async CreateBrowser behavior that existed prior to commit 691c9c2
because executing synchronously (for example, from inside OnContextInitialized)
causes issues on MacOS and possibly other platforms.
This commit is contained in:
@@ -88,7 +88,12 @@ bool CefBrowserHost::CreateBrowser(
|
||||
|
||||
// Wait for the browser context to be initialized before creating the browser.
|
||||
request_context_impl->ExecuteWhenBrowserContextInitialized(base::BindOnce(
|
||||
[](std::unique_ptr<CreateBrowserHelper> helper) { helper->Run(); },
|
||||
[](std::unique_ptr<CreateBrowserHelper> helper) {
|
||||
// Always execute asynchronously to avoid potential issues if we're
|
||||
// being called synchronously during app initialization.
|
||||
CEF_POST_TASK(CEF_UIT, base::BindOnce(&CreateBrowserHelper::Run,
|
||||
std::move(helper)));
|
||||
},
|
||||
std::move(helper)));
|
||||
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user