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:
parent
3ab91a45c9
commit
2de07250dc
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue