From 2ba7016f4b42ec9e8b7d5ef38b1c2a48ec390d4f Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Sun, 23 Dec 2007 22:38:56 +0000 Subject: Xr 1.9 fixes. Bug #503657. svn path=/trunk/; revision=7808 --- embed/mozilla/MozRegisterComponents.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'embed') diff --git a/embed/mozilla/MozRegisterComponents.cpp b/embed/mozilla/MozRegisterComponents.cpp index e712bbc5d..3960052bf 100644 --- a/embed/mozilla/MozRegisterComponents.cpp +++ b/embed/mozilla/MozRegisterComponents.cpp @@ -137,12 +137,14 @@ static const nsModuleComponentInfo sAppComps[] = { NS_CLIENTAUTHDIALOGS_CONTRACTID, GtkNSSClientAuthDialogsConstructor }, +#ifndef HAVE_GECKO_1_9 { GTK_NSSDIALOGS_CLASSNAME, GTK_NSSDIALOGS_CID, NS_BADCERTLISTENER_CONTRACTID, GtkNSSDialogsConstructor }, +#endif { GTK_NSSDIALOGS_CLASSNAME, GTK_NSSDIALOGS_CID, @@ -296,9 +298,15 @@ mozilla_register_components (void) for (guint i = 0; i < G_N_ELEMENTS (sAppComps); i++) { nsCOMPtr componentFactory; - rv = NS_NewGenericFactory(getter_AddRefs(componentFactory), - &(sAppComps[i])); - if (NS_FAILED(rv) || !componentFactory) + componentFactory = do_CreateInstance(NS_GENERICFACTORY_CONTRACTID); + if(!componentFactory) + { + g_warning ("Failed to create a generic factory for %s\n", sAppComps[i].mDescription); + ret = FALSE; + continue; + } + rv = componentFactory->SetComponentInfo(&(sAppComps[i])); + if (NS_FAILED(rv)) { g_warning ("Failed to make a factory for %s\n", sAppComps[i].mDescription); -- cgit v1.2.3