diff --git a/toolkit/system/gnome/nsGConfService.cpp b/toolkit/system/gnome/nsGConfService.cpp index 25292b9a44c3..4ba6644db4ca 100644 --- a/toolkit/system/gnome/nsGConfService.cpp +++ b/toolkit/system/gnome/nsGConfService.cpp @@ -54,7 +54,6 @@ nsGConfService::~nsGConfService() nsresult nsGConfService::Init() { - g_type_init(); mClient = gconf_client_get_default(); return mClient ? NS_OK : NS_ERROR_FAILURE; } diff --git a/toolkit/system/gnome/nsGIOService.cpp b/toolkit/system/gnome/nsGIOService.cpp index 94e2c9195308..788d3e49a626 100644 --- a/toolkit/system/gnome/nsGIOService.cpp +++ b/toolkit/system/gnome/nsGIOService.cpp @@ -299,13 +299,6 @@ nsGIOMimeApp::SetAsDefaultForURIScheme(nsACString const& aURIScheme) return NS_OK; } -nsresult -nsGIOService::Init() -{ - // do nothing, gvfs/gio does not init. - return NS_OK; -} - NS_IMPL_ISUPPORTS1(nsGIOService, nsIGIOService) NS_IMETHODIMP diff --git a/toolkit/system/gnome/nsGIOService.h b/toolkit/system/gnome/nsGIOService.h index 865e5109dc44..1349e383b422 100644 --- a/toolkit/system/gnome/nsGIOService.h +++ b/toolkit/system/gnome/nsGIOService.h @@ -49,8 +49,6 @@ class nsGIOService : public nsIGIOService public: NS_DECL_ISUPPORTS NS_DECL_NSIGIOSERVICE - - NS_HIDDEN_(nsresult) Init(); }; #endif diff --git a/toolkit/system/gnome/nsGnomeModule.cpp b/toolkit/system/gnome/nsGnomeModule.cpp index 368954e687cb..13dbbb7bf1ed 100644 --- a/toolkit/system/gnome/nsGnomeModule.cpp +++ b/toolkit/system/gnome/nsGnomeModule.cpp @@ -50,7 +50,7 @@ NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGnomeVFSService, Init) #ifdef MOZ_ENABLE_GIO #include "nsGIOService.h" #include "nsGSettingsService.h" -NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGIOService, Init) +NS_GENERIC_FACTORY_CONSTRUCTOR(nsGIOService) NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGSettingsService, Init) #endif #ifdef MOZ_ENABLE_LIBNOTIFY @@ -107,10 +107,20 @@ static const mozilla::Module::ContractIDEntry kGnomeContracts[] = { { NULL } }; +static nsresult +InitGType () +{ + g_type_init(); + return NS_OK; +} + static const mozilla::Module kGnomeModule = { mozilla::Module::kVersion, kGnomeCIDs, - kGnomeContracts + kGnomeContracts, + NULL, + NULL, + InitGType }; NSMODULE_DEFN(mozgnome) = &kGnomeModule;