diff options
| author | Christian Persch <chpe@src.gnome.org> | 2008-10-19 21:30:48 +0800 |
|---|---|---|
| committer | Christian Persch <chpe@src.gnome.org> | 2008-10-19 21:30:48 +0800 |
| commit | 7d74d83ca7b6c6ea7988dd12cbca59577d154e7a (patch) | |
| tree | 61cacb2cdca95c21e9712cf79c31f82171a9c937 | |
| parent | c8328d636f9cdd9d36a9a115c95d942ab10b9683 (diff) | |
| download | gsoc2013-epiphany-7d74d83ca7b6c6ea7988dd12cbca59577d154e7a.tar gsoc2013-epiphany-7d74d83ca7b6c6ea7988dd12cbca59577d154e7a.tar.gz gsoc2013-epiphany-7d74d83ca7b6c6ea7988dd12cbca59577d154e7a.tar.bz2 gsoc2013-epiphany-7d74d83ca7b6c6ea7988dd12cbca59577d154e7a.tar.lz gsoc2013-epiphany-7d74d83ca7b6c6ea7988dd12cbca59577d154e7a.tar.xz gsoc2013-epiphany-7d74d83ca7b6c6ea7988dd12cbca59577d154e7a.tar.zst gsoc2013-epiphany-7d74d83ca7b6c6ea7988dd12cbca59577d154e7a.zip | |
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.
svn path=/branches/gnome-2-24/; revision=8590
| -rw-r--r-- | embed/mozilla/GlobalHistory.h | 6 | ||||
| -rw-r--r-- | embed/mozilla/MozRegisterComponents.cpp | 45 |
2 files changed, 51 insertions, 0 deletions
diff --git a/embed/mozilla/GlobalHistory.h b/embed/mozilla/GlobalHistory.h index f4464082f..0ff6fb285 100644 --- a/embed/mozilla/GlobalHistory.h +++ b/embed/mozilla/GlobalHistory.h @@ -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 diff --git a/embed/mozilla/MozRegisterComponents.cpp b/embed/mozilla/MozRegisterComponents.cpp index d6b52a140..81cd2fa8d 100644 --- a/embed/mozilla/MozRegisterComponents.cpp +++ b/embed/mozilla/MozRegisterComponents.cpp @@ -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 @@ static const nsModuleComponentInfo sAppComps[] = { 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, |
