From ff77de74d3c37e4595adcb753712aeb272d34a2a Mon Sep 17 00:00:00 2001 From: Serge Gautherie Date: Fri, 23 Mar 2012 02:13:13 +0100 Subject: [PATCH 1/4] Bug 604266. (Av1c) Remove --disable-installer option from configure.in. r=ted.mielczarek. --- configure.in | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/configure.in b/configure.in index 0c2dfefb3f2..21d5e494ed0 100644 --- a/configure.in +++ b/configure.in @@ -6290,19 +6290,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'` @@ -6316,13 +6311,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 @@ -8363,6 +8356,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) From e3fab38561b704eb6ae64e101b507592f5edb07c Mon Sep 17 00:00:00 2001 From: Serge Gautherie Date: Fri, 23 Mar 2012 02:13:20 +0100 Subject: [PATCH 2/4] Bug 735573. (Av1) Document UseDefaultPrefFile() and fix its nsresult value. r=bsmedberg. --- modules/libpref/public/Preferences.h | 6 ++++++ modules/libpref/src/Preferences.cpp | 14 +++++++++----- 2 files changed, 15 insertions(+), 5 deletions(-) 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; } } From e9aa7bcb5e43bdef0ce4b216a331d7f720757585 Mon Sep 17 00:00:00 2001 From: Serge Gautherie Date: Fri, 23 Mar 2012 02:58:24 +0100 Subject: [PATCH 3/4] Bug 712552. (Av1) Remove MSVC6 support from trace-malloc. r=dbaron. DONTBUILD (comment-only). --- tools/trace-malloc/spacecategory.c | 3 --- tools/trace-malloc/spacetrace.c | 3 --- 2 files changed, 6 deletions(-) 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" /* From 18b67b5a12287a8ce781ef1fa3f480d9566ec4e2 Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Tue, 20 Mar 2012 13:57:00 -0700 Subject: [PATCH 4/4] Bug 736752 - Compartment mismatch in JetPack 'test-content-proxy.testTypedArrays', r=bholley --- content/canvas/src/ImageData.cpp | 6 +++--- content/canvas/src/ImageData.h | 4 ---- dom/interfaces/canvas/nsIDOMCanvasRenderingContext2D.idl | 2 +- 3 files changed, 4 insertions(+), 8 deletions(-) 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)]