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:
parent
0b2b44becf
commit
cad1d9aa9c
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue