зеркало из https://github.com/mozilla/gecko-dev.git
Initialize nsAppShell in the GPU process. (bug 1294350 part 5, r=nfroyd)
This commit is contained in:
Родитель
9495e20273
Коммит
424b5eb180
|
@ -125,7 +125,7 @@ static const mozilla::Module::CIDEntry kWidgetCIDs[] = {
|
|||
mozilla::Module::MAIN_PROCESS_ONLY },
|
||||
{ &kNS_COLORPICKER_CID, false, NULL, nsColorPickerConstructor,
|
||||
mozilla::Module::MAIN_PROCESS_ONLY },
|
||||
{ &kNS_APPSHELL_CID, false, NULL, nsAppShellConstructor },
|
||||
{ &kNS_APPSHELL_CID, false, NULL, nsAppShellConstructor, mozilla::Module::ALLOW_IN_GPU_PROCESS },
|
||||
{ &kNS_SOUND_CID, false, NULL, nsSoundConstructor,
|
||||
mozilla::Module::MAIN_PROCESS_ONLY },
|
||||
{ &kNS_TRANSFERABLE_CID, false, NULL, nsTransferableConstructor },
|
||||
|
@ -163,7 +163,7 @@ static const mozilla::Module::ContractIDEntry kWidgetContracts[] = {
|
|||
mozilla::Module::MAIN_PROCESS_ONLY },
|
||||
{ "@mozilla.org/colorpicker;1", &kNS_COLORPICKER_CID,
|
||||
mozilla::Module::MAIN_PROCESS_ONLY },
|
||||
{ "@mozilla.org/widget/appshell/mac;1", &kNS_APPSHELL_CID },
|
||||
{ "@mozilla.org/widget/appshell/mac;1", &kNS_APPSHELL_CID, mozilla::Module::ALLOW_IN_GPU_PROCESS },
|
||||
{ "@mozilla.org/sound;1", &kNS_SOUND_CID,
|
||||
mozilla::Module::MAIN_PROCESS_ONLY },
|
||||
{ "@mozilla.org/widget/transferable;1", &kNS_TRANSFERABLE_CID },
|
||||
|
@ -212,7 +212,8 @@ static const mozilla::Module kWidgetModule = {
|
|||
NULL,
|
||||
NULL,
|
||||
nsAppShellInit,
|
||||
nsWidgetCocoaModuleDtor
|
||||
nsWidgetCocoaModuleDtor,
|
||||
mozilla::Module::ALLOW_IN_GPU_PROCESS
|
||||
};
|
||||
|
||||
NSMODULE_DEFN(nsWidgetMacModule) = &kWidgetModule;
|
||||
|
|
|
@ -228,7 +228,7 @@ NS_DEFINE_NAMED_CID(NS_GFXINFO_CID);
|
|||
static const mozilla::Module::CIDEntry kWidgetCIDs[] = {
|
||||
{ &kNS_WINDOW_CID, false, nullptr, nsWindowConstructor },
|
||||
{ &kNS_CHILD_CID, false, nullptr, nsChildWindowConstructor },
|
||||
{ &kNS_APPSHELL_CID, false, nullptr, nsAppShellConstructor },
|
||||
{ &kNS_APPSHELL_CID, false, nullptr, nsAppShellConstructor, Module::ALLOW_IN_GPU_PROCESS },
|
||||
{ &kNS_COLORPICKER_CID, false, nullptr, nsColorPickerConstructor, Module::MAIN_PROCESS_ONLY },
|
||||
{ &kNS_FILEPICKER_CID, false, nullptr, nsFilePickerConstructor, Module::MAIN_PROCESS_ONLY },
|
||||
#if (MOZ_WIDGET_GTK == 3)
|
||||
|
@ -264,7 +264,7 @@ static const mozilla::Module::CIDEntry kWidgetCIDs[] = {
|
|||
static const mozilla::Module::ContractIDEntry kWidgetContracts[] = {
|
||||
{ "@mozilla.org/widget/window/gtk;1", &kNS_WINDOW_CID },
|
||||
{ "@mozilla.org/widgets/child_window/gtk;1", &kNS_CHILD_CID },
|
||||
{ "@mozilla.org/widget/appshell/gtk;1", &kNS_APPSHELL_CID },
|
||||
{ "@mozilla.org/widget/appshell/gtk;1", &kNS_APPSHELL_CID, Module::ALLOW_IN_GPU_PROCESS },
|
||||
{ "@mozilla.org/colorpicker;1", &kNS_COLORPICKER_CID, Module::MAIN_PROCESS_ONLY },
|
||||
{ "@mozilla.org/filepicker;1", &kNS_FILEPICKER_CID, Module::MAIN_PROCESS_ONLY },
|
||||
#if (MOZ_WIDGET_GTK == 3)
|
||||
|
@ -324,7 +324,8 @@ static const mozilla::Module kWidgetModule = {
|
|||
nullptr,
|
||||
nullptr,
|
||||
nsAppShellInit,
|
||||
nsWidgetGtk2ModuleDtor
|
||||
nsWidgetGtk2ModuleDtor,
|
||||
Module::ALLOW_IN_GPU_PROCESS
|
||||
};
|
||||
|
||||
NSMODULE_DEFN(nsWidgetGtk2Module) = &kWidgetModule;
|
||||
|
|
|
@ -171,7 +171,7 @@ static const mozilla::Module::CIDEntry kWidgetCIDs[] = {
|
|||
{ &kNS_CHILD_CID, false, nullptr, ChildWindowConstructor },
|
||||
{ &kNS_FILEPICKER_CID, false, nullptr, FilePickerConstructor, Module::MAIN_PROCESS_ONLY },
|
||||
{ &kNS_COLORPICKER_CID, false, nullptr, ColorPickerConstructor, Module::MAIN_PROCESS_ONLY },
|
||||
{ &kNS_APPSHELL_CID, false, nullptr, nsAppShellConstructor },
|
||||
{ &kNS_APPSHELL_CID, false, nullptr, nsAppShellConstructor, Module::ALLOW_IN_GPU_PROCESS },
|
||||
{ &kNS_SCREENMANAGER_CID, false, nullptr, nsScreenManagerWinConstructor,
|
||||
Module::MAIN_PROCESS_ONLY },
|
||||
{ &kNS_GFXINFO_CID, false, nullptr, GfxInfoConstructor },
|
||||
|
@ -206,7 +206,7 @@ static const mozilla::Module::ContractIDEntry kWidgetContracts[] = {
|
|||
{ "@mozilla.org/widgets/child_window/win;1", &kNS_CHILD_CID },
|
||||
{ "@mozilla.org/filepicker;1", &kNS_FILEPICKER_CID, Module::MAIN_PROCESS_ONLY },
|
||||
{ "@mozilla.org/colorpicker;1", &kNS_COLORPICKER_CID, Module::MAIN_PROCESS_ONLY },
|
||||
{ "@mozilla.org/widget/appshell/win;1", &kNS_APPSHELL_CID },
|
||||
{ "@mozilla.org/widget/appshell/win;1", &kNS_APPSHELL_CID, Module::ALLOW_IN_GPU_PROCESS },
|
||||
{ "@mozilla.org/gfx/screenmanager;1", &kNS_SCREENMANAGER_CID, Module::MAIN_PROCESS_ONLY },
|
||||
{ "@mozilla.org/gfx/info;1", &kNS_GFXINFO_CID },
|
||||
{ "@mozilla.org/chrome/chrome-native-theme;1", &kNS_THEMERENDERER_CID },
|
||||
|
@ -255,7 +255,8 @@ static const mozilla::Module kWidgetModule = {
|
|||
nullptr,
|
||||
nullptr,
|
||||
nsAppShellInit,
|
||||
nsWidgetWindowsModuleDtor
|
||||
nsWidgetWindowsModuleDtor,
|
||||
Module::ALLOW_IN_GPU_PROCESS
|
||||
};
|
||||
|
||||
NSMODULE_DEFN(nsWidgetModule) = &kWidgetModule;
|
||||
|
|
|
@ -302,12 +302,15 @@ CreateINIParserFactory(const mozilla::Module& aModule,
|
|||
}
|
||||
|
||||
#define COMPONENT(NAME, Ctor) static NS_DEFINE_CID(kNS_##NAME##_CID, NS_##NAME##_CID);
|
||||
#define COMPONENT_M(NAME, Ctor, Selector) static NS_DEFINE_CID(kNS_##NAME##_CID, NS_##NAME##_CID);
|
||||
#include "XPCOMModule.inc"
|
||||
#undef COMPONENT
|
||||
#undef COMPONENT_M
|
||||
|
||||
#define COMPONENT(NAME, Ctor) { &kNS_##NAME##_CID, false, nullptr, Ctor },
|
||||
#define COMPONENT_M(NAME, Ctor, Selector) { &kNS_##NAME##_CID, false, nullptr, Ctor, Selector },
|
||||
const mozilla::Module::CIDEntry kXPCOMCIDEntries[] = {
|
||||
{ &kComponentManagerCID, true, nullptr, nsComponentManagerImpl::Create },
|
||||
{ &kComponentManagerCID, true, nullptr, nsComponentManagerImpl::Create, Module::ALLOW_IN_GPU_PROCESS },
|
||||
{ &kINIParserFactoryCID, false, CreateINIParserFactory },
|
||||
#include "XPCOMModule.inc"
|
||||
{ &kNS_CHROMEREGISTRY_CID, false, nullptr, nsChromeRegistryConstructor },
|
||||
|
@ -316,8 +319,10 @@ const mozilla::Module::CIDEntry kXPCOMCIDEntries[] = {
|
|||
{ nullptr }
|
||||
};
|
||||
#undef COMPONENT
|
||||
#undef COMPONENT_M
|
||||
|
||||
#define COMPONENT(NAME, Ctor) { NS_##NAME##_CONTRACTID, &kNS_##NAME##_CID },
|
||||
#define COMPONENT_M(NAME, Ctor, Selector) { NS_##NAME##_CONTRACTID, &kNS_##NAME##_CID, Selector },
|
||||
const mozilla::Module::ContractIDEntry kXPCOMContracts[] = {
|
||||
#include "XPCOMModule.inc"
|
||||
{ NS_CHROMEREGISTRY_CONTRACTID, &kNS_CHROMEREGISTRY_CID },
|
||||
|
@ -327,9 +332,15 @@ const mozilla::Module::ContractIDEntry kXPCOMContracts[] = {
|
|||
{ nullptr }
|
||||
};
|
||||
#undef COMPONENT
|
||||
#undef COMPONENT_M
|
||||
|
||||
const mozilla::Module kXPCOMModule = {
|
||||
mozilla::Module::kVersion, kXPCOMCIDEntries, kXPCOMContracts
|
||||
mozilla::Module::kVersion, kXPCOMCIDEntries, kXPCOMContracts,
|
||||
nullptr,
|
||||
nullptr,
|
||||
nullptr,
|
||||
nullptr,
|
||||
Module::ALLOW_IN_GPU_PROCESS
|
||||
};
|
||||
|
||||
// gDebug will be freed during shutdown.
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
COMPONENT(MEMORY, nsMemoryImpl::Create)
|
||||
COMPONENT(DEBUG, nsDebugImpl::Create)
|
||||
COMPONENT_M(MEMORY, nsMemoryImpl::Create, Module::ALLOW_IN_GPU_PROCESS)
|
||||
COMPONENT_M(DEBUG, nsDebugImpl::Create, Module::ALLOW_IN_GPU_PROCESS)
|
||||
COMPONENT(ERRORSERVICE, nsErrorService::Create)
|
||||
|
||||
COMPONENT(CATEGORYMANAGER, nsCategoryManager::Create)
|
||||
COMPONENT_M(CATEGORYMANAGER, nsCategoryManager::Create, Module::ALLOW_IN_GPU_PROCESS)
|
||||
|
||||
COMPONENT(SCRIPTABLEINPUTSTREAM, nsScriptableInputStream::Create)
|
||||
COMPONENT(BINARYINPUTSTREAM, nsBinaryInputStreamConstructor)
|
||||
|
@ -20,9 +20,9 @@
|
|||
COMPONENT(ARRAY, nsArrayBase::XPCOMConstructor)
|
||||
COMPONENT(CONSOLESERVICE, nsConsoleServiceConstructor)
|
||||
COMPONENT(ATOMSERVICE, nsAtomServiceConstructor)
|
||||
COMPONENT(OBSERVERSERVICE, nsObserverService::Create)
|
||||
COMPONENT_M(OBSERVERSERVICE, nsObserverService::Create, Module::ALLOW_IN_GPU_PROCESS)
|
||||
|
||||
COMPONENT(TIMER, nsTimerImplConstructor)
|
||||
COMPONENT_M(TIMER, nsTimerImplConstructor, Module::ALLOW_IN_GPU_PROCESS)
|
||||
|
||||
#define COMPONENT_SUPPORTS(TYPE, Type) \
|
||||
COMPONENT(SUPPORTS_##TYPE, nsSupports##Type##Constructor)
|
||||
|
|
Загрузка…
Ссылка в новой задаче