Bug 978147 - Remove deprecated g_type_init from Toolkit. f=dkeeler r=roc
☠☠ backed out by 082bae16fc33 ☠ ☠
authorRaymond Etornam Agbeame(:retornam) <mozbugs.retornam@gmail.com>
Thu, 06 Mar 2014 15:36:23 -0500
changeset 183452 00a76d6b935cf4e567f0fbbfc8705ad5c25ca9a5
parent 183451 5bb78bdc6c5c58aa2632a26aa434175c306daa07
child 183453 e67fd6177febf8caac45e43b5ac6f54c891a076d
push id5439
push userffxbld
push dateMon, 17 Mar 2014 23:08:15 +0000
treeherdermozilla-aurora@c0befb3c8038 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs978147
milestone30.0a1
Bug 978147 - Remove deprecated g_type_init from Toolkit. f=dkeeler r=roc
toolkit/components/downloads/nsDownloadManager.cpp
toolkit/components/jsdownloads/src/DownloadPlatform.cpp
toolkit/system/gnome/nsGnomeModule.cpp
--- a/toolkit/components/downloads/nsDownloadManager.cpp
+++ b/toolkit/components/downloads/nsDownloadManager.cpp
@@ -101,19 +101,16 @@ nsDownloadManager::GetSingleton()
 {
   if (gDownloadManagerService) {
     NS_ADDREF(gDownloadManagerService);
     return gDownloadManagerService;
   }
 
   gDownloadManagerService = new nsDownloadManager();
   if (gDownloadManagerService) {
-#if defined(MOZ_WIDGET_GTK)
-    g_type_init();
-#endif
     NS_ADDREF(gDownloadManagerService);
     if (NS_FAILED(gDownloadManagerService->Init()))
       NS_RELEASE(gDownloadManagerService);
   }
 
   return gDownloadManagerService;
 }
 
--- a/toolkit/components/jsdownloads/src/DownloadPlatform.cpp
+++ b/toolkit/components/jsdownloads/src/DownloadPlatform.cpp
@@ -38,20 +38,16 @@ NS_IMPL_ISUPPORTS1(DownloadPlatform, moz
 DownloadPlatform* DownloadPlatform::GetDownloadPlatform()
 {
   if (!gDownloadPlatformService) {
     gDownloadPlatformService = new DownloadPlatform();
   }
 
   NS_ADDREF(gDownloadPlatformService);
 
-#if defined(MOZ_WIDGET_GTK)
-  g_type_init();
-#endif
-
   return gDownloadPlatformService;
 }
 
 #ifdef MOZ_ENABLE_GIO
 static void gio_set_metadata_done(GObject *source_obj, GAsyncResult *res, gpointer user_data)
 {
   GError *err = nullptr;
   g_file_set_attributes_finish(G_FILE(source_obj), res, nullptr, &err);
--- a/toolkit/system/gnome/nsGnomeModule.cpp
+++ b/toolkit/system/gnome/nsGnomeModule.cpp
@@ -57,25 +57,15 @@ static const mozilla::Module::ContractID
 #endif
 #ifdef MOZ_ENABLE_GIO
   { NS_GIOSERVICE_CONTRACTID, &kNS_GIOSERVICE_CID },
   { NS_GSETTINGSSERVICE_CONTRACTID, &kNS_GSETTINGSSERVICE_CID },
 #endif
   { nullptr }
 };
 
-static nsresult
-InitGType ()
-{
-  g_type_init();
-  return NS_OK;
-}
-
 static const mozilla::Module kGnomeModule = {
   mozilla::Module::kVersion,
   kGnomeCIDs,
-  kGnomeContracts,
-  nullptr,
-  nullptr,
-  InitGType
+  kGnomeContracts
 };
 
 NSMODULE_DEFN(mozgnome) = &kGnomeModule;