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:
Makoto Kato 2016-04-05 18:25:26 +09:00
Родитель ca7a35732f
Коммит 86ad6a62bb
1 изменённых файлов: 5 добавлений и 4 удалений

Просмотреть файл

@ -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;
}