mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Handle case where IO thread is not yet running, in C67 this results
in a hard crash refs: https://chromium-review.googlesource.com/c/chromium/src/+/973556
This commit is contained in:
committed by
Aleksei Kuzmin
parent
0b2b44becf
commit
cad1d9aa9c
@@ -39,7 +39,8 @@ void SetApplicationLocaleOnIOThread(const std::string& locale) {
|
||||
void BrowserClient::SetApplicationLocale(const std::string& locale) {
|
||||
DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
||||
|
||||
if (!BrowserThread::PostTask(
|
||||
if (!BrowserThread::IsThreadInitialized(BrowserThread::IO) ||
|
||||
!BrowserThread::PostTask(
|
||||
BrowserThread::IO, FROM_HERE,
|
||||
base::BindOnce(&SetApplicationLocaleOnIOThread, locale))) {
|
||||
g_io_thread_application_locale.Get() = locale;
|
||||
|
||||
Reference in New Issue
Block a user