Merge central and inbound
authorMarco Bonardo <mbonardo@mozilla.com>
Fri, 23 Mar 2012 12:51:52 +0100
changeset 93458 b3e429486693a64a17ca096b30fd47d038623e1f
parent 93457 14b05b24d1e5eef9db7c2bac6687c74d1ad05fc9 (current diff)
parent 93430 c20ec27eb0e8ec666a987a6f71a3902257f8128d (diff)
child 93459 1152d14294df24ac807730e4861075a5a81d8474
push id886
push userlsblakk@mozilla.com
push dateMon, 04 Jun 2012 19:57:52 +0000
treeherdermozilla-beta@bbd8d5efd6d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone14.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Merge central and inbound
configure.in
--- a/configure.in
+++ b/configure.in
@@ -6284,49 +6284,42 @@ if test -n "$MOZ_TREE_FREETYPE"; then
    AC_DEFINE(HAVE_FT_GLYPHSLOT_EMBOLDEN)
    AC_DEFINE(HAVE_FT_LOAD_SFNT_TABLE)
    AC_SUBST(CAIRO_FT_CFLAGS)
 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'`
     changequote([,])
     if test ! "$MAKENSISU_VER" = ""; then
         MAKENSISU_MAJOR_VER=`echo $MAKENSISU_VER | $AWK -F\. '{ print $1 }'`
         MAKENSISU_MINOR_VER=`echo $MAKENSISU_VER | $AWK -F\. '{ print $2 }'`
     fi
     AC_MSG_CHECKING([for Unicode NSIS with major version == $REQ_NSIS_MAJOR_VER and minor version >= $MIN_NSIS_MINOR_VER])
     if test "$MAKENSISU_VER" = "" ||
        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
     AC_MSG_ERROR([no tar archiver found in \$PATH])
 fi
 AC_MSG_RESULT([$TAR])
 AC_SUBST(TAR)
 
@@ -8355,16 +8348,17 @@ AC_SUBST(MOZ_PSM)
 AC_SUBST(MOZ_DEBUG)
 AC_SUBST(MOZ_DEBUG_SYMBOLS)
 AC_SUBST(MOZ_DEBUG_ENABLE_DEFS)
 AC_SUBST(MOZ_DEBUG_DISABLE_DEFS)
 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)
 AC_SUBST(MOZ_ENABLE_PROFILER_SPS)
 AC_SUBST(MOZ_JPROF)
 AC_SUBST(MOZ_SHARK)
 AC_SUBST(MOZ_CALLGRIND)
 AC_SUBST(MOZ_VTUNE)
--- a/content/canvas/src/ImageData.cpp
+++ b/content/canvas/src/ImageData.cpp
@@ -52,20 +52,20 @@ NS_IMETHODIMP
 ImageData::GetHeight(PRUint32* aHeight)
 {
   *aHeight = GetHeight();
   return NS_OK;
 }
 
 /* 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
 ImageData::HoldData()
 {
   NS_HOLD_JS_OBJECTS(this, ImageData);
 }
 
--- a/content/canvas/src/ImageData.h
+++ b/content/canvas/src/ImageData.h
@@ -46,20 +46,16 @@ public:
   uint32_t GetWidth()
   {
     return mWidth;
   }
   uint32_t GetHeight()
   {
     return mHeight;
   }
-  JS::Value GetData()
-  {
-    return JS::ObjectOrNullValue(GetDataObject());
-  }
   JSObject* GetDataObject()
   {
     xpc_UnmarkGrayObject(mData);
     return mData;
   }
 
 private:
   void HoldData();
--- a/dom/interfaces/canvas/nsIDOMCanvasRenderingContext2D.idl
+++ b/dom/interfaces/canvas/nsIDOMCanvasRenderingContext2D.idl
@@ -62,17 +62,17 @@ interface nsIDOMTextMetrics : nsISupport
   readonly attribute float width;
 };
 
 [scriptable, builtinclass, uuid(1ea11207-b3e3-4ffc-a256-bf5c7011e806)]
 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)]
 interface nsIDOMCanvasRenderingContext2D : nsISupports
 {
   // back-reference to the canvas element for which
   // this context was created
   readonly attribute nsIDOMHTMLCanvasElement canvas;
--- a/modules/libpref/public/Preferences.h
+++ b/modules/libpref/public/Preferences.h
@@ -347,16 +347,22 @@ public:
   static void MirrorPreferences(nsTArray<PrefTuple,
                                 nsTArrayInfallibleAllocator> *aArray);
   static bool MirrorPreference(const char *aPref, PrefTuple *aTuple);
   static void ClearContentPref(const char *aPref);
   static void SetPreference(const PrefTuple *aTuple);
 
 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);
   nsresult ReadAndOwnSharedUserPrefFile(nsIFile *aFile);
   nsresult SavePrefFileInternal(nsIFile* aFile);
   nsresult WritePrefFile(nsIFile* aFile);
   nsresult MakeBackupPrefFile(nsIFile *aFile);
 
--- a/modules/libpref/src/Preferences.cpp
+++ b/modules/libpref/src/Preferences.cpp
@@ -399,24 +399,26 @@ Preferences::ReadUserPrefs(nsIFile *aFil
   if (XRE_GetProcessType() == GeckoProcessType_Content) {
     NS_ERROR("cannot load prefs from content process");
     return NS_ERROR_NOT_AVAILABLE;
   }
 
   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;
 }
 
 NS_IMETHODIMP
 Preferences::ResetPrefs()
 {
   if (XRE_GetProcessType() == GeckoProcessType_Content) {
     NS_ERROR("cannot set prefs from content process");
@@ -582,28 +584,30 @@ Preferences::NotifyServiceObservers(cons
   observerService->NotifyObservers(subject, aTopic, nsnull);
   
   return NS_OK;
 }
 
 nsresult
 Preferences::UseDefaultPrefFile()
 {
-  nsresult rv, rv2;
+  nsresult rv;
   nsCOMPtr<nsIFile> aFile;
 
   rv = NS_GetSpecialDirectory(NS_APP_PREFS_50_FILE, getter_AddRefs(aFile));
   if (NS_SUCCEEDED(rv)) {
     rv = ReadAndOwnUserPrefFile(aFile);
     // Most likely cause of failure here is that the file didn't
     // 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;
     }
   }
   
   return rv;
 }
 
 nsresult
 Preferences::UseUserPrefFile()
--- a/tools/trace-malloc/spacecategory.c
+++ b/tools/trace-malloc/spacecategory.c
@@ -47,19 +47,16 @@
 
 /*
 ** Required include files.
 */
 #include "spacetrace.h"
 #include <ctype.h>
 #include <string.h>
 
-/*
-** Ugh, MSVC6's qsort is too slow...
-*/
 #include "nsQuickSort.h"
 
 #if defined(HAVE_BOUTELL_GD)
 /*
 ** See http://www.boutell.com/gd for the GD graphics library.
 ** Ports for many platorms exist.
 ** Your box may already have the lib (mine did, redhat 7.1 workstation).
 */
--- a/tools/trace-malloc/spacetrace.c
+++ b/tools/trace-malloc/spacetrace.c
@@ -65,19 +65,16 @@
 ** Your box may already have the lib (mine did, redhat 7.1 workstation).
 */
 #include <gd.h>
 #include <gdfontt.h>
 #include <gdfonts.h>
 #include <gdfontmb.h>
 #endif /* HAVE_BOUTELL_GD */
 
-/*
-** Ugh, MSVC6's qsort is too slow...
-*/
 #include "nsQuickSort.h"
 #include "prlong.h"
 /*
 **  strcasecmp API please.
 */
 #if defined(_MSC_VER)
 #define strcasecmp _stricmp
 #define strncasecmp _strnicmp