aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Beich <jbeich@FreeBSD.org>2016-12-14 08:57:17 +0000
committerJan Beich <jbeich@FreeBSD.org>2016-12-14 08:57:17 +0000
commitd1a0eeb49670dc078f21e98bb3f367648ca9e88e (patch)
tree6d536d00eeffc4a064a27416c6885cfed48f6b8f
parent7d82571656d578d172221be0ae9cc429c2adf672 (diff)
downloadports-d1a0eeb49670dc078f21e98bb3f367648ca9e88e.tar.gz
ports-d1a0eeb49670dc078f21e98bb3f367648ca9e88e.zip
MFH: r428395
gecko: apply some sparc64 crashfixes Obtained from: upstream Approved by: ports-secteam (junovitch)
Notes
Notes: svn path=/branches/2016Q4/; revision=428550
-rw-r--r--mail/thunderbird/Makefile2
-rw-r--r--mail/thunderbird/files/patch-bug1232150280
-rw-r--r--mail/thunderbird/files/patch-bug132187742
-rw-r--r--www/firefox-esr/Makefile1
-rw-r--r--www/firefox-esr/files/patch-bug1232150280
-rw-r--r--www/firefox-esr/files/patch-bug132187742
-rw-r--r--www/firefox/Makefile2
-rw-r--r--www/firefox/files/patch-bug132187742
-rw-r--r--www/firefox/files/patch-bug132211223
-rw-r--r--www/firefox/files/patch-bug132266080
-rw-r--r--www/libxul/Makefile1
-rw-r--r--www/libxul/files/patch-bug1232150280
-rw-r--r--www/libxul/files/patch-bug132187742
13 files changed, 1115 insertions, 2 deletions
diff --git a/mail/thunderbird/Makefile b/mail/thunderbird/Makefile
index 62cb7ffb036b..5c16435ca4b6 100644
--- a/mail/thunderbird/Makefile
+++ b/mail/thunderbird/Makefile
@@ -3,7 +3,7 @@
PORTNAME= thunderbird
DISTVERSION= 45.5.1
-PORTREVISION= 0
+PORTREVISION= 1
CATEGORIES= mail news net-im ipv6
MASTER_SITES= MOZILLA/${PORTNAME}/releases/${DISTVERSION}/source \
MOZILLA/${PORTNAME}/candidates/${DISTVERSION}-candidates/build1/source
diff --git a/mail/thunderbird/files/patch-bug1232150 b/mail/thunderbird/files/patch-bug1232150
new file mode 100644
index 000000000000..463bf653268e
--- /dev/null
+++ b/mail/thunderbird/files/patch-bug1232150
@@ -0,0 +1,280 @@
+commit 9a18802e82c7
+Author: Martin Husemann <martin>
+Date: Fri Jan 22 00:09:00 2016 +0100
+
+ Bug 1232150 - "Atomic operations for PPC/PPC64". r=lhansen
+---
+ js/src/jit/AtomicOperations.h | 2 +
+ js/src/jit/none/AtomicOperations-sparc.h | 251 +++++++++++++++++++++++++++++++
+ 2 files changed, 253 insertions(+)
+
+diff --git js/src/jit/AtomicOperations.h js/src/jit/AtomicOperations.h
+index 16196342a282..42aee72eb879 100644
+--- mozilla/js/src/jit/AtomicOperations.h
++++ mozilla/js/src/jit/AtomicOperations.h
+@@ -328,6 +328,8 @@ AtomicOperations::isLockfree(int32_t size)
+ # include "jit/mips-shared/AtomicOperations-mips-shared.h"
+ #elif defined(__ppc__) || defined(__PPC__)
+ # include "jit/none/AtomicOperations-ppc.h"
++#elif defined(__sparc__)
++# include "jit/none/AtomicOperations-sparc.h"
+ #elif defined(JS_CODEGEN_NONE)
+ // You can disable the JIT with --disable-ion but you must still
+ // provide the atomic operations that will be used by the JS engine.
+diff --git js/src/jit/none/AtomicOperations-sparc.h js/src/jit/none/AtomicOperations-sparc.h
+new file mode 100644
+index 000000000000..706ada86241b
+--- /dev/null
++++ mozilla/js/src/jit/none/AtomicOperations-sparc.h
+@@ -0,0 +1,251 @@
++/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
++ * vim: set ts=8 sts=4 et sw=4 tw=99:
++ * This Source Code Form is subject to the terms of the Mozilla Public
++ * License, v. 2.0. If a copy of the MPL was not distributed with this
++ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
++
++/* For documentation, see jit/AtomicOperations.h */
++
++#ifndef jit_sparc_AtomicOperations_sparc_h
++#define jit_sparc_AtomicOperations_sparc_h
++
++#include "mozilla/Assertions.h"
++#include "mozilla/Types.h"
++
++#if defined(__clang__) || defined(__GNUC__)
++
++// The default implementation tactic for gcc/clang is to use the newer
++// __atomic intrinsics added for use in C++11 <atomic>. Where that
++// isn't available, we use GCC's older __sync functions instead.
++//
++// ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS is kept as a backward
++// compatible option for older compilers: enable this to use GCC's old
++// __sync functions instead of the newer __atomic functions. This
++// will be required for GCC 4.6.x and earlier, and probably for Clang
++// 3.1, should we need to use those versions.
++
++//#define ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++
++inline bool
++js::jit::AtomicOperations::isLockfree8()
++{
++# ifndef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++ MOZ_ASSERT(__atomic_always_lock_free(sizeof(int8_t), 0));
++ MOZ_ASSERT(__atomic_always_lock_free(sizeof(int16_t), 0));
++ MOZ_ASSERT(__atomic_always_lock_free(sizeof(int32_t), 0));
++# if defined(__LP64__)
++ MOZ_ASSERT(__atomic_always_lock_free(sizeof(int64_t), 0));
++# endif
++ return true;
++# else
++ return false;
++# endif
++}
++
++inline void
++js::jit::AtomicOperations::fenceSeqCst()
++{
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++ __sync_synchronize();
++# else
++ __atomic_thread_fence(__ATOMIC_SEQ_CST);
++# endif
++}
++
++template<typename T>
++inline T
++js::jit::AtomicOperations::loadSeqCst(T* addr)
++{
++ MOZ_ASSERT(sizeof(T) < 8 || isLockfree8());
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++ __sync_synchronize();
++ T v = *addr;
++ __sync_synchronize();
++# else
++ T v;
++ __atomic_load(addr, &v, __ATOMIC_SEQ_CST);
++# endif
++ return v;
++}
++
++template<typename T>
++inline void
++js::jit::AtomicOperations::storeSeqCst(T* addr, T val)
++{
++ MOZ_ASSERT(sizeof(T) < 8 || isLockfree8());
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++ __sync_synchronize();
++ *addr = val;
++ __sync_synchronize();
++# else
++ __atomic_store(addr, &val, __ATOMIC_SEQ_CST);
++# endif
++}
++
++template<typename T>
++inline T
++js::jit::AtomicOperations::compareExchangeSeqCst(T* addr, T oldval, T newval)
++{
++ MOZ_ASSERT(sizeof(T) < 8 || isLockfree8());
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++ return __sync_val_compare_and_swap(addr, oldval, newval);
++# else
++ __atomic_compare_exchange(addr, &oldval, &newval, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST);
++ return oldval;
++# endif
++}
++
++template<typename T>
++inline T
++js::jit::AtomicOperations::fetchAddSeqCst(T* addr, T val)
++{
++#if !defined( __LP64__)
++ static_assert(sizeof(T) <= 4, "not available for 8-byte values yet");
++#endif
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++ return __sync_fetch_and_add(addr, val);
++# else
++ return __atomic_fetch_add(addr, val, __ATOMIC_SEQ_CST);
++# endif
++}
++
++template<typename T>
++inline T
++js::jit::AtomicOperations::fetchSubSeqCst(T* addr, T val)
++{
++#if !defined( __LP64__)
++ static_assert(sizeof(T) <= 4, "not available for 8-byte values yet");
++#endif
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++ return __sync_fetch_and_sub(addr, val);
++# else
++ return __atomic_fetch_sub(addr, val, __ATOMIC_SEQ_CST);
++# endif
++}
++
++template<typename T>
++inline T
++js::jit::AtomicOperations::fetchAndSeqCst(T* addr, T val)
++{
++#if !defined( __LP64__)
++ static_assert(sizeof(T) <= 4, "not available for 8-byte values yet");
++#endif
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++ return __sync_fetch_and_and(addr, val);
++# else
++ return __atomic_fetch_and(addr, val, __ATOMIC_SEQ_CST);
++# endif
++}
++
++template<typename T>
++inline T
++js::jit::AtomicOperations::fetchOrSeqCst(T* addr, T val)
++{
++#if !defined( __LP64__)
++ static_assert(sizeof(T) <= 4, "not available for 8-byte values yet");
++#endif
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++ return __sync_fetch_and_or(addr, val);
++# else
++ return __atomic_fetch_or(addr, val, __ATOMIC_SEQ_CST);
++# endif
++}
++
++template<typename T>
++inline T
++js::jit::AtomicOperations::fetchXorSeqCst(T* addr, T val)
++{
++#if !defined( __LP64__)
++ static_assert(sizeof(T) <= 4, "not available for 8-byte values yet");
++#endif
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++ return __sync_fetch_and_xor(addr, val);
++# else
++ return __atomic_fetch_xor(addr, val, __ATOMIC_SEQ_CST);
++# endif
++}
++
++template<typename T>
++inline T
++js::jit::AtomicOperations::loadSafeWhenRacy(T* addr)
++{
++ return *addr; // FIXME (1208663): not yet safe
++}
++
++template<typename T>
++inline void
++js::jit::AtomicOperations::storeSafeWhenRacy(T* addr, T val)
++{
++ *addr = val; // FIXME (1208663): not yet safe
++}
++
++inline void
++js::jit::AtomicOperations::memcpySafeWhenRacy(void* dest, const void* src, size_t nbytes)
++{
++ ::memcpy(dest, src, nbytes); // FIXME (1208663): not yet safe
++}
++
++inline void
++js::jit::AtomicOperations::memmoveSafeWhenRacy(void* dest, const void* src, size_t nbytes)
++{
++ ::memmove(dest, src, nbytes); // FIXME (1208663): not yet safe
++}
++
++template<typename T>
++inline T
++js::jit::AtomicOperations::exchangeSeqCst(T* addr, T val)
++{
++ MOZ_ASSERT(sizeof(T) < 8 || isLockfree8());
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++ T v;
++ __sync_synchronize();
++ do {
++ v = *addr;
++ } while (__sync_val_compare_and_swap(addr, v, val) != v);
++ return v;
++# else
++ T v;
++ __atomic_exchange(addr, &val, &v, __ATOMIC_SEQ_CST);
++ return v;
++# endif
++}
++
++template<size_t nbytes>
++inline void
++js::jit::RegionLock::acquire(void* addr)
++{
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++ while (!__sync_bool_compare_and_swap(&spinlock, 0, 1))
++ ;
++# else
++ uint32_t zero = 0;
++ uint32_t one = 1;
++ while (!__atomic_compare_exchange(&spinlock, &zero, &one, false, __ATOMIC_ACQUIRE, __ATOMIC_ACQUIRE)) {
++ zero = 0;
++ continue;
++ }
++# endif
++}
++
++template<size_t nbytes>
++inline void
++js::jit::RegionLock::release(void* addr)
++{
++ MOZ_ASSERT(AtomicOperations::loadSeqCst(&spinlock) == 1, "releasing unlocked region lock");
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++ __sync_sub_and_fetch(&spinlock, 1);
++# else
++ uint32_t zero = 0;
++ __atomic_store(&spinlock, &zero, __ATOMIC_SEQ_CST);
++# endif
++}
++
++# undef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++
++#elif defined(ENABLE_SHARED_ARRAY_BUFFER)
++
++# error "Either disable JS shared memory, use GCC or Clang, or add code here"
++
++#endif
++
++#endif // jit_sparc_AtomicOperations_sparc_h
diff --git a/mail/thunderbird/files/patch-bug1321877 b/mail/thunderbird/files/patch-bug1321877
new file mode 100644
index 000000000000..f7f79285a328
--- /dev/null
+++ b/mail/thunderbird/files/patch-bug1321877
@@ -0,0 +1,42 @@
+commit a13d95795217
+Author: <tharvik@gmail.com>
+Date: Thu Dec 8 18:20:12 2016 -0600
+
+ Bug 1321877. Fix compiler warnings in Downscaler.h when skia is not enabled. r=tnikkel
+---
+ image/Downscaler.h | 11 +++++++----
+ 1 file changed, 7 insertions(+), 4 deletions(-)
+
+diff --git image/Downscaler.h image/Downscaler.h
+index 21179a38f200..0bdef0eaa646 100644
+--- mozilla/image/Downscaler.h
++++ mozilla/image/Downscaler.h
+@@ -154,14 +154,14 @@ private:
+ class Downscaler
+ {
+ public:
+- explicit Downscaler(const nsIntSize&)
++ explicit Downscaler(const nsIntSize&) : mScale(1.0, 1.0)
+ {
+ MOZ_RELEASE_ASSERT(false, "Skia is not enabled");
+ }
+
+- const nsIntSize& OriginalSize() const { return nsIntSize(); }
+- const nsIntSize& TargetSize() const { return nsIntSize(); }
+- const gfxSize& Scale() const { return gfxSize(1.0, 1.0); }
++ const nsIntSize& OriginalSize() const { return mSize; }
++ const nsIntSize& TargetSize() const { return mSize; }
++ const gfxSize& Scale() const { return mScale; }
+
+ nsresult BeginFrame(const nsIntSize&, const Maybe<nsIntRect>&, uint8_t*, bool, bool = false)
+ {
+@@ -177,6 +177,9 @@ public:
+ DownscalerInvalidRect TakeInvalidRect() { return DownscalerInvalidRect(); }
+ void ResetForNextProgressivePass() { }
+ const nsIntSize FrameSize() const { return nsIntSize(0, 0); }
++private:
++ nsIntSize mSize;
++ gfxSize mScale;
+ };
+
+ #endif // MOZ_ENABLE_SKIA
diff --git a/www/firefox-esr/Makefile b/www/firefox-esr/Makefile
index da3c2e3259a2..09dcad52de8e 100644
--- a/www/firefox-esr/Makefile
+++ b/www/firefox-esr/Makefile
@@ -4,6 +4,7 @@
PORTNAME= firefox
DISTVERSION= 45.6.0
DISTVERSIONSUFFIX=esr.source
+PORTREVISION= 1
PORTEPOCH= 1
CATEGORIES= www ipv6
MASTER_SITES= MOZILLA/${PORTNAME}/releases/${DISTVERSION}esr/source \
diff --git a/www/firefox-esr/files/patch-bug1232150 b/www/firefox-esr/files/patch-bug1232150
new file mode 100644
index 000000000000..202c0cf11917
--- /dev/null
+++ b/www/firefox-esr/files/patch-bug1232150
@@ -0,0 +1,280 @@
+commit 9a18802e82c7
+Author: Martin Husemann <martin>
+Date: Fri Jan 22 00:09:00 2016 +0100
+
+ Bug 1232150 - "Atomic operations for PPC/PPC64". r=lhansen
+---
+ js/src/jit/AtomicOperations.h | 2 +
+ js/src/jit/none/AtomicOperations-sparc.h | 251 +++++++++++++++++++++++++++++++
+ 2 files changed, 253 insertions(+)
+
+diff --git js/src/jit/AtomicOperations.h js/src/jit/AtomicOperations.h
+index 16196342a282..42aee72eb879 100644
+--- js/src/jit/AtomicOperations.h
++++ js/src/jit/AtomicOperations.h
+@@ -328,6 +328,8 @@ AtomicOperations::isLockfree(int32_t size)
+ # include "jit/mips-shared/AtomicOperations-mips-shared.h"
+ #elif defined(__ppc__) || defined(__PPC__)
+ # include "jit/none/AtomicOperations-ppc.h"
++#elif defined(__sparc__)
++# include "jit/none/AtomicOperations-sparc.h"
+ #elif defined(JS_CODEGEN_NONE)
+ // You can disable the JIT with --disable-ion but you must still
+ // provide the atomic operations that will be used by the JS engine.
+diff --git js/src/jit/none/AtomicOperations-sparc.h js/src/jit/none/AtomicOperations-sparc.h
+new file mode 100644
+index 000000000000..706ada86241b
+--- /dev/null
++++ js/src/jit/none/AtomicOperations-sparc.h
+@@ -0,0 +1,251 @@
++/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
++ * vim: set ts=8 sts=4 et sw=4 tw=99:
++ * This Source Code Form is subject to the terms of the Mozilla Public
++ * License, v. 2.0. If a copy of the MPL was not distributed with this
++ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
++
++/* For documentation, see jit/AtomicOperations.h */
++
++#ifndef jit_sparc_AtomicOperations_sparc_h
++#define jit_sparc_AtomicOperations_sparc_h
++
++#include "mozilla/Assertions.h"
++#include "mozilla/Types.h"
++
++#if defined(__clang__) || defined(__GNUC__)
++
++// The default implementation tactic for gcc/clang is to use the newer
++// __atomic intrinsics added for use in C++11 <atomic>. Where that
++// isn't available, we use GCC's older __sync functions instead.
++//
++// ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS is kept as a backward
++// compatible option for older compilers: enable this to use GCC's old
++// __sync functions instead of the newer __atomic functions. This
++// will be required for GCC 4.6.x and earlier, and probably for Clang
++// 3.1, should we need to use those versions.
++
++//#define ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++
++inline bool
++js::jit::AtomicOperations::isLockfree8()
++{
++# ifndef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++ MOZ_ASSERT(__atomic_always_lock_free(sizeof(int8_t), 0));
++ MOZ_ASSERT(__atomic_always_lock_free(sizeof(int16_t), 0));
++ MOZ_ASSERT(__atomic_always_lock_free(sizeof(int32_t), 0));
++# if defined(__LP64__)
++ MOZ_ASSERT(__atomic_always_lock_free(sizeof(int64_t), 0));
++# endif
++ return true;
++# else
++ return false;
++# endif
++}
++
++inline void
++js::jit::AtomicOperations::fenceSeqCst()
++{
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++ __sync_synchronize();
++# else
++ __atomic_thread_fence(__ATOMIC_SEQ_CST);
++# endif
++}
++
++template<typename T>
++inline T
++js::jit::AtomicOperations::loadSeqCst(T* addr)
++{
++ MOZ_ASSERT(sizeof(T) < 8 || isLockfree8());
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++ __sync_synchronize();
++ T v = *addr;
++ __sync_synchronize();
++# else
++ T v;
++ __atomic_load(addr, &v, __ATOMIC_SEQ_CST);
++# endif
++ return v;
++}
++
++template<typename T>
++inline void
++js::jit::AtomicOperations::storeSeqCst(T* addr, T val)
++{
++ MOZ_ASSERT(sizeof(T) < 8 || isLockfree8());
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++ __sync_synchronize();
++ *addr = val;
++ __sync_synchronize();
++# else
++ __atomic_store(addr, &val, __ATOMIC_SEQ_CST);
++# endif
++}
++
++template<typename T>
++inline T
++js::jit::AtomicOperations::compareExchangeSeqCst(T* addr, T oldval, T newval)
++{
++ MOZ_ASSERT(sizeof(T) < 8 || isLockfree8());
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++ return __sync_val_compare_and_swap(addr, oldval, newval);
++# else
++ __atomic_compare_exchange(addr, &oldval, &newval, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST);
++ return oldval;
++# endif
++}
++
++template<typename T>
++inline T
++js::jit::AtomicOperations::fetchAddSeqCst(T* addr, T val)
++{
++#if !defined( __LP64__)
++ static_assert(sizeof(T) <= 4, "not available for 8-byte values yet");
++#endif
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++ return __sync_fetch_and_add(addr, val);
++# else
++ return __atomic_fetch_add(addr, val, __ATOMIC_SEQ_CST);
++# endif
++}
++
++template<typename T>
++inline T
++js::jit::AtomicOperations::fetchSubSeqCst(T* addr, T val)
++{
++#if !defined( __LP64__)
++ static_assert(sizeof(T) <= 4, "not available for 8-byte values yet");
++#endif
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++ return __sync_fetch_and_sub(addr, val);
++# else
++ return __atomic_fetch_sub(addr, val, __ATOMIC_SEQ_CST);
++# endif
++}
++
++template<typename T>
++inline T
++js::jit::AtomicOperations::fetchAndSeqCst(T* addr, T val)
++{
++#if !defined( __LP64__)
++ static_assert(sizeof(T) <= 4, "not available for 8-byte values yet");
++#endif
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++ return __sync_fetch_and_and(addr, val);
++# else
++ return __atomic_fetch_and(addr, val, __ATOMIC_SEQ_CST);
++# endif
++}
++
++template<typename T>
++inline T
++js::jit::AtomicOperations::fetchOrSeqCst(T* addr, T val)
++{
++#if !defined( __LP64__)
++ static_assert(sizeof(T) <= 4, "not available for 8-byte values yet");
++#endif
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++ return __sync_fetch_and_or(addr, val);
++# else
++ return __atomic_fetch_or(addr, val, __ATOMIC_SEQ_CST);
++# endif
++}
++
++template<typename T>
++inline T
++js::jit::AtomicOperations::fetchXorSeqCst(T* addr, T val)
++{
++#if !defined( __LP64__)
++ static_assert(sizeof(T) <= 4, "not available for 8-byte values yet");
++#endif
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++ return __sync_fetch_and_xor(addr, val);
++# else
++ return __atomic_fetch_xor(addr, val, __ATOMIC_SEQ_CST);
++# endif
++}
++
++template<typename T>
++inline T
++js::jit::AtomicOperations::loadSafeWhenRacy(T* addr)
++{
++ return *addr; // FIXME (1208663): not yet safe
++}
++
++template<typename T>
++inline void
++js::jit::AtomicOperations::storeSafeWhenRacy(T* addr, T val)
++{
++ *addr = val; // FIXME (1208663): not yet safe
++}
++
++inline void
++js::jit::AtomicOperations::memcpySafeWhenRacy(void* dest, const void* src, size_t nbytes)
++{
++ ::memcpy(dest, src, nbytes); // FIXME (1208663): not yet safe
++}
++
++inline void
++js::jit::AtomicOperations::memmoveSafeWhenRacy(void* dest, const void* src, size_t nbytes)
++{
++ ::memmove(dest, src, nbytes); // FIXME (1208663): not yet safe
++}
++
++template<typename T>
++inline T
++js::jit::AtomicOperations::exchangeSeqCst(T* addr, T val)
++{
++ MOZ_ASSERT(sizeof(T) < 8 || isLockfree8());
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++ T v;
++ __sync_synchronize();
++ do {
++ v = *addr;
++ } while (__sync_val_compare_and_swap(addr, v, val) != v);
++ return v;
++# else
++ T v;
++ __atomic_exchange(addr, &val, &v, __ATOMIC_SEQ_CST);
++ return v;
++# endif
++}
++
++template<size_t nbytes>
++inline void
++js::jit::RegionLock::acquire(void* addr)
++{
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++ while (!__sync_bool_compare_and_swap(&spinlock, 0, 1))
++ ;
++# else
++ uint32_t zero = 0;
++ uint32_t one = 1;
++ while (!__atomic_compare_exchange(&spinlock, &zero, &one, false, __ATOMIC_ACQUIRE, __ATOMIC_ACQUIRE)) {
++ zero = 0;
++ continue;
++ }
++# endif
++}
++
++template<size_t nbytes>
++inline void
++js::jit::RegionLock::release(void* addr)
++{
++ MOZ_ASSERT(AtomicOperations::loadSeqCst(&spinlock) == 1, "releasing unlocked region lock");
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++ __sync_sub_and_fetch(&spinlock, 1);
++# else
++ uint32_t zero = 0;
++ __atomic_store(&spinlock, &zero, __ATOMIC_SEQ_CST);
++# endif
++}
++
++# undef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++
++#elif defined(ENABLE_SHARED_ARRAY_BUFFER)
++
++# error "Either disable JS shared memory, use GCC or Clang, or add code here"
++
++#endif
++
++#endif // jit_sparc_AtomicOperations_sparc_h
diff --git a/www/firefox-esr/files/patch-bug1321877 b/www/firefox-esr/files/patch-bug1321877
new file mode 100644
index 000000000000..50b1b175dd3d
--- /dev/null
+++ b/www/firefox-esr/files/patch-bug1321877
@@ -0,0 +1,42 @@
+commit a13d95795217
+Author: <tharvik@gmail.com>
+Date: Thu Dec 8 18:20:12 2016 -0600
+
+ Bug 1321877. Fix compiler warnings in Downscaler.h when skia is not enabled. r=tnikkel
+---
+ image/Downscaler.h | 11 +++++++----
+ 1 file changed, 7 insertions(+), 4 deletions(-)
+
+diff --git image/Downscaler.h image/Downscaler.h
+index 21179a38f200..0bdef0eaa646 100644
+--- image/Downscaler.h
++++ image/Downscaler.h
+@@ -154,14 +154,14 @@ private:
+ class Downscaler
+ {
+ public:
+- explicit Downscaler(const nsIntSize&)
++ explicit Downscaler(const nsIntSize&) : mScale(1.0, 1.0)
+ {
+ MOZ_RELEASE_ASSERT(false, "Skia is not enabled");
+ }
+
+- const nsIntSize& OriginalSize() const { return nsIntSize(); }
+- const nsIntSize& TargetSize() const { return nsIntSize(); }
+- const gfxSize& Scale() const { return gfxSize(1.0, 1.0); }
++ const nsIntSize& OriginalSize() const { return mSize; }
++ const nsIntSize& TargetSize() const { return mSize; }
++ const gfxSize& Scale() const { return mScale; }
+
+ nsresult BeginFrame(const nsIntSize&, const Maybe<nsIntRect>&, uint8_t*, bool, bool = false)
+ {
+@@ -177,6 +177,9 @@ public:
+ DownscalerInvalidRect TakeInvalidRect() { return DownscalerInvalidRect(); }
+ void ResetForNextProgressivePass() { }
+ const nsIntSize FrameSize() const { return nsIntSize(0, 0); }
++private:
++ nsIntSize mSize;
++ gfxSize mScale;
+ };
+
+ #endif // MOZ_ENABLE_SKIA
diff --git a/www/firefox/Makefile b/www/firefox/Makefile
index 5bddf450c4b7..f2d9231408f4 100644
--- a/www/firefox/Makefile
+++ b/www/firefox/Makefile
@@ -4,7 +4,7 @@
PORTNAME= firefox
DISTVERSION= 50.1.0
DISTVERSIONSUFFIX=.source
-PORTREVISION= 1
+PORTREVISION= 2
PORTEPOCH= 1
CATEGORIES= www ipv6
MASTER_SITES= MOZILLA/${PORTNAME}/releases/${DISTVERSION}/source \
diff --git a/www/firefox/files/patch-bug1321877 b/www/firefox/files/patch-bug1321877
new file mode 100644
index 000000000000..50b1b175dd3d
--- /dev/null
+++ b/www/firefox/files/patch-bug1321877
@@ -0,0 +1,42 @@
+commit a13d95795217
+Author: <tharvik@gmail.com>
+Date: Thu Dec 8 18:20:12 2016 -0600
+
+ Bug 1321877. Fix compiler warnings in Downscaler.h when skia is not enabled. r=tnikkel
+---
+ image/Downscaler.h | 11 +++++++----
+ 1 file changed, 7 insertions(+), 4 deletions(-)
+
+diff --git image/Downscaler.h image/Downscaler.h
+index 21179a38f200..0bdef0eaa646 100644
+--- image/Downscaler.h
++++ image/Downscaler.h
+@@ -154,14 +154,14 @@ private:
+ class Downscaler
+ {
+ public:
+- explicit Downscaler(const nsIntSize&)
++ explicit Downscaler(const nsIntSize&) : mScale(1.0, 1.0)
+ {
+ MOZ_RELEASE_ASSERT(false, "Skia is not enabled");
+ }
+
+- const nsIntSize& OriginalSize() const { return nsIntSize(); }
+- const nsIntSize& TargetSize() const { return nsIntSize(); }
+- const gfxSize& Scale() const { return gfxSize(1.0, 1.0); }
++ const nsIntSize& OriginalSize() const { return mSize; }
++ const nsIntSize& TargetSize() const { return mSize; }
++ const gfxSize& Scale() const { return mScale; }
+
+ nsresult BeginFrame(const nsIntSize&, const Maybe<nsIntRect>&, uint8_t*, bool, bool = false)
+ {
+@@ -177,6 +177,9 @@ public:
+ DownscalerInvalidRect TakeInvalidRect() { return DownscalerInvalidRect(); }
+ void ResetForNextProgressivePass() { }
+ const nsIntSize FrameSize() const { return nsIntSize(0, 0); }
++private:
++ nsIntSize mSize;
++ gfxSize mScale;
+ };
+
+ #endif // MOZ_ENABLE_SKIA
diff --git a/www/firefox/files/patch-bug1322112 b/www/firefox/files/patch-bug1322112
new file mode 100644
index 000000000000..cf065ab988ab
--- /dev/null
+++ b/www/firefox/files/patch-bug1322112
@@ -0,0 +1,23 @@
+--- image/decoders/nsIconDecoder.cpp
++++ image/decoders/nsIconDecoder.cpp
+@@ -89,17 +89,18 @@ nsIconDecoder::ReadRowOfPixels(const cha
+ {
+ MOZ_ASSERT(aLength % 4 == 0, "Rows should contain a multiple of four bytes");
+
+ auto result = mPipe.WritePixels<uint32_t>([&]() -> NextPixel<uint32_t> {
+ if (aLength == 0) {
+ return AsVariant(WriteState::NEED_MORE_DATA); // Done with this row.
+ }
+
+- uint32_t pixel = *reinterpret_cast<const uint32_t*>(aData);
++ uint32_t pixel;
++ memcpy(&pixel, aData, 4);
+ aData += 4;
+ aLength -= 4;
+
+ return AsVariant(pixel);
+ });
+
+ MOZ_ASSERT(result != WriteState::FAILURE);
+
+
diff --git a/www/firefox/files/patch-bug1322660 b/www/firefox/files/patch-bug1322660
new file mode 100644
index 000000000000..2d1cdea93892
--- /dev/null
+++ b/www/firefox/files/patch-bug1322660
@@ -0,0 +1,80 @@
+--- modules/woff2/src/store_bytes.h
++++ modules/woff2/src/store_bytes.h
+@@ -29,41 +29,44 @@ inline size_t StoreU32(uint8_t* dst, size_t offset, uint32_t x) {
+ dst[offset + 1] = x >> 16;
+ dst[offset + 2] = x >> 8;
+ dst[offset + 3] = x;
+ return offset + 4;
+ }
+
+ inline size_t Store16(uint8_t* dst, size_t offset, int x) {
+ #if (defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__))
+- *reinterpret_cast<uint16_t*>(dst + offset) =
+- ((x & 0xFF) << 8) | ((x & 0xFF00) >> 8);
++ uint16_t v = ((x & 0xFF) << 8) | ((x & 0xFF00) >> 8);
++ memcpy(dst + offset, &v, 2);
+ #elif (defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__))
+- *reinterpret_cast<uint16_t*>(dst + offset) = static_cast<uint16_t>(x);
++ uint16_t v = static_cast<uint16_t>(x);
++ memcpy(dst + offset, &v, 2);
+ #else
+ dst[offset] = x >> 8;
+ dst[offset + 1] = x;
+ #endif
+ return offset + 2;
+ }
+
+ inline void StoreU32(uint32_t val, size_t* offset, uint8_t* dst) {
+ dst[(*offset)++] = val >> 24;
+ dst[(*offset)++] = val >> 16;
+ dst[(*offset)++] = val >> 8;
+ dst[(*offset)++] = val;
+ }
+
+ inline void Store16(int val, size_t* offset, uint8_t* dst) {
+ #if (defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__))
+- *reinterpret_cast<uint16_t*>(dst + *offset) =
++ uint16_t v = ((val & 0xFF) << 8) | ((val & 0xFF00) >> 8);
++ memcpy(dst + *offset, &v, 2);
+ ((val & 0xFF) << 8) | ((val & 0xFF00) >> 8);
+ *offset += 2;
+ #elif (defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__))
+- *reinterpret_cast<uint16_t*>(dst + *offset) = static_cast<uint16_t>(val);
++ uint16_t v = static_cast<uint16_t>(val);
++ memcpy(dst + *offset, &v, 2);
+ *offset += 2;
+ #else
+ dst[(*offset)++] = val >> 8;
+ dst[(*offset)++] = val;
+ #endif
+ }
+
+ inline void StoreBytes(const uint8_t* data, size_t len,
+--- modules/woff2/src/woff2_common.cc
++++ modules/woff2/src/woff2_common.cc
+@@ -20,22 +20,23 @@
+
+ namespace woff2 {
+
+
+ uint32_t ComputeULongSum(const uint8_t* buf, size_t size) {
+ uint32_t checksum = 0;
+ size_t aligned_size = size & ~3;
+ for (size_t i = 0; i < aligned_size; i += 4) {
++ uint32_t v;
++ memcpy(&v, buf + i, 4);
+ #if (defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__))
+- uint32_t v = *reinterpret_cast<const uint32_t*>(buf + i);
+ checksum += (((v & 0xFF) << 24) | ((v & 0xFF00) << 8) |
+ ((v & 0xFF0000) >> 8) | ((v & 0xFF000000) >> 24));
+ #elif (defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__))
+- checksum += *reinterpret_cast<const uint32_t*>(buf + i);
++ checksum += v;
+ #else
+ checksum += (buf[i] << 24) | (buf[i + 1] << 16) |
+ (buf[i + 2] << 8) | buf[i + 3];
+ #endif
+ }
+
+ // treat size not aligned on 4 as if it were padded to 4 with 0's
+ if (size != aligned_size) {
diff --git a/www/libxul/Makefile b/www/libxul/Makefile
index 9dd75e6baa80..a47ff309e9f8 100644
--- a/www/libxul/Makefile
+++ b/www/libxul/Makefile
@@ -3,6 +3,7 @@
PORTNAME= libxul
DISTVERSION= 45.6.0
+PORTREVISION= 1
CATEGORIES?= www devel
MASTER_SITES= MOZILLA/firefox/releases/${DISTVERSION}esr/source \
MOZILLA/firefox/candidates/${DISTVERSION}esr-candidates/build1/source
diff --git a/www/libxul/files/patch-bug1232150 b/www/libxul/files/patch-bug1232150
new file mode 100644
index 000000000000..202c0cf11917
--- /dev/null
+++ b/www/libxul/files/patch-bug1232150
@@ -0,0 +1,280 @@
+commit 9a18802e82c7
+Author: Martin Husemann <martin>
+Date: Fri Jan 22 00:09:00 2016 +0100
+
+ Bug 1232150 - "Atomic operations for PPC/PPC64". r=lhansen
+---
+ js/src/jit/AtomicOperations.h | 2 +
+ js/src/jit/none/AtomicOperations-sparc.h | 251 +++++++++++++++++++++++++++++++
+ 2 files changed, 253 insertions(+)
+
+diff --git js/src/jit/AtomicOperations.h js/src/jit/AtomicOperations.h
+index 16196342a282..42aee72eb879 100644
+--- js/src/jit/AtomicOperations.h
++++ js/src/jit/AtomicOperations.h
+@@ -328,6 +328,8 @@ AtomicOperations::isLockfree(int32_t size)
+ # include "jit/mips-shared/AtomicOperations-mips-shared.h"
+ #elif defined(__ppc__) || defined(__PPC__)
+ # include "jit/none/AtomicOperations-ppc.h"
++#elif defined(__sparc__)
++# include "jit/none/AtomicOperations-sparc.h"
+ #elif defined(JS_CODEGEN_NONE)
+ // You can disable the JIT with --disable-ion but you must still
+ // provide the atomic operations that will be used by the JS engine.
+diff --git js/src/jit/none/AtomicOperations-sparc.h js/src/jit/none/AtomicOperations-sparc.h
+new file mode 100644
+index 000000000000..706ada86241b
+--- /dev/null
++++ js/src/jit/none/AtomicOperations-sparc.h
+@@ -0,0 +1,251 @@
++/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
++ * vim: set ts=8 sts=4 et sw=4 tw=99:
++ * This Source Code Form is subject to the terms of the Mozilla Public
++ * License, v. 2.0. If a copy of the MPL was not distributed with this
++ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
++
++/* For documentation, see jit/AtomicOperations.h */
++
++#ifndef jit_sparc_AtomicOperations_sparc_h
++#define jit_sparc_AtomicOperations_sparc_h
++
++#include "mozilla/Assertions.h"
++#include "mozilla/Types.h"
++
++#if defined(__clang__) || defined(__GNUC__)
++
++// The default implementation tactic for gcc/clang is to use the newer
++// __atomic intrinsics added for use in C++11 <atomic>. Where that
++// isn't available, we use GCC's older __sync functions instead.
++//
++// ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS is kept as a backward
++// compatible option for older compilers: enable this to use GCC's old
++// __sync functions instead of the newer __atomic functions. This
++// will be required for GCC 4.6.x and earlier, and probably for Clang
++// 3.1, should we need to use those versions.
++
++//#define ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++
++inline bool
++js::jit::AtomicOperations::isLockfree8()
++{
++# ifndef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++ MOZ_ASSERT(__atomic_always_lock_free(sizeof(int8_t), 0));
++ MOZ_ASSERT(__atomic_always_lock_free(sizeof(int16_t), 0));
++ MOZ_ASSERT(__atomic_always_lock_free(sizeof(int32_t), 0));
++# if defined(__LP64__)
++ MOZ_ASSERT(__atomic_always_lock_free(sizeof(int64_t), 0));
++# endif
++ return true;
++# else
++ return false;
++# endif
++}
++
++inline void
++js::jit::AtomicOperations::fenceSeqCst()
++{
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++ __sync_synchronize();
++# else
++ __atomic_thread_fence(__ATOMIC_SEQ_CST);
++# endif
++}
++
++template<typename T>
++inline T
++js::jit::AtomicOperations::loadSeqCst(T* addr)
++{
++ MOZ_ASSERT(sizeof(T) < 8 || isLockfree8());
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++ __sync_synchronize();
++ T v = *addr;
++ __sync_synchronize();
++# else
++ T v;
++ __atomic_load(addr, &v, __ATOMIC_SEQ_CST);
++# endif
++ return v;
++}
++
++template<typename T>
++inline void
++js::jit::AtomicOperations::storeSeqCst(T* addr, T val)
++{
++ MOZ_ASSERT(sizeof(T) < 8 || isLockfree8());
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++ __sync_synchronize();
++ *addr = val;
++ __sync_synchronize();
++# else
++ __atomic_store(addr, &val, __ATOMIC_SEQ_CST);
++# endif
++}
++
++template<typename T>
++inline T
++js::jit::AtomicOperations::compareExchangeSeqCst(T* addr, T oldval, T newval)
++{
++ MOZ_ASSERT(sizeof(T) < 8 || isLockfree8());
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++ return __sync_val_compare_and_swap(addr, oldval, newval);
++# else
++ __atomic_compare_exchange(addr, &oldval, &newval, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST);
++ return oldval;
++# endif
++}
++
++template<typename T>
++inline T
++js::jit::AtomicOperations::fetchAddSeqCst(T* addr, T val)
++{
++#if !defined( __LP64__)
++ static_assert(sizeof(T) <= 4, "not available for 8-byte values yet");
++#endif
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++ return __sync_fetch_and_add(addr, val);
++# else
++ return __atomic_fetch_add(addr, val, __ATOMIC_SEQ_CST);
++# endif
++}
++
++template<typename T>
++inline T
++js::jit::AtomicOperations::fetchSubSeqCst(T* addr, T val)
++{
++#if !defined( __LP64__)
++ static_assert(sizeof(T) <= 4, "not available for 8-byte values yet");
++#endif
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++ return __sync_fetch_and_sub(addr, val);
++# else
++ return __atomic_fetch_sub(addr, val, __ATOMIC_SEQ_CST);
++# endif
++}
++
++template<typename T>
++inline T
++js::jit::AtomicOperations::fetchAndSeqCst(T* addr, T val)
++{
++#if !defined( __LP64__)
++ static_assert(sizeof(T) <= 4, "not available for 8-byte values yet");
++#endif
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++ return __sync_fetch_and_and(addr, val);
++# else
++ return __atomic_fetch_and(addr, val, __ATOMIC_SEQ_CST);
++# endif
++}
++
++template<typename T>
++inline T
++js::jit::AtomicOperations::fetchOrSeqCst(T* addr, T val)
++{
++#if !defined( __LP64__)
++ static_assert(sizeof(T) <= 4, "not available for 8-byte values yet");
++#endif
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++ return __sync_fetch_and_or(addr, val);
++# else
++ return __atomic_fetch_or(addr, val, __ATOMIC_SEQ_CST);
++# endif
++}
++
++template<typename T>
++inline T
++js::jit::AtomicOperations::fetchXorSeqCst(T* addr, T val)
++{
++#if !defined( __LP64__)
++ static_assert(sizeof(T) <= 4, "not available for 8-byte values yet");
++#endif
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++ return __sync_fetch_and_xor(addr, val);
++# else
++ return __atomic_fetch_xor(addr, val, __ATOMIC_SEQ_CST);
++# endif
++}
++
++template<typename T>
++inline T
++js::jit::AtomicOperations::loadSafeWhenRacy(T* addr)
++{
++ return *addr; // FIXME (1208663): not yet safe
++}
++
++template<typename T>
++inline void
++js::jit::AtomicOperations::storeSafeWhenRacy(T* addr, T val)
++{
++ *addr = val; // FIXME (1208663): not yet safe
++}
++
++inline void
++js::jit::AtomicOperations::memcpySafeWhenRacy(void* dest, const void* src, size_t nbytes)
++{
++ ::memcpy(dest, src, nbytes); // FIXME (1208663): not yet safe
++}
++
++inline void
++js::jit::AtomicOperations::memmoveSafeWhenRacy(void* dest, const void* src, size_t nbytes)
++{
++ ::memmove(dest, src, nbytes); // FIXME (1208663): not yet safe
++}
++
++template<typename T>
++inline T
++js::jit::AtomicOperations::exchangeSeqCst(T* addr, T val)
++{
++ MOZ_ASSERT(sizeof(T) < 8 || isLockfree8());
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++ T v;
++ __sync_synchronize();
++ do {
++ v = *addr;
++ } while (__sync_val_compare_and_swap(addr, v, val) != v);
++ return v;
++# else
++ T v;
++ __atomic_exchange(addr, &val, &v, __ATOMIC_SEQ_CST);
++ return v;
++# endif
++}
++
++template<size_t nbytes>
++inline void
++js::jit::RegionLock::acquire(void* addr)
++{
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++ while (!__sync_bool_compare_and_swap(&spinlock, 0, 1))
++ ;
++# else
++ uint32_t zero = 0;
++ uint32_t one = 1;
++ while (!__atomic_compare_exchange(&spinlock, &zero, &one, false, __ATOMIC_ACQUIRE, __ATOMIC_ACQUIRE)) {
++ zero = 0;
++ continue;
++ }
++# endif
++}
++
++template<size_t nbytes>
++inline void
++js::jit::RegionLock::release(void* addr)
++{
++ MOZ_ASSERT(AtomicOperations::loadSeqCst(&spinlock) == 1, "releasing unlocked region lock");
++# ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++ __sync_sub_and_fetch(&spinlock, 1);
++# else
++ uint32_t zero = 0;
++ __atomic_store(&spinlock, &zero, __ATOMIC_SEQ_CST);
++# endif
++}
++
++# undef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
++
++#elif defined(ENABLE_SHARED_ARRAY_BUFFER)
++
++# error "Either disable JS shared memory, use GCC or Clang, or add code here"
++
++#endif
++
++#endif // jit_sparc_AtomicOperations_sparc_h
diff --git a/www/libxul/files/patch-bug1321877 b/www/libxul/files/patch-bug1321877
new file mode 100644
index 000000000000..50b1b175dd3d
--- /dev/null
+++ b/www/libxul/files/patch-bug1321877
@@ -0,0 +1,42 @@
+commit a13d95795217
+Author: <tharvik@gmail.com>
+Date: Thu Dec 8 18:20:12 2016 -0600
+
+ Bug 1321877. Fix compiler warnings in Downscaler.h when skia is not enabled. r=tnikkel
+---
+ image/Downscaler.h | 11 +++++++----
+ 1 file changed, 7 insertions(+), 4 deletions(-)
+
+diff --git image/Downscaler.h image/Downscaler.h
+index 21179a38f200..0bdef0eaa646 100644
+--- image/Downscaler.h
++++ image/Downscaler.h
+@@ -154,14 +154,14 @@ private:
+ class Downscaler
+ {
+ public:
+- explicit Downscaler(const nsIntSize&)
++ explicit Downscaler(const nsIntSize&) : mScale(1.0, 1.0)
+ {
+ MOZ_RELEASE_ASSERT(false, "Skia is not enabled");
+ }
+
+- const nsIntSize& OriginalSize() const { return nsIntSize(); }
+- const nsIntSize& TargetSize() const { return nsIntSize(); }
+- const gfxSize& Scale() const { return gfxSize(1.0, 1.0); }
++ const nsIntSize& OriginalSize() const { return mSize; }
++ const nsIntSize& TargetSize() const { return mSize; }
++ const gfxSize& Scale() const { return mScale; }
+
+ nsresult BeginFrame(const nsIntSize&, const Maybe<nsIntRect>&, uint8_t*, bool, bool = false)
+ {
+@@ -177,6 +177,9 @@ public:
+ DownscalerInvalidRect TakeInvalidRect() { return DownscalerInvalidRect(); }
+ void ResetForNextProgressivePass() { }
+ const nsIntSize FrameSize() const { return nsIntSize(0, 0); }
++private:
++ nsIntSize mSize;
++ gfxSize mScale;
+ };
+
+ #endif // MOZ_ENABLE_SKIA