epiphany r8590 - branches/gnome-2-24/embed/mozilla
- From: chpe svn gnome org
- To: svn-commits-list gnome org
- Subject: epiphany r8590 - branches/gnome-2-24/embed/mozilla
- Date: Sun, 19 Oct 2008 13:30:48 +0000 (UTC)
Author: chpe
Date: Sun Oct 19 13:30:48 2008
New Revision: 8590
URL: http://svn.gnome.org/viewvc/epiphany?rev=8590&view=rev
Log:
Register our global history component for all the contracts that
nsNavHistory implements, even if we don't. Also take over its CID.
Hopefully this will prevent nsNavHistory from getting instantiated,
which is one of the symptoms of bug #535127.
Modified:
branches/gnome-2-24/embed/mozilla/GlobalHistory.h
branches/gnome-2-24/embed/mozilla/MozRegisterComponents.cpp
Modified: branches/gnome-2-24/embed/mozilla/GlobalHistory.h
==============================================================================
--- branches/gnome-2-24/embed/mozilla/GlobalHistory.h (original)
+++ branches/gnome-2-24/embed/mozilla/GlobalHistory.h Sun Oct 19 13:30:48 2008
@@ -23,6 +23,7 @@
#define EPHY_GLOBAL_HISTORY_H
#ifdef HAVE_GECKO_1_9
+#include <nsToolkitCompsCID.h>
#include <nsIDownloadHistory.h>
#endif
#ifdef HAVE_NSIGLOBALHISTORY3_H
@@ -40,12 +41,17 @@
#define EPHY_GLOBALHISTORY_CLASSNAME "Epiphany Global History Implementation"
+#ifdef HAVE_GECKO_1_9
+/* Just in case anyone gets the service by CID */
+#define EPHY_GLOBALHISTORY_CID NS_NAVHISTORYSERVICE_CID
+#else
#define EPHY_GLOBALHISTORY_CID \
{ 0xbe0c42c1, \
0x39d4, \
0x4271, \
{ 0xb7, 0x9e, 0xf7, 0xaa, 0x49, 0xeb, 0x6a, 0x15} \
}
+#endif
#ifdef HAVE_NSIGLOBALHISTORY3_H
class MozGlobalHistory: public nsIGlobalHistory3
Modified: branches/gnome-2-24/embed/mozilla/MozRegisterComponents.cpp
==============================================================================
--- branches/gnome-2-24/embed/mozilla/MozRegisterComponents.cpp (original)
+++ branches/gnome-2-24/embed/mozilla/MozRegisterComponents.cpp Sun Oct 19 13:30:48 2008
@@ -45,6 +45,7 @@
#ifdef HAVE_GECKO_1_9
#include <nsIClassInfoImpl.h>
#include <nsXULAppAPI.h>
+#include <nsToolkitCompsCID.h>
#endif
#ifdef HAVE_MOZILLA_PSM
@@ -216,6 +217,50 @@
MozGlobalHistoryConstructor
},
#ifdef HAVE_GECKO_1_9
+ /* Somehow, somewhere, nsNavHistory is getting instantiated.
+ * Try to prevent this by registering for all the contracts it does
+ * implement, even those we don't implement. GetService/QI will
+ * simply fail then.
+ */
+ {
+ EPHY_GLOBALHISTORY_CLASSNAME,
+ EPHY_GLOBALHISTORY_CID,
+ NS_NAVHISTORYSERVICE_CONTRACTID,
+ MozGlobalHistoryConstructor
+ },
+ {
+ EPHY_GLOBALHISTORY_CLASSNAME,
+ EPHY_GLOBALHISTORY_CID,
+ "@mozilla.org/autocomplete/search;1?name=history",
+ MozGlobalHistoryConstructor
+ },
+ {
+ EPHY_GLOBALHISTORY_CLASSNAME,
+ EPHY_GLOBALHISTORY_CID,
+ NS_ANNOTATIONSERVICE_CONTRACTID,
+ MozGlobalHistoryConstructor
+ },
+ {
+ EPHY_GLOBALHISTORY_CLASSNAME,
+ EPHY_GLOBALHISTORY_CID,
+ NS_GLOBALHISTORY2_CONTRACTID,
+ MozGlobalHistoryConstructor
+ },
+ {
+ EPHY_GLOBALHISTORY_CLASSNAME,
+ EPHY_GLOBALHISTORY_CID,
+ NS_NAVBOOKMARKSSERVICE_CONTRACTID,
+ MozGlobalHistoryConstructor
+ },
+ {
+ EPHY_GLOBALHISTORY_CLASSNAME,
+ EPHY_GLOBALHISTORY_CID,
+ "@mozilla.org/embeddor.implemented/bookmark-charset-resolver;1",
+ MozGlobalHistoryConstructor
+ },
+
+#endif
+#ifdef HAVE_GECKO_1_9
{
EPHY_GLOBALHISTORY_CLASSNAME,
EPHY_GLOBALHISTORY_CID,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]