diff options
author | Christian Persch <chpe@src.gnome.org> | 2007-12-24 06:31:01 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2007-12-24 06:31:01 +0800 |
commit | 357b0c05ce39abe15fe90f424b72942130b8ee56 (patch) | |
tree | 6365abe4186ab3bd607f93c3a8db99a7f96d9514 /embed/mozilla/EphyDirectoryProvider.cpp | |
parent | 0b0de463f1ffb1a209607f79589c8f1a7a9235de (diff) | |
download | gsoc2013-epiphany-357b0c05ce39abe15fe90f424b72942130b8ee56.tar gsoc2013-epiphany-357b0c05ce39abe15fe90f424b72942130b8ee56.tar.gz gsoc2013-epiphany-357b0c05ce39abe15fe90f424b72942130b8ee56.tar.bz2 gsoc2013-epiphany-357b0c05ce39abe15fe90f424b72942130b8ee56.tar.lz gsoc2013-epiphany-357b0c05ce39abe15fe90f424b72942130b8ee56.tar.xz gsoc2013-epiphany-357b0c05ce39abe15fe90f424b72942130b8ee56.tar.zst gsoc2013-epiphany-357b0c05ce39abe15fe90f424b72942130b8ee56.zip |
Fixes for xr 1.9. Bug #503657.
svn path=/trunk/; revision=7805
Diffstat (limited to 'embed/mozilla/EphyDirectoryProvider.cpp')
-rw-r--r-- | embed/mozilla/EphyDirectoryProvider.cpp | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/embed/mozilla/EphyDirectoryProvider.cpp b/embed/mozilla/EphyDirectoryProvider.cpp index f8ec21042..0719f95b1 100644 --- a/embed/mozilla/EphyDirectoryProvider.cpp +++ b/embed/mozilla/EphyDirectoryProvider.cpp @@ -40,6 +40,11 @@ #include <nsIToolkitChromeRegistry.h> #include <nsNetUtil.h> +#ifdef HAVE_GECKO_1_9 +#include <nsIArray.h> +#include <nsIMutableArray.h> +#endif + #include "EphyDirectoryProvider.h" NS_IMPL_ISUPPORTS2 (EphyDirectoryProvider, @@ -88,15 +93,27 @@ EphyDirectoryProvider::GetFiles (const char *prop, getter_AddRefs (chromeDir)); NS_ENSURE_SUCCESS (rv, rv); +#ifdef HAVE_GECKO_1_9 + nsCOMPtr<nsIMutableArray> array (do_CreateInstance(NS_SUPPORTSARRAY_CONTRACTID)); + if(!array) + return NS_ERROR_OUT_OF_MEMORY; + rv = array->AppendElement (manifestDir, PR_FALSE); + rv |= array->AppendElement (chromeDir, PR_FALSE); + NS_ENSURE_SUCCESS (rv, rv); + + rv = array->Enumerate(_retval); +#else nsCOMPtr<nsISupportsArray> array; rv = NS_NewISupportsArray (getter_AddRefs (array)); NS_ENSURE_SUCCESS (rv, rv); rv = array->AppendElement (manifestDir); rv |= array->AppendElement (chromeDir); - NS_ENSURE_SUCCESS (rv, rv); + NS_ENSURE_SUCCESS (rv, rv); rv = NS_NewArrayEnumerator (_retval, array); +#endif /* HAVE_GECKO_1_9 */ + NS_ENSURE_SUCCESS (rv, rv); rv = NS_SUCCESS_AGGREGATE_RESULT; |