Fixed AppShell Service initialization
authorOleg Romashin <romaxa@gmail.com>
Sat, 19 Apr 2008 18:13:59 +0300
changeset 16777 be05b1ddea94f0fe8473862c3a7baa353302022c
parent 16776 5d52efe6fa8bb3e07c4df1f7631ecaa1d07ad797
child 16778 1490a6e93164c53f589320973868af0ecf3c06ba
push id1298
push userpavlov@mozilla.com
push dateSun, 17 Aug 2008 05:03:09 +0000
treeherderautoland@4a506fa751d8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone2.0a1pre
Fixed AppShell Service initialization
widget/src/qt/nsWidgetFactory.cpp
--- a/widget/src/qt/nsWidgetFactory.cpp
+++ b/widget/src/qt/nsWidgetFactory.cpp
@@ -45,16 +45,17 @@
 #include "nsCOMPtr.h"
 #include "nsWidgetsCID.h"
 #include "nsAppShell.h"
 #include "nsWindow.h"
 #include "nsToolkit.h"
 #include "nsHTMLFormatConverter.h"
 #include "nsTransferable.h"
 #include "nsLookAndFeel.h"
+#include "nsAppShellSingleton.h"
 
 // #include "nsIComponentRegistrar.h"
 // #include "nsComponentManagerUtils.h"
 // #include "nsAutoPtr.h"
 // 
 
 
 // #include "nsClipboard.h"
@@ -70,17 +71,16 @@
 // #include "nsIServiceManager.h"
 // #include "nsGfxCIID.h"
 // #include "nsIPrefBranch.h"
 // #include "nsIPrefService.h"
 // 
 // #include "nsBidiKeyboard.h"
 // #include "nsNativeThemeQt.h"
 
-NS_GENERIC_FACTORY_CONSTRUCTOR(nsAppShell)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsWindow)
 NS_GENERIC_FACTORY_CONSTRUCTOR(ChildWindow)
 NS_GENERIC_FACTORY_CONSTRUCTOR(PopupWindow)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsToolkit)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsHTMLFormatConverter)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsTransferable)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsLookAndFeel)
 
@@ -165,9 +165,22 @@ static const nsModuleComponentInfo compo
       nsFilePickerConstructor },
     { "Native Theme Renderer",
       NS_THEMERENDERER_CID,
       "@mozilla.org/chrome/chrome-native-theme;1",
       nsNativeThemeQtConstructor }
 */
 };
 
-NS_IMPL_NSGETMODULE(nsWidgetQtModule,components)
+PR_STATIC_CALLBACK(void)
+nsWidgetQtModuleDtor(nsIModule *aSelf)
+{
+//    nsFilePicker::Shutdown();
+//    nsSound::Shutdown();
+//    nsWindow::ReleaseGlobals();
+    nsAppShellShutdown(aSelf);
+}
+
+NS_IMPL_NSGETMODULE_WITH_CTOR_DTOR(nsWidgetQtModule,
+                                   components,
+                                   nsAppShellInit,
+                                   nsWidgetQtModuleDtor)
+