зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
f2d54345fa
Коммит
94d779ea4d
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче