25034529 Upgrade Firefox to version 45.5.0 ESR
authorPetr Sumbera <petr.sumbera@oracle.com>
Wed, 02 Nov 2016 08:17:06 -0700
changeset 7309 2655ef11c386
parent 7308 69f1f375673e
child 7310 88d40c6177a1
25034529 Upgrade Firefox to version 45.5.0 ESR 25099456 problem in FIREFOX/BROWSER
components/desktop/firefox/Makefile
components/desktop/firefox/patches/firefox-01-cairo-perf.patch
components/desktop/firefox/patches/firefox-03-strcasestr.patch
components/desktop/firefox/patches/firefox-06-hnjfile.patch
components/desktop/firefox/patches/firefox-09-gthread-dlopen.patch
components/desktop/firefox/patches/firefox-10-webaudio_math.patch
components/desktop/firefox/patches/firefox-13-LocalFileUnix.patch
components/desktop/firefox/patches/firefox-14-uname.patch
components/desktop/firefox/patches/firefox-16-mftt_infinity.patch
components/desktop/firefox/patches/firefox-17-xpt-as-flag.patch
components/desktop/firefox/patches/firefox-19-cubeb.patch
components/desktop/firefox/patches/firefox-25-rules_mk.patch
components/desktop/firefox/patches/firefox-26-jit-test-multi-processes.patch
components/desktop/firefox/patches/firefox-27-stacksize.patch
components/desktop/firefox/patches/firefox-30-other-buildissue.patch
components/desktop/firefox/patches/firefox-32-solaris_jemalloc_linkage.patch
components/desktop/firefox/patches/firefox-33-ycbcr2.patch
components/desktop/firefox/patches/firefox-35-mozalloc.patch
components/desktop/firefox/patches/firefox-36-xpopen.patch
components/desktop/firefox/patches/firefox-37-ipc.patch
components/desktop/firefox/patches/firefox-43-xpcom.patch
components/desktop/firefox/patches/firefox-47-unreachable.patch
components/desktop/firefox/patches/firefox-48-donot-disable-locale-addon.patch
components/desktop/firefox/patches/firefox-50-arc4random.patch
components/desktop/firefox/patches/firefox-52-sincos.patch
components/desktop/firefox/test/results-32.master
--- a/components/desktop/firefox/Makefile	Tue Nov 15 03:50:06 2016 -0800
+++ b/components/desktop/firefox/Makefile	Wed Nov 02 08:17:06 2016 -0700
@@ -34,20 +34,20 @@
 GCC_ROOT = /usr/gcc/4.9
 
 COMPONENT_NAME =		firefox
-COMPONENT_VERSION =		45.4.0esr
+COMPONENT_VERSION =		45.5.0esr
 COMPONENT_PROJECT_URL =		http://www.mozilla.com/firefox
 COMPONENT_SRC_NAME =		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
 COMPONENT_SRC = 		$(COMPONENT_SRC_NAME)
 COMPONENT_ARCHIVE =		$(COMPONENT_SRC_NAME).source.tar.xz
 COMPONENT_ARCHIVE_HASH = \
-    sha256:cfd90096b9e1019b9de4fe061ece8c65f668b8a24bcbb657ce6b3c940ef83ad0
+    sha256:3e843ca257bf64e11e547e9afdbce797838eb6e01449d2f313c0d1d3117450f1
 MOZILLA_FTP = 		        http://ftp.mozilla.org/pub/mozilla.org/$(COMPONENT_NAME)/releases/$(COMPONENT_VERSION)
 COMPONENT_ARCHIVE_URL =		$(MOZILLA_FTP)/source/$(COMPONENT_ARCHIVE)
 COMPONENT_BUGDB =		firefox/browser
 
-TPNO=				31455
+TPNO=				32479
 
-IPS_COMPONENT_VERSION =		45.4.0
+IPS_COMPONENT_VERSION =		45.5.0
 
 # There are a set of .xpi files (as given in the LANG_LIST definition below)
 # that we need. These are available under:
@@ -58,7 +58,7 @@
 # collide due to different files with identical .xpi names.
 COMPONENT_ARCHIVE_1 =           $(COMPONENT_SRC_NAME)-xpi.tar.gz
 COMPONENT_ARCHIVE_HASH_1 = \
-	sha256:7a1cfadd2bdc81c7e4ecfdf138ec565a8baf7fbb087491db201e0c4fe8994299
+	sha256:dacc2bdd239e120c3903ef302164e71a1e76f1fca5be571f1005e0c8137f2777
 COMPONENT_ARCHIVE_URL_1 =       $(INTERNAL_ARCHIVE_MIRROR)/$(COMPONENT_ARCHIVE_1)
 
 LANG_LIST = ar be bg ca cs da de el es-AR es-CL es-ES et fi \
--- a/components/desktop/firefox/patches/firefox-01-cairo-perf.patch	Tue Nov 15 03:50:06 2016 -0800
+++ b/components/desktop/firefox/patches/firefox-01-cairo-perf.patch	Wed Nov 02 08:17:06 2016 -0700
@@ -8,7 +8,7 @@
 --- a/gfx/cairo/cairo/src/cairo-xlib-surface.c
 +++ b/gfx/cairo/cairo/src/cairo-xlib-surface.c
 @@ -2325,6 +2325,7 @@
-                           cairo_region_t *clip_region)
+ 			   cairo_region_t *clip_region)
  {
      cairo_image_surface_t *image;
 +    cairo_format_masks_t image_masks;
@@ -16,8 +16,8 @@
      cairo_status_t status;
      int tx, ty;
 @@ -2341,6 +2342,16 @@
-            (image->base.content & CAIRO_CONTENT_ALPHA) == 0)))
-        return CAIRO_INT_STATUS_UNSUPPORTED;
+ 	    (image->base.content & CAIRO_CONTENT_ALPHA) == 0)))
+ 	return CAIRO_INT_STATUS_UNSUPPORTED;
  
 +    if (image->base.backend->type == CAIRO_SURFACE_TYPE_IMAGE) {
 +       if (_pixman_format_to_masks (image->pixman_format, &image_masks)) {
@@ -30,5 +30,5 @@
 +    }
 +
      if (image->base.backend->type != CAIRO_SURFACE_TYPE_IMAGE) {
-        if (image->base.backend->type == CAIRO_INTERNAL_SURFACE_TYPE_SNAPSHOT) {
-            image = (cairo_image_surface_t *) ((cairo_surface_snapshot_t *) image)->target;
+ 	if (image->base.backend->type == CAIRO_INTERNAL_SURFACE_TYPE_SNAPSHOT) {
+ 	    image = (cairo_image_surface_t *) ((cairo_surface_snapshot_t *) image)->target;
--- a/components/desktop/firefox/patches/firefox-03-strcasestr.patch	Tue Nov 15 03:50:06 2016 -0800
+++ b/components/desktop/firefox/patches/firefox-03-strcasestr.patch	Wed Nov 02 08:17:06 2016 -0700
@@ -1,6 +1,8 @@
 The 'uname' part is necessary because the uname() function returns a
 non-negative value.
 
+https://bugzilla.mozilla.org/show_bug.cgi?id=1314904
+
 diff --git a/widget/GfxInfoX11.cpp b/widget/GfxInfoX11.cpp
 --- a/widget/GfxInfoX11.cpp
 +++ b/widget/GfxInfoX11.cpp
--- a/components/desktop/firefox/patches/firefox-06-hnjfile.patch	Tue Nov 15 03:50:06 2016 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-This allows us to access some function from wchar.h that other platforms
-can get from stdio.h. 
-Potentially add an ifdef Solaris statement to try and send upstream.
-
-diff --git a/intl/hyphenation/glue/hnjalloc.h b/intl/hyphenation/glue/hnjalloc.h
---- a/intl/hyphenation/glue/hnjalloc.h
-+++ b/intl/hyphenation/glue/hnjalloc.h
[email protected]@ -24,6 +24,7 @@
-  */
- 
- #include <stdio.h> /* ensure stdio.h is loaded before our macros */
-+#include <wchar.h>
- 
- #undef FILE 
- #define FILE hnjFile
--- a/components/desktop/firefox/patches/firefox-09-gthread-dlopen.patch	Tue Nov 15 03:50:06 2016 -0800
+++ b/components/desktop/firefox/patches/firefox-09-gthread-dlopen.patch	Wed Nov 02 08:17:06 2016 -0700
@@ -5,7 +5,7 @@
 --- a/xpcom/glue/standalone/nsXPCOMGlue.cpp
 +++ b/xpcom/glue/standalone/nsXPCOMGlue.cpp
 @@ -386,6 +386,8 @@
-     }   
+     }
    }
  
 +  static void* gthreadso = dlopen("libgthread-2.0.so.0", RTLD_GLOBAL | RTLD_LAZY);
--- a/components/desktop/firefox/patches/firefox-10-webaudio_math.patch	Tue Nov 15 03:50:06 2016 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-This allows us to get some function from math.h that other platforms are
-getting elsewhere.
-Can potentially send upstream with ifdef Solaris statement.
-
-diff --git a/dom/media/webaudio/ThreeDPoint.h b/dom/media/webaudio/ThreeDPoint.h
---- a/dom/media/webaudio/ThreeDPoint.h
-+++ b/dom/media/webaudio/ThreeDPoint.h
[email protected]@ -8,6 +8,7 @@
- #define ThreeDPoint_h_
-  
- #include <cmath>
-+#include <math.h>
- #include <algorithm>
- 
- namespace mozilla {
-diff --git a/dom/media/webaudio/blink/DenormalDisabler.h b/dom/media/webaudio/blink/DenormalDisabler.h        
---- a/dom/media/webaudio/blink/DenormalDisabler.h
-+++ b/dom/media/webaudio/blink/DenormalDisabler.h
[email protected]@ -27,6 +27,7 @@
- 
- #define _USE_MATH_DEFINES
- #include <cmath>
-+#include <math.h>
- #include <float.h>
- 
- namespace WebCore {
--- a/components/desktop/firefox/patches/firefox-13-LocalFileUnix.patch	Tue Nov 15 03:50:06 2016 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-Another ifdef Solaris patch. Some function is defined in limits.h that other 
-platforms can get elsewhere.  
-Can potentially send upstream with ifdef Solaris statement.
-
-diff --git a/xpcom/io/nsLocalFileUnix.cpp b/xpcom/io/nsLocalFileUnix.cpp
---- a/xpcom/io/nsLocalFileUnix.cpp
-+++ b/xpcom/io/nsLocalFileUnix.cpp
[email protected]@ -14,6 +14,7 @@
- #include <sys/types.h>
- #include <sys/stat.h>
- #include <unistd.h>
-+#include <limits.h>
- #include <fcntl.h>
- #include <errno.h>
- #include <utime.h>
--- a/components/desktop/firefox/patches/firefox-14-uname.patch	Tue Nov 15 03:50:06 2016 -0800
+++ b/components/desktop/firefox/patches/firefox-14-uname.patch	Wed Nov 02 08:17:06 2016 -0700
@@ -1,5 +1,6 @@
 The uname() function on Solaris can return a non-negative value.
-Solaris specific patch, will not send upstream
+
+https://bugzilla.mozilla.org/show_bug.cgi?id=1314904
 
 diff --git a/toolkit/components/startup/nsUserInfoUnix.cpp b/toolkit/components/startup/nsUserInfoUnix.cpp
 --- a/toolkit/components/startup/nsUserInfoUnix.cpp
--- a/components/desktop/firefox/patches/firefox-16-mftt_infinity.patch	Tue Nov 15 03:50:06 2016 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-We use a different function from the one in ieeefp.h.
-This may be a studio specific patch. Need to investigate if this can be
-removed.
-
-diff --git a/mfbt/decimal/Decimal.cpp b/mfbt/decimal/Decimal.cpp
---- a/mfbt/decimal/Decimal.cpp
-+++ b/mfbt/decimal/Decimal.cpp
[email protected]@ -33,6 +33,7 @@
- 
- #include <algorithm>
- #include <float.h>
-+#include <ieeefp.h>
- 
- using namespace moz_decimal_utils;
- 
[email protected]@ -686,13 +687,13 @@
- 
- Decimal Decimal::fromDouble(double doubleValue)
- {
--    if (std::isfinite(doubleValue))
-+    if (finite(doubleValue))
-         return fromString(mozToString(doubleValue));
- 
--    if (std::isinf(doubleValue))
--        return infinity(doubleValue < 0 ? Negative : Positive);
-+    if (isnand(doubleValue))
-+        return nan();
- 
--    return nan();
-+    return infinity(doubleValue < 0 ? Negative : Positive);
- }
- 
- Decimal Decimal::fromString(const String& str)
--- a/components/desktop/firefox/patches/firefox-17-xpt-as-flag.patch	Tue Nov 15 03:50:06 2016 -0800
+++ b/components/desktop/firefox/patches/firefox-17-xpt-as-flag.patch	Wed Nov 02 08:17:06 2016 -0700
@@ -5,8 +5,8 @@
 diff --git a/xpcom/reflect/xptcall/md/unix/moz.build b/xpcom/reflect/xptcall/md/unix/moz.build
 --- a/xpcom/reflect/xptcall/md/unix/moz.build
 +++ b/xpcom/reflect/xptcall/md/unix/moz.build
[email protected]@ -267,9 +270,6 @@
-     ]
[email protected]@ -47,9 +47,6 @@
+         ]
  
  if CONFIG['OS_ARCH'] == 'SunOS' and '86' in CONFIG['OS_TEST']:
 -    GENERATED_FILES = [
--- a/components/desktop/firefox/patches/firefox-19-cubeb.patch	Tue Nov 15 03:50:06 2016 -0800
+++ b/components/desktop/firefox/patches/firefox-19-cubeb.patch	Wed Nov 02 08:17:06 2016 -0700
@@ -4,9 +4,9 @@
 diff --git a/media/libcubeb/src/cubeb.c b/media/libcubeb/src/cubeb.c
 --- a/media/libcubeb/src/cubeb.c
 +++ b/media/libcubeb/src/cubeb.c
[email protected]@ -56,6 +56,9 @@
- #if defined(USE_AUDIOTRACK)
- int audiotrack_init(cubeb ** context, char const * context_name);
[email protected]@ -60,6 +60,9 @@
+ #if defined(USE_KAI)
+ int kai_init(cubeb ** context, char const * context_name);
  #endif
 +#if defined(USE_SUN)
 +int sunaudio_init(cubeb ** context, char const * context_name);
@@ -14,9 +14,9 @@
  
  int
  validate_stream_params(cubeb_stream_params stream_params)
[email protected]@ -122,6 +125,9 @@
- #if defined(USE_AUDIOTRACK)
-     audiotrack_init,
[email protected]@ -129,6 +132,9 @@
+ #if defined(USE_KAI)
+     kai_init,
  #endif
 +#if defined(USE_SUN)
 +    sunaudio_init,
--- a/components/desktop/firefox/patches/firefox-25-rules_mk.patch	Tue Nov 15 03:50:06 2016 -0800
+++ b/components/desktop/firefox/patches/firefox-25-rules_mk.patch	Wed Nov 02 08:17:06 2016 -0700
@@ -4,9 +4,9 @@
 diff --git a/config/rules.mk b/config/rules.mk
 --- a/config/rules.mk
 +++ b/config/rules.mk
[email protected]@ -1402,7 +1402,7 @@
[email protected]@ -1350,7 +1350,7 @@
  nsinstall_is_usable = $(if $(wildcard $(DEPTH)/config/nsinstall$(HOST_BIN_SUFFIX)),yes)
-     
+ 
  define install_cmd_override
 -$(1): install_cmd = $$(if $$(nsinstall_is_usable),$$(INSTALL),$$(NSINSTALL_PY) -t) $$(1)
 +$(1): install_cmd = $$(if $(wildcard $(DIST)/bin/nsinstall$(HOST_BIN_SUFFIX)),$$(INSTALL),$$(NSINSTALL_PY) -t) $$(1)
--- a/components/desktop/firefox/patches/firefox-26-jit-test-multi-processes.patch	Tue Nov 15 03:50:06 2016 -0800
+++ b/components/desktop/firefox/patches/firefox-26-jit-test-multi-processes.patch	Wed Nov 02 08:17:06 2016 -0700
@@ -5,7 +5,7 @@
 diff --git a/js/src/Makefile.in b/js/src/Makefile.in
 --- a/js/src/Makefile.in
 +++ b/js/src/Makefile.in
[email protected]@ -134,7 +134,7 @@
[email protected]@ -101,7 +101,7 @@
  
  check-jit-test::
  	$(JITTEST_SANITIZER_ENV) $(wildcard $(RUN_TEST_PROGRAM)) $(PYTHON) -u $(srcdir)/jit-test/jit_test.py \
@@ -13,4 +13,4 @@
 +	        --no-slow --no-progress --format=automation --jitflags=all -j 2 -f \
  			$(JITTEST_VALGRIND_FLAG) \
  			$(JITTEST_EXTRA_ARGS) \
-                	$(DIST)/bin/$(JS_SHELL_NAME)$(BIN_SUFFIX)
+ 	        $(DIST)/bin/$(JS_SHELL_NAME)$(BIN_SUFFIX) $(JITTEST_TEST_ARGS)
--- a/components/desktop/firefox/patches/firefox-27-stacksize.patch	Tue Nov 15 03:50:06 2016 -0800
+++ b/components/desktop/firefox/patches/firefox-27-stacksize.patch	Wed Nov 02 08:17:06 2016 -0700
@@ -4,7 +4,7 @@
 diff --git a/js/src/jsapi.cpp b/js/src/jsapi.cpp
 --- a/js/src/jsapi.cpp
 +++ b/js/src/jsapi.cpp
[email protected]@ -1491,6 +1491,9 @@
[email protected]@ -1550,6 +1550,9 @@
  static void
  SetNativeStackQuotaAndLimit(JSRuntime* rt, StackKind kind, size_t stackSize)
  {
@@ -12,5 +12,5 @@
 +    stackSize = stackSize * 8 < 7 * 1024 * 1024 ? stackSize * 8 : 7 * 1024 * 1024;
 +#endif
      rt->nativeStackQuota[kind] = stackSize;
-      
+ 
  #if JS_STACK_GROWTH_DIRECTION > 0
--- a/components/desktop/firefox/patches/firefox-30-other-buildissue.patch	Tue Nov 15 03:50:06 2016 -0800
+++ b/components/desktop/firefox/patches/firefox-30-other-buildissue.patch	Wed Nov 02 08:17:06 2016 -0700
@@ -1,95 +1,5 @@
-Various ifdef Solaris fixes. 
 Recast for getpid() because it requires an int. 
-Changing default flags for compiling on SSE. We can try removing these or add
-them to the config lines in Makefile. 
 
-diff --git a/build/gyp.mozbuild b/build/gyp.mozbuild
---- a/build/gyp.mozbuild
-+++ b/build/gyp.mozbuild
[email protected]@ -45,6 +45,7 @@
-     'moz_widget_toolkit_gonk': 0,
-     'moz_webrtc_omx': 0,
- 
-+    'use_official_google_api_keys': 0,
-     # (for vp8) chromium sets to 0 also
-     'use_temporal_layers': 0,
- 
-diff --git a/configure b/configure
---- a/configure
-+++ b/configure
[email protected]@ -9650,8 +9650,8 @@
-        CXXFLAGS="$CXXFLAGS -xlibmieee -xbuiltin=%all -features=tmplife,tmplrefstatic,extensions,no%except -norunpath -D__FUNCTION__=__func__ -template=no%extdef"
-        LDFLAGS="-xildoff $LDFLAGS"
-        MMX_FLAGS="-xarch=mmx -xO4"
--       SSE_FLAGS="-xarch=sse"
--       SSE2_FLAGS="-xarch=ssei2 -xO4"
-+       SSE_FLAGS="-xarch=sse -xO4"
-+       SSE2_FLAGS="-xarch=sse2 -xO4"
-        if test -z "$CROSS_COMPILE" -a -f /usr/lib/ld/map.noexstk; then
-            _SAVE_LDFLAGS=$LDFLAGS
-            LDFLAGS="-M /usr/lib/ld/map.noexstk $LDFLAGS"
-diff --git a/media/libsoundtouch/src/FIRFilter.cpp b/media/libsoundtouch/src/FIRFilter.cpp
---- a/media/libsoundtouch/src/FIRFilter.cpp
-+++ b/media/libsoundtouch/src/FIRFilter.cpp
[email protected]@ -46,6 +46,10 @@
- #include "FIRFilter.h"
- #include "cpu_detect.h"
- 
-+#ifdef __sun
-+#include <alloca.h>
-+#endif
-+
- using namespace soundtouch;
- 
- /*****************************************************************************
-diff --git a/media/libsoundtouch/src/SoundTouch.cpp b/media/libsoundtouch/src/SoundTouch.cpp
---- a/media/libsoundtouch/src/SoundTouch.cpp
-+++ b/media/libsoundtouch/src/SoundTouch.cpp
[email protected]@ -80,6 +80,10 @@
- #include "RateTransposer.h"
- #include "cpu_detect.h"
- 
-+#ifdef __sun
-+#include <alloca.h>
-+#endif
-+
- using namespace soundtouch;
- 
- /// test if two floating point numbers are equal
-diff --git a/media/webrtc/trunk/build/common.gypi b/media/webrtc/trunk/build/common.gypi
---- a/media/webrtc/trunk/build/common.gypi
-+++ b/media/webrtc/trunk/build/common.gypi
[email protected]@ -917,11 +917,16 @@
-     'android_app_version_name%': 'Developer Build',
-     'android_app_version_code%': 0,
- 
--    'sas_dll_exists': '<!(<(PYTHON) <(DEPTH)/build/dir_exists.py <(sas_dll_path))',
--    'wix_exists': '<!(<(PYTHON) <(DEPTH)/build/dir_exists.py <(wix_path))',
-+    'conditions': [
-+      ['OS=="win"', {
-+        'sas_dll_exists': '<!(<(PYTHON) <(DEPTH)/build/dir_exists.py <(sas_dll_path))',
-+        'wix_exists': '<!(<(PYTHON) <(DEPTH)/build/dir_exists.py <(wix_path))',
-+      }],
-+    ],
- 
-     'windows_sdk_default_path': '<(DEPTH)/third_party/platformsdk_win8/files',
-     'directx_sdk_default_path': '<(DEPTH)/third_party/directxsdk/files',
-+    'windows_sdk_path%': 'C:/Program Files (x86)/Windows Kits/8.0',
- 
-     'conditions': [
-       ['"<!(<(PYTHON) <(DEPTH)/build/dir_exists.py <(windows_sdk_default_path))"=="True"', {
-diff --git a/memory/volatile/VolatileBufferFallback.cpp b/memory/volatile/VolatileBufferFallback.cpp
---- a/memory/volatile/VolatileBufferFallback.cpp
-+++ b/memory/volatile/VolatileBufferFallback.cpp
[email protected]@ -7,7 +7,7 @@
- #include "mozilla/mozalloc.h"
- 
- #ifdef MOZ_MEMORY
--int posix_memalign(void** memptr, size_t alignment, size_t size);
-+extern "C" int posix_memalign(void** memptr, size_t alignment, size_t size);
- #endif
- 
- namespace mozilla {
 diff --git a/xpcom/base/nsStatusReporterManager.cpp b/xpcom/base/nsStatusReporterManager.cpp
 --- a/xpcom/base/nsStatusReporterManager.cpp
 +++ b/xpcom/base/nsStatusReporterManager.cpp
--- a/components/desktop/firefox/patches/firefox-32-solaris_jemalloc_linkage.patch	Tue Nov 15 03:50:06 2016 -0800
+++ b/components/desktop/firefox/patches/firefox-32-solaris_jemalloc_linkage.patch	Wed Nov 02 08:17:06 2016 -0700
@@ -28,7 +28,7 @@
 diff --git a/storage/mozStorageService.cpp b/storage/mozStorageService.cpp
 --- a/storage/mozStorageService.cpp
 +++ b/storage/mozStorageService.cpp
[email protected]@ -514,9 +514,14 @@
[email protected]@ -528,9 +528,14 @@
    int rc;
  
  #ifdef MOZ_STORAGE_MEMORY
@@ -45,7 +45,7 @@
 +  free(test_jemalloc);
  #endif
  
-   // Explicitly initialize sqlite3.  Although this is implicitly called by
+   // TODO (bug 1191405): do not preallocate the connections caches until we
 diff --git a/memory/jemalloc/src/include/jemalloc/internal/jemalloc_internal.h.in b/memory/jemalloc/src/include/jemalloc/internal/jemalloc_internal.h.in
 --- a/memory/jemalloc/src/include/jemalloc/internal/jemalloc_internal.h.in
 +++ b/memory/jemalloc/src/include/jemalloc/internal/jemalloc_internal.h.in
--- a/components/desktop/firefox/patches/firefox-33-ycbcr2.patch	Tue Nov 15 03:50:06 2016 -0800
+++ b/components/desktop/firefox/patches/firefox-33-ycbcr2.patch	Wed Nov 02 08:17:06 2016 -0700
@@ -27,4 +27,4 @@
 +#endif
  }
  
- }  // namespace gfx
+ } // namespace gfx
--- a/components/desktop/firefox/patches/firefox-35-mozalloc.patch	Tue Nov 15 03:50:06 2016 -0800
+++ b/components/desktop/firefox/patches/firefox-35-mozalloc.patch	Wed Nov 02 08:17:06 2016 -0700
@@ -5,8 +5,8 @@
 diff --git a/memory/mozalloc/mozalloc.cpp b/memory/mozalloc/mozalloc.cpp
 --- a/memory/mozalloc/mozalloc.cpp
 +++ b/memory/mozalloc/mozalloc.cpp
[email protected]@ -208,6 +208,8 @@
- #endif // if defined(HAVE_VALLOC) 
[email protected]@ -197,6 +197,8 @@
+ #endif // if defined(HAVE_VALLOC)
  
  #ifndef MOZ_STATIC_RUNTIME
 +extern "C" size_t malloc_usable_size(const void *ptr);
--- a/components/desktop/firefox/patches/firefox-36-xpopen.patch	Tue Nov 15 03:50:06 2016 -0800
+++ b/components/desktop/firefox/patches/firefox-36-xpopen.patch	Wed Nov 02 08:17:06 2016 -0700
@@ -4,7 +4,7 @@
 diff --git a/configure b/configure
 --- a/configure
 +++ b/configure
[email protected]@ -9759,6 +9759,8 @@
[email protected]@ -10323,6 +10323,8 @@
  cross_compiling=$ac_cv_prog_cc_cross
  
      else
@@ -12,4 +12,4 @@
 +       CXXFLAGS="$CXXFLAGS -D_XPG6 -D__EXTENSIONS__"
         LDFLAGS="$LDFLAGS -Wl,-z,ignore -Wl,-R,'\$\$ORIGIN:\$\$ORIGIN/..' -Wl,-z,lazyload -Wl,-z,combreloc -Wl,-z,muldefs"
         LIBS="-lc $LIBS"
-        MKSHLIB_FORCE_ALL='-Wl,-z -Wl,allextract'
+        ASFLAGS="$ASFLAGS -fPIC"
--- a/components/desktop/firefox/patches/firefox-37-ipc.patch	Tue Nov 15 03:50:06 2016 -0800
+++ b/components/desktop/firefox/patches/firefox-37-ipc.patch	Wed Nov 02 08:17:06 2016 -0700
@@ -42,7 +42,7 @@
 diff --git a/configure b/configure
 --- a/configure
 +++ b/configure
[email protected]@ -9647,7 +9647,7 @@
[email protected]@ -10213,7 +10213,7 @@
  EOF
  
         CFLAGS="$CFLAGS -xlibmieee -xstrconst -xbuiltin=%all -D__FUNCTION__=__func__"
@@ -50,7 +50,7 @@
 +       CXXFLAGS="$CXXFLAGS -xlibmieee -xbuiltin=%all -features=tmplife,tmplrefstatic,extensions,no%except -norunpath -D__FUNCTION__=__func__ -template=no%extdef -D_XOPEN_SOURCE=500 -D__EXTENSIONS__"
         LDFLAGS="-xildoff $LDFLAGS"
         MMX_FLAGS="-xarch=mmx -xO4"
-        SSE_FLAGS="-xarch=sse -xO4"
+        SSE_FLAGS="-xarch=sse"
 diff --git a/dom/plugins/ipc/PluginMessageUtils.cpp b/dom/plugins/ipc/PluginMessageUtils.cpp
 --- a/dom/plugins/ipc/PluginMessageUtils.cpp
 +++ b/dom/plugins/ipc/PluginMessageUtils.cpp
--- a/components/desktop/firefox/patches/firefox-43-xpcom.patch	Tue Nov 15 03:50:06 2016 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-Solaris-specific patch. Adds if def(SOLARIS) case.
-Do not plan to send upstream.
-
-diff --git a/xpcom/base/nsUUIDGenerator.cpp b/xpcom/base/nsUUIDGenerator.cpp
---- a/xpcom/base/nsUUIDGenerator.cpp
-+++ b/xpcom/base/nsUUIDGenerator.cpp
[email protected]@ -11,17 +11,17 @@
- #include <CoreFoundation/CoreFoundation.h>
- #else
- #include <stdlib.h>
- #include "prrng.h"
- #endif
- 
- #include "nsUUIDGenerator.h"
- 
--#ifdef ANDROID
-+#if defined(ANDROID) || defined(SOLARIS)
- extern "C" NS_EXPORT void arc4random_buf(void*, size_t);
- #endif
- 
- using namespace mozilla;
- 
- NS_IMPL_ISUPPORTS(nsUUIDGenerator, nsIUUIDGenerator)
- 
- nsUUIDGenerator::nsUUIDGenerator()
--- a/components/desktop/firefox/patches/firefox-47-unreachable.patch	Tue Nov 15 03:50:06 2016 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-In house patch, will not send upstream.
-ERR() function is already defined elsewhere. 
-
---- mozilla-esr38/gfx/angle/src/common/debug.h	2015-10-26 15:49:18.755193254 -0700
-+++ mozilla-esr38/gfx/angle/src/common/debug.h	2015-10-26 15:48:39.108802848 -0700
[email protected]@ -57,9 +57,9 @@ namespace gl
- 
- // A macro to output a function call and its arguments to the debugging log, in case of error.
- #if defined(ANGLE_TRACE_ENABLED)
--#define ERR(message, ...) gl::trace(false, gl::MESSAGE_ERR, "err: %s(%d): " message "\n", __FUNCTION__, __LINE__, ##__VA_ARGS__)
-+#define FFERR(message, ...) gl::trace(false, gl::MESSAGE_ERR, "err: %s(%d): " message "\n", __FUNCTION__, __LINE__, ##__VA_ARGS__)
- #else
--#define ERR(message, ...) (void(0))
-+#define FFERR(message, ...) (void(0))
- #endif
- 
- // A macro to log a performance event around a scope.
[email protected]@ -105,7 +105,7 @@ namespace gl
- #if !defined(NDEBUG)
- #define ASSERT(expression) { \
-     if(!(expression)) \
--        ERR("\t! Assert failed in %s(%d): "#expression"\n", __FUNCTION__, __LINE__); \
-+        FFERR("\t! Assert failed in %s(%d): "#expression"\n", __FUNCTION__, __LINE__); \
-         assert(expression); \
-     } ANGLE_EMPTY_STATEMENT
- #define UNUSED_ASSERTION_VARIABLE(variable)
[email protected]@ -144,11 +144,11 @@ namespace gl
- // A macro for code which is not expected to be reached under valid assumptions
- #if !defined(NDEBUG)
- #define UNREACHABLE() { \
--    ERR("\t! Unreachable reached: %s(%d)\n", __FUNCTION__, __LINE__); \
-+    FFERR("\t! Unreachable reached: %s(%d)\n", __FUNCTION__, __LINE__); \
-     assert(false); \
-     } ANGLE_EMPTY_STATEMENT
- #else
--    #define UNREACHABLE() ERR("\t! Unreachable reached: %s(%d)\n", __FUNCTION__, __LINE__)
-+    #define UNREACHABLE() FFERR("\t! Unreachable reached: %s(%d)\n", __FUNCTION__, __LINE__)
- #endif
- 
- #endif   // COMMON_DEBUG_H_
--- a/components/desktop/firefox/patches/firefox-48-donot-disable-locale-addon.patch	Tue Nov 15 03:50:06 2016 -0800
+++ b/components/desktop/firefox/patches/firefox-48-donot-disable-locale-addon.patch	Wed Nov 02 08:17:06 2016 -0700
@@ -8,12 +8,12 @@
 index 5ef66c9..7dcd0f5 100644
 --- a/browser/app/profile/firefox.js
 +++ b/browser/app/profile/firefox.js
[email protected]@ -61,7 +61,7 @@ pref("extensions.hotfix.certs.1.sha1Fingerprint", "F1:DB:F9:6A:7B:B8:04:FA:48:3C
[email protected]@ -74,7 +74,7 @@
  
  // Disable add-ons that are not installed by the user in all scopes by default.
  // See the SCOPE constants in AddonManager.jsm for values to use here.
 -pref("extensions.autoDisableScopes", 15);
 +pref("extensions.autoDisableScopes", 11);
  
- // Dictionary download preference
- pref("browser.dictionaries.download.url", "https://addons.mozilla.org/%LOCALE%/firefox/dictionaries/");
+ // Require signed add-ons by default
+ pref("xpinstall.signatures.required", true);
--- a/components/desktop/firefox/patches/firefox-50-arc4random.patch	Tue Nov 15 03:50:06 2016 -0800
+++ b/components/desktop/firefox/patches/firefox-50-arc4random.patch	Wed Nov 02 08:17:06 2016 -0700
@@ -3,26 +3,26 @@
 
 --- a/ipc/chromium/src/third_party/libevent/arc4random.c    2016-03-01 09:29:36.602447178 -0800
 +++ b/ipc/chromium/src/third_party/libevent/arc4random.c    2016-03-01 10:17:51.627857034 -0800
[email protected]@ -445,8 +445,8 @@ arc4random_stir(void)
[email protected]@ -445,8 +449,8 @@
  #endif
-
+ 
  #ifndef ARC4RANDOM_NOADDRANDOM
 -ARC4RANDOM_EXPORT void
 -arc4random_addrandom(const unsigned char *dat, int datlen)
 +extern void
 +arc4random_addrandom(uchar_t *dat, size_t datlen)
  {
-        int j;
-        _ARC4_LOCK();
[email protected]@ -477,7 +477,7 @@ arc4random(void)
+ 	int j;
+ 	_ARC4_LOCK();
[email protected]@ -477,7 +481,7 @@
  }
  #endif
-
+ 
 -ARC4RANDOM_EXPORT void
 +extern void
  arc4random_buf(void *_buf, size_t n)
  {
-        unsigned char *buf = _buf;
+ 	unsigned char *buf = _buf;
 --- a/config/system-headers	2015-11-03 11:34:17.000000000 +0100
 +++ b/config/system-headers	2015-11-09 03:34:24.577525000 +0100
 @@ -1064,7 +1064,6 @@
@@ -46,7 +46,7 @@
  #ifndef ARC4RANDOM_EXPORT
  #define ARC4RANDOM_EXPORT
  #endif
[email protected]@ -59,7 +61,7 @@
[email protected]@ -59,7 +63,7 @@
  #include <sys/param.h>
  #include <sys/time.h>
  #ifdef _EVENT_HAVE_SYS_SYSCTL_H
@@ -57,7 +57,7 @@
  #include <limits.h>
 --- a/ipc/chromium/moz.build	2016-03-28 13:41:06.878922929 -0700
 +++ b/ipc/chromium/moz.build	2016-03-28 13:42:04.555448660 -0700
[email protected]@ -161,6 +161,23 @@ if os_bsd or os_linux:
[email protected]@ -161,6 +161,23 @@
              'src/base/message_pump_qt.cc',
          ]
  
@@ -79,20 +79,20 @@
 +    LOCAL_INCLUDES += ['src/third_party/libevent/solaris']
 +
  ost = CONFIG['OS_TEST']
- if '86' not in ost and 'arm' not in ost and 'mips' not in ost:
+ if '86' not in ost and 'arm' not in ost and 'aarch64' != ost and 'mips' not in ost:
      SOURCES += [
 diff a/ipc/chromium/src/third_party/libeventcommon.mozbuild b/ipc/chromium/src/third_party/libeventcommon.mozbuild
 --- a/ipc/chromium/src/third_party/libeventcommon.mozbuild	2015-11-03 11:34:14.000000000 +0100
 +++ b/ipc/chromium/src/third_party/libeventcommon.mozbuild	2015-11-09 03:34:24.579311000 +0100
 @@ -9,6 +9,7 @@
- os_openbsd = 0
+ os_macosx = 0
  os_bsd = 0
  os_linux = 0
 +os_solaris = 0
  
  if CONFIG['OS_ARCH'] == 'WINNT':
      os_win = 1
[email protected]@ -21,6 +22,9 @@ else:
[email protected]@ -21,6 +22,9 @@
                                 'NetBSD', 'OpenBSD']:
          os_bsd = 1
          libevent_include_suffix = 'bsd'
--- a/components/desktop/firefox/patches/firefox-52-sincos.patch	Tue Nov 15 03:50:06 2016 -0800
+++ b/components/desktop/firefox/patches/firefox-52-sincos.patch	Wed Nov 02 08:17:06 2016 -0700
@@ -1,5 +1,5 @@
-DS is defined elsewhere, as is HAVE_SINCOS.
-Will not send upstream.
+https://bugzilla.mozilla.org/show_bug.cgi?id=1315956
+https://bugzilla.mozilla.org/show_bug.cgi?id=1315686
 
 --- a/js/src/jsmath.cpp    2016-03-22 13:29:37.873777320 -0700
 +++ b/js/src/jsmath.cpp    2016-03-22 13:29:55.750437374 -0700
--- a/components/desktop/firefox/test/results-32.master	Tue Nov 15 03:50:06 2016 -0800
+++ b/components/desktop/firefox/test/results-32.master	Wed Nov 02 08:17:06 2016 -0700
@@ -1,4 +1,4 @@
 PASSED ALL
 Result summary:
-Passed: 29687
+Passed: 29699
 Failed: 0