зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1262067 - Call Init() instead of using profile-after-changed observer. r=eeejay
OSX speech synthesis is broken after landing bug 1254378. By this bug, this service is never called on start up. Although this observer is for start up time regression, it is unnecessary now. So it should be initialized at GetInstance() instead. MozReview-Commit-ID: DTaXinCxkWR --HG-- extra : rebase_source : db81103ab51d42f47d45e683ece1f5aa3361d73b
This commit is contained in:
Родитель
ca7a35732f
Коммит
86ad6a62bb
|
@ -421,9 +421,6 @@ NS_IMETHODIMP
|
|||
OSXSpeechSynthesizerService::Observe(nsISupports* aSubject, const char* aTopic,
|
||||
const char16_t* aData)
|
||||
{
|
||||
if (!strcmp(aTopic, "profile-after-change")) {
|
||||
Init();
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -436,7 +433,11 @@ OSXSpeechSynthesizerService::GetInstance()
|
|||
}
|
||||
|
||||
if (!sSingleton) {
|
||||
sSingleton = new OSXSpeechSynthesizerService();
|
||||
RefPtr<OSXSpeechSynthesizerService> speechService =
|
||||
new OSXSpeechSynthesizerService();
|
||||
if (speechService->Init()) {
|
||||
sSingleton = speechService;
|
||||
}
|
||||
}
|
||||
return sSingleton;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче