зеркало из https://github.com/mozilla/gecko-dev.git
Bug 918989 - Have nsPicoService only start in main gecko process. r=smaug
This commit is contained in:
Родитель
1069599b5b
Коммит
c1a8a104d4
|
@ -34,7 +34,7 @@ static const mozilla::Module::ContractIDEntry kContracts[] = {
|
|||
};
|
||||
|
||||
static const mozilla::Module::CategoryEntry kCategories[] = {
|
||||
{ "app-startup", "Pico Speech Synth", "service," PICOSERVICE_CONTRACTID },
|
||||
{ "profile-after-change", "Pico Speech Synth", PICOSERVICE_CONTRACTID },
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
|
|
|
@ -699,6 +699,10 @@ nsPicoService*
|
|||
nsPicoService::GetInstance()
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
if (XRE_GetProcessType() != GeckoProcessType_Default) {
|
||||
MOZ_ASSERT(false, "nsPicoService can only be started on main gecko process");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (!sSingleton) {
|
||||
sSingleton = new nsPicoService();
|
||||
|
|
Загрузка…
Ссылка в новой задаче