diff --git a/configure.in b/configure.in index 8847436f6ec..7b4b44afadf 100644 --- a/configure.in +++ b/configure.in @@ -6289,19 +6289,14 @@ fi dnl ======================================================== dnl Installer dnl ======================================================== -MOZ_ARG_DISABLE_BOOL(installer, -[ --disable-installer Disable building of installer], - MOZ_INSTALLER=, - MOZ_INSTALLER=1) +dnl Abort Windows build if the required major version and +dnl minimum minor version of Unicode NSIS isn't in the path. if test -n "$MOZ_INSTALLER" -a "$OS_ARCH" = "WINNT"; then - # Disable installer for Windows builds that use the new toolkit if the - # required major version and minimum minor version of Unicode NSIS isn't in - # the path. REQ_NSIS_MAJOR_VER=2 MIN_NSIS_MINOR_VER=33 MOZ_PATH_PROGS(MAKENSISU, $MAKENSISU makensisu-2.46 makensisu makensis) if test -z "$MAKENSISU" -o "$MAKENSISU" = ":"; then - AC_MSG_ERROR([To build the installer you must have the latest MozillaBuild or Unicode NSIS with a major version of $REQ_NSIS_MAJOR_VER and a minimum minor version of $MIN_NSIS_MINOR_VER in your path. To build without the installer reconfigure using --disable-installer.]) + AC_MSG_ERROR([To build the installer you must have the latest MozillaBuild or Unicode NSIS with a major version of $REQ_NSIS_MAJOR_VER and a minimum minor version of $MIN_NSIS_MINOR_VER in your path.]) fi changequote(,) MAKENSISU_VER=`"$MAKENSISU" -version 2>/dev/null | sed -e '/-Unicode/!s/.*//g' -e 's/^v\([0-9]\+\.[0-9]\+\)\-Unicode$/\1/g'` @@ -6315,13 +6310,11 @@ if test -n "$MOZ_INSTALLER" -a "$OS_ARCH" = "WINNT"; then test ! "$MAKENSISU_MAJOR_VER" = "$REQ_NSIS_MAJOR_VER" -o \ ! "$MAKENSISU_MINOR_VER" -ge $MIN_NSIS_MINOR_VER; then AC_MSG_RESULT([no]) - AC_MSG_ERROR([To build the installer you must have the latest MozillaBuild or Unicode NSIS with a major version of $REQ_NSIS_MAJOR_VER and a minimum minor version of $MIN_NSIS_MINOR_VER in your path. To build without the installer reconfigure using --disable-installer.]) + AC_MSG_ERROR([To build the installer you must have the latest MozillaBuild or Unicode NSIS with a major version of $REQ_NSIS_MAJOR_VER and a minimum minor version of $MIN_NSIS_MINOR_VER in your path.]) fi AC_MSG_RESULT([yes]) fi -AC_SUBST(MOZ_INSTALLER) - AC_MSG_CHECKING([for tar archiver]) AC_CHECK_PROGS(TAR, gnutar gtar tar, "") if test -z "$TAR"; then @@ -8360,6 +8353,7 @@ AC_SUBST(MOZ_DEBUG_FLAGS) AC_SUBST(MOZ_DEBUG_LDFLAGS) AC_SUBST(WARNINGS_AS_ERRORS) AC_SUBST(MOZ_EXTENSIONS) +AC_SUBST(MOZ_INSTALLER) AC_SUBST(MOZ_JSDEBUGGER) AC_SUBST(MOZ_LOG_REFCNT) AC_SUBST(MOZ_LEAKY) diff --git a/content/canvas/src/ImageData.cpp b/content/canvas/src/ImageData.cpp index 69ed5367d3d..755d6ddc554 100644 --- a/content/canvas/src/ImageData.cpp +++ b/content/canvas/src/ImageData.cpp @@ -57,10 +57,10 @@ ImageData::GetHeight(PRUint32* aHeight) /* readonly attribute jsval data; */ NS_IMETHODIMP -ImageData::GetData(JS::Value* aData) +ImageData::GetData(JSContext* aCx, JS::Value* aData) { - *aData = GetData(); - return NS_OK; + *aData = JS::ObjectOrNullValue(GetDataObject()); + return JS_WrapValue(aCx, aData) ? NS_OK : NS_ERROR_FAILURE; } void diff --git a/content/canvas/src/ImageData.h b/content/canvas/src/ImageData.h index c31372b56b0..73bd6b40c64 100644 --- a/content/canvas/src/ImageData.h +++ b/content/canvas/src/ImageData.h @@ -51,10 +51,6 @@ public: { return mHeight; } - JS::Value GetData() - { - return JS::ObjectOrNullValue(GetDataObject()); - } JSObject* GetDataObject() { xpc_UnmarkGrayObject(mData); diff --git a/dom/interfaces/canvas/nsIDOMCanvasRenderingContext2D.idl b/dom/interfaces/canvas/nsIDOMCanvasRenderingContext2D.idl index efb81a7fda5..949940f557f 100644 --- a/dom/interfaces/canvas/nsIDOMCanvasRenderingContext2D.idl +++ b/dom/interfaces/canvas/nsIDOMCanvasRenderingContext2D.idl @@ -67,7 +67,7 @@ interface nsIDOMImageData : nsISupports { readonly attribute unsigned long width; readonly attribute unsigned long height; - readonly attribute jsval data; + [implicit_jscontext] readonly attribute jsval data; }; [scriptable, uuid(c835c768-2dcc-461c-82f5-3653710d2942)] diff --git a/modules/libpref/public/Preferences.h b/modules/libpref/public/Preferences.h index d3a76a562fa..88dfc675285 100644 --- a/modules/libpref/public/Preferences.h +++ b/modules/libpref/public/Preferences.h @@ -352,6 +352,12 @@ public: protected: nsresult NotifyServiceObservers(const char *aSubject); + /** + * Reads the default pref file or, if that failed, try to save a new one. + * + * @return NS_OK if either action succeeded, + * or the error code related to the read attempt. + */ nsresult UseDefaultPrefFile(); nsresult UseUserPrefFile(); nsresult ReadAndOwnUserPrefFile(nsIFile *aFile); diff --git a/modules/libpref/src/Preferences.cpp b/modules/libpref/src/Preferences.cpp index 7e7b2bf0877..e0dfdcd603b 100644 --- a/modules/libpref/src/Preferences.cpp +++ b/modules/libpref/src/Preferences.cpp @@ -404,14 +404,16 @@ Preferences::ReadUserPrefs(nsIFile *aFile) nsresult rv; if (nsnull == aFile) { - NotifyServiceObservers(NS_PREFSERVICE_READ_TOPIC_ID); rv = UseDefaultPrefFile(); - UseUserPrefFile(); + // A user pref file is optional. + // Ignore all errors related to it, so we retain 'rv' value :-| + (void) UseUserPrefFile(); } else { rv = ReadAndOwnUserPrefFile(aFile); } + return rv; } @@ -587,7 +589,7 @@ Preferences::NotifyServiceObservers(const char *aTopic) nsresult Preferences::UseDefaultPrefFile() { - nsresult rv, rv2; + nsresult rv; nsCOMPtr aFile; rv = NS_GetSpecialDirectory(NS_APP_PREFS_50_FILE, getter_AddRefs(aFile)); @@ -597,8 +599,10 @@ Preferences::UseDefaultPrefFile() // exist, so save a new one. mUserPrefReadFailed will be // used to catch an error in actually reading the file. if (NS_FAILED(rv)) { - rv2 = SavePrefFileInternal(aFile); - NS_ASSERTION(NS_SUCCEEDED(rv2), "Failed to save new shared pref file"); + if (NS_FAILED(SavePrefFileInternal(aFile))) + NS_ERROR("Failed to save new shared pref file"); + else + rv = NS_OK; } } diff --git a/tools/trace-malloc/spacecategory.c b/tools/trace-malloc/spacecategory.c index bac61a829ef..ace9fed056b 100644 --- a/tools/trace-malloc/spacecategory.c +++ b/tools/trace-malloc/spacecategory.c @@ -52,9 +52,6 @@ #include #include -/* -** Ugh, MSVC6's qsort is too slow... -*/ #include "nsQuickSort.h" #if defined(HAVE_BOUTELL_GD) diff --git a/tools/trace-malloc/spacetrace.c b/tools/trace-malloc/spacetrace.c index 68e3cd09ec0..3fa8bc95104 100644 --- a/tools/trace-malloc/spacetrace.c +++ b/tools/trace-malloc/spacetrace.c @@ -70,9 +70,6 @@ #include #endif /* HAVE_BOUTELL_GD */ -/* -** Ugh, MSVC6's qsort is too slow... -*/ #include "nsQuickSort.h" #include "prlong.h" /*