bug 1023509 - only initialize platform accessibility in the main process r=davidb

Since platform accessibility software only interacts with the main
process there's no reason to do platform specific things in the content
processes.  Eventually we should also be able to only create generic
accessibles that don't use the platform wrapper classes, but that will
take more work so we'll keep creating them in the content processes for
now.
This commit is contained in:
Trevor Saunders 2014-06-10 15:54:06 -04:00 коммит произвёл Trevor Saunders
Родитель f2d54345fa
Коммит 94d779ea4d
1 изменённых файлов: 10 добавлений и 3 удалений

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

@ -1257,7 +1257,11 @@ nsAccessibilityService::Init()
logging::CheckEnv();
#endif
gApplicationAccessible = new ApplicationAccessibleWrap();
if (XRE_GetProcessType() == GeckoProcessType_Default)
gApplicationAccessible = new ApplicationAccessibleWrap();
else
gApplicationAccessible = new ApplicationAccessible();
NS_ADDREF(gApplicationAccessible); // will release in Shutdown()
#ifdef MOZ_CRASHREPORTER
@ -1274,7 +1278,8 @@ nsAccessibilityService::Init()
gIsShutdown = false;
// Now its safe to start platform accessibility.
PlatformInit();
if (XRE_GetProcessType() == GeckoProcessType_Default)
PlatformInit();
return true;
}
@ -1316,7 +1321,9 @@ nsAccessibilityService::Shutdown()
gIsShutdown = true;
PlatformShutdown();
if (XRE_GetProcessType() == GeckoProcessType_Default)
PlatformShutdown();
gApplicationAccessible->Shutdown();
NS_RELEASE(gApplicationAccessible);
gApplicationAccessible = nullptr;