[Midnightbsd-cvs] mports [21991] trunk/www/libxul: minor update
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Sat Oct 22 15:07:00 EDT 2016
Revision: 21991
http://svnweb.midnightbsd.org/mports/?rev=21991
Author: laffer1
Date: 2016-10-22 15:07:00 -0400 (Sat, 22 Oct 2016)
Log Message:
-----------
minor update
Modified Paths:
--------------
trunk/www/libxul/Makefile
trunk/www/libxul/distinfo
trunk/www/libxul/files/patch-bug1021761
Added Paths:
-----------
trunk/www/libxul/files/patch-bug1233275
trunk/www/libxul/files/patch-bug1242132
trunk/www/libxul/files/patch-bug1243312
trunk/www/libxul/files/patch-bug1245076
trunk/www/libxul/files/patch-bug1252246
trunk/www/libxul/files/patch-bug1268816
trunk/www/libxul/files/patch-bug1269171
trunk/www/libxul/files/patch-bug1278861
trunk/www/libxul/files/patch-modules-libpref-init-all.js
trunk/www/libxul/files/patch-sample-type
Removed Paths:
-------------
trunk/www/libxul/files/extra-patch-bug1125514
Modified: trunk/www/libxul/Makefile
===================================================================
--- trunk/www/libxul/Makefile 2016-10-22 19:02:25 UTC (rev 21990)
+++ trunk/www/libxul/Makefile 2016-10-22 19:07:00 UTC (rev 21991)
@@ -1,14 +1,13 @@
-# Created by: Michael Johnson <ahze at FreeBSD.org>
-# $FreeBSD: head/www/libxul/Makefile 419594 2016-08-04 04:57:59Z marino $
+# $MidnightBSD$
PORTNAME= libxul
-DISTVERSION= 45.3.0
+DISTVERSION= 45.4.0
CATEGORIES?= www devel
MASTER_SITES= MOZILLA/firefox/releases/${DISTVERSION}esr/source \
MOZILLA/firefox/candidates/${DISTVERSION}esr-candidates/build2/source
DISTNAME= firefox-${DISTVERSION}esr.source
-MAINTAINER?= gecko at FreeBSD.org
+MAINTAINER?= ports at MidnightBSD.org
COMMENT?= Mozilla runtime package that can be used to bootstrap XUL+XPCOM apps
LICENSE= mpl
Modified: trunk/www/libxul/distinfo
===================================================================
--- trunk/www/libxul/distinfo 2016-10-22 19:02:25 UTC (rev 21990)
+++ trunk/www/libxul/distinfo 2016-10-22 19:07:00 UTC (rev 21991)
@@ -1,2 +1,3 @@
-SHA256 (firefox-45.3.0esr.source.tar.xz) = 922233c65c0aabd05371974c289495119c28d72fc7f8b06a22b58c5f70f8b8f7
-SIZE (firefox-45.3.0esr.source.tar.xz) = 185330580
+TIMESTAMP = 1473189353
+SHA256 (firefox-45.4.0esr.source.tar.xz) = cfd90096b9e1019b9de4fe061ece8c65f668b8a24bcbb657ce6b3c940ef83ad0
+SIZE (firefox-45.4.0esr.source.tar.xz) = 185182396
Deleted: trunk/www/libxul/files/extra-patch-bug1125514
===================================================================
--- trunk/www/libxul/files/extra-patch-bug1125514 2016-10-22 19:02:25 UTC (rev 21990)
+++ trunk/www/libxul/files/extra-patch-bug1125514 2016-10-22 19:07:00 UTC (rev 21991)
@@ -1,36 +0,0 @@
-changeset: 258513:ffbd5f5f46f1
-user: Guilherme Goncalves <guilherme.p.gonc at gmail.com>
-date: Thu Aug 20 10:05:29 2015 +0900
-summary: Bug 1125514 - Use jemalloc's metadata statistics to compute bookkeeping. r=glandium
-
---- memory/build/mozjemalloc_compat.c~
-+++ memory/build/mozjemalloc_compat.c
-@@ -136,6 +136,7 @@ jemalloc_stats_impl(jemalloc_stats_t *st
- {
- unsigned narenas;
- size_t active, allocated, mapped, page, pdirty;
-+ size_t meta, ameta;
- size_t lg_chunk;
-
- // Refresh jemalloc's stats by updating its epoch, see ctl_refresh in
-@@ -149,17 +150,19 @@ jemalloc_stats_impl(jemalloc_stats_t *st
- CTL_GET("stats.active", active);
- CTL_GET("stats.allocated", allocated);
- CTL_GET("stats.mapped", mapped);
-+ CTL_GET("stats.metadata", meta);
- CTL_GET("opt.lg_chunk", lg_chunk);
-- CTL_GET("stats.bookkeeping", stats->bookkeeping);
-
- /* get the summation for all arenas, i == narenas */
- CTL_I_GET("stats.arenas.0.pdirty", pdirty, narenas);
-+ CTL_I_GET("stats.arenas.0.metadata.allocated", ameta, narenas);
-
- stats->chunksize = 1 << lg_chunk;
- stats->mapped = mapped;
- stats->allocated = allocated;
- stats->waste = active - allocated;
- stats->page_cache = pdirty * page;
-+ stats->bookkeeping = meta - ameta;
- stats->bin_unused = compute_bin_unused(narenas);
- stats->waste -= stats->bin_unused;
- }
Modified: trunk/www/libxul/files/patch-bug1021761
===================================================================
--- trunk/www/libxul/files/patch-bug1021761 2016-10-22 19:02:25 UTC (rev 21990)
+++ trunk/www/libxul/files/patch-bug1021761 2016-10-22 19:07:00 UTC (rev 21991)
@@ -11,7 +11,7 @@
+
+dnl If using Linux, Solaris or BSDs, ensure that OSS is available
+case "$OS_TARGET" in
-+Linux|SunOS|DragonFly|FreeBSD|NetBSD|GNU/kFreeBSD)
++Linux|SunOS|DragonFly|FreeBSD|MidnightBSD|NetBSD|GNU/kFreeBSD)
+ MOZ_OSS=1
+ ;;
+esac
@@ -51,7 +51,7 @@
+
+ if test "$ac_cv_header_sys_soundcard_h" != "yes" -a \
+ "$ac_cv_header_soundcard_h" != "yes"; then
-+ AC_MSG_ERROR([Need OSS for Ogg, Wave or WebM decoding on $OS_TARGET. Disable with --disable-ogg --disable-wave --disable-webm.])
++ AC_MSG_ERROR([Need OSS for Ogg, Wave or WebM decoding on $OS_TARGET. Disable with --without-oss.])
+ fi
+
+ dnl Assume NetBSD implementation over SunAudio
@@ -643,7 +643,7 @@
index 0000000..5e38e27
--- /dev/null
+++ media/libcubeb/src/cubeb_oss.c
-@@ -0,0 +1,402 @@
+@@ -0,0 +1,432 @@
+/*
+ * Copyright © 2014 Mozilla Foundation
+ *
@@ -769,8 +769,8 @@
+ return got;
+}
+
-+static void apply_volume(int16_t* buffer, unsigned int n,
-+ float volume, float panning)
++static void apply_volume_int(int16_t* buffer, unsigned int n,
++ float volume, float panning)
+{
+ float left = volume;
+ float right = volume;
@@ -788,6 +788,26 @@
+ }
+}
+
++static void apply_volume_float(float* buffer, unsigned int n,
++ float volume, float panning)
++{
++ float left = volume;
++ float right = volume;
++ unsigned int i;
++ float pan[2];
++ if (panning<0) {
++ right *= (1+panning);
++ } else {
++ left *= (1-panning);
++ }
++ pan[0] = left;
++ pan[1] = right;
++ for(i=0; i<n; i++){
++ buffer[i] = buffer[i]*pan[i%2];
++ }
++}
++
++
+static void *writer(void *stm)
+{
+ cubeb_stream* stream = (cubeb_stream*)stm;
@@ -812,15 +832,25 @@
+ if (stream->floating) {
+ got = run_data_callback(stream, f_buffer,
+ OSS_BUFFER_SIZE/stream->params.channels);
++ apply_volume_float(f_buffer, got*stream->params.channels,
++ stream->volume, stream->panning);
+ for (i=0; i<((unsigned long)got)*stream->params.channels; i++) {
-+ buffer[i] = f_buffer[i]*32767.0;
++ /* Clipping is prefered to overflow */
++ if(f_buffer[i]>=1.0){
++ f_buffer[i]=1.0;
++ }
++ if(f_buffer[i]<=-1.0){
++ f_buffer[i]=-1.0;
++ }
++ /* One might think that multipling by 32767.0 is logical but results in clipping */
++ buffer[i] = f_buffer[i]*32767.0;
+ }
+ } else {
+ got = run_data_callback(stream, buffer,
+ OSS_BUFFER_SIZE/stream->params.channels);
++ apply_volume_int(buffer, got*stream->params.channels,
++ stream->volume, stream->panning);
+ }
-+ apply_volume(buffer, got*stream->params.channels,
-+ stream->volume, stream->panning);
+ if (got<0) {
+ run_state_callback(stream, CUBEB_STATE_ERROR);
+ break;
@@ -891,9 +921,9 @@
+ oss_try_set_latency(stream, latency);
+
+ stream->floating = 0;
-+ SET(SNDCTL_DSP_CHANNELS, stream_params.channels);
-+ SET(SNDCTL_DSP_SPEED, stream_params.rate);
-+ switch (stream_params.format) {
++ SET(SNDCTL_DSP_CHANNELS, stream->params.channels);
++ SET(SNDCTL_DSP_SPEED, stream->params.rate);
++ switch (stream->params.format) {
+ case CUBEB_SAMPLE_S16LE:
+ SET(SNDCTL_DSP_SETFMT, AFMT_S16_LE);
+ break;
@@ -1070,6 +1100,31 @@
+CFLAGS += CONFIG['MOZ_OSS_CFLAGS']
CFLAGS += CONFIG['MOZ_ALSA_CFLAGS']
CFLAGS += CONFIG['MOZ_PULSEAUDIO_CFLAGS']
+
+diff --git media/libcubeb/tests/moz.build media/libcubeb/tests/moz.build
+index 1b17c7b..48b56c2 100644
+--- media/libcubeb/tests/moz.build
++++ media/libcubeb/tests/moz.build
+@@ -73,7 +73,6 @@ elif CONFIG['OS_TARGET'] == 'OpenBSD':
+ 'sndio',
+ ]
+ else:
+- OS_LIBS += CONFIG['MOZ_ALSA_LIBS']
+ OS_LIBS += CONFIG['MOZ_PULSEAUDIO_LIBS']
+
+ if CONFIG['GNU_CXX']:
+diff --git media/libcubeb/update.sh media/libcubeb/update.sh
+index a96badd..2f9585e 100755
+--- media/libcubeb/update.sh
++++ media/libcubeb/update.sh
+@@ -10,6 +10,7 @@ cp $1/src/cubeb_audiounit.c src
+ cp $1/src/cubeb_pulse.c src
+ cp $1/src/cubeb_sndio.c src
+ cp $1/src/cubeb_opensl.c src
++cp $1/src/cubeb_oss.c src
+ cp $1/src/cubeb_audiotrack.c src
+ cp $1/src/cubeb_wasapi.cpp src
+ cp $1/src/cubeb_resampler.h src
diff --git media/webrtc/signaling/test/common.build media/webrtc/signaling/test/common.build
index 991f03f..3d99eb5 100644
--- media/webrtc/signaling/test/common.build
Added: trunk/www/libxul/files/patch-bug1233275
===================================================================
--- trunk/www/libxul/files/patch-bug1233275 (rev 0)
+++ trunk/www/libxul/files/patch-bug1233275 2016-10-22 19:07:00 UTC (rev 21991)
@@ -0,0 +1,36 @@
+# Copy environment for IPC using NSPR to avoid race
+
+diff --git a/ipc/chromium/src/base/process_util_bsd.cc b/ipc/chromium/src/base/process_util_bsd.cc
+--- ipc/chromium/src/base/process_util_bsd.cc
++++ ipc/chromium/src/base/process_util_bsd.cc
+@@ -12,10 +12,9 @@
+
+ #include <string>
+
++#include "nspr.h"
+ #include "base/eintr_wrapper.h"
+
+-extern "C" char **environ __attribute__((__visibility__("default")));
+-
+ namespace base {
+
+ void FreeEnvVarsArray(char* array[], int length)
+@@ -66,6 +65,7 @@ bool LaunchApp(const std::vector<std::st
+ // Existing variables are overwritten by env_vars_to_set.
+ int pos = 0;
+ environment_map combined_env_vars = env_vars_to_set;
++ char **environ = PR_DuplicateEnvironment();
+ while(environ[pos] != NULL) {
+ std::string varString = environ[pos];
+ std::string varName = varString.substr(0, varString.find_first_of('='));
+@@ -73,8 +73,9 @@ bool LaunchApp(const std::vector<std::st
+ if (combined_env_vars.find(varName) == combined_env_vars.end()) {
+ combined_env_vars[varName] = varValue;
+ }
+- pos++;
++ PR_Free(environ[pos++]);
+ }
++ PR_Free(environ);
+ int varsLen = combined_env_vars.size() + 1;
+
+ char** vars = new char*[varsLen];
Property changes on: trunk/www/libxul/files/patch-bug1233275
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/www/libxul/files/patch-bug1242132
===================================================================
--- trunk/www/libxul/files/patch-bug1242132 (rev 0)
+++ trunk/www/libxul/files/patch-bug1242132 2016-10-22 19:07:00 UTC (rev 21991)
@@ -0,0 +1,13 @@
+# nss-config --cflags returns multiple flags, don't treat them as one string
+
+--- python/mozbuild/mozbuild/frontend/gyp_reader.py~
++++ python/mozbuild/mozbuild/frontend/gyp_reader.py
+@@ -217,7 +217,7 @@ def read_from_gyp(config, path, output,
+ # We may be getting make variable references out of the
+ # gyp data, and we don't want those in emitted data, so
+ # substitute them with their actual value.
+- f = expand_variables(f, config.substs)
++ f = expand_variables(f, config.substs).split()
+ if not f:
+ continue
+ # the result may be a string or a list.
Property changes on: trunk/www/libxul/files/patch-bug1242132
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/www/libxul/files/patch-bug1243312
===================================================================
--- trunk/www/libxul/files/patch-bug1243312 (rev 0)
+++ trunk/www/libxul/files/patch-bug1243312 2016-10-22 19:07:00 UTC (rev 21991)
@@ -0,0 +1,21 @@
+commit a5c6f19
+Author: Dragana Damjanovic <dd.mozilla at gmail.com>
+Date: Wed Jan 27 01:47:00 2016 +0100
+
+ Bug 1243312 - nsNetCID is missing in toolkit/system/unixproxy/nsLibProxySettings.cpp. r=jduell
+---
+ toolkit/system/unixproxy/nsLibProxySettings.cpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git toolkit/system/unixproxy/nsLibProxySettings.cpp toolkit/system/unixproxy/nsLibProxySettings.cpp
+index f6ec377..e9179c1 100644
+--- toolkit/system/unixproxy/nsLibProxySettings.cpp
++++ toolkit/system/unixproxy/nsLibProxySettings.cpp
+@@ -9,6 +9,7 @@
+ #include "nsIURI.h"
+ #include "nsString.h"
+ #include "nsCOMPtr.h"
++#include "nsNetCID.h"
+ #include "nspr.h"
+
+ extern "C" {
Property changes on: trunk/www/libxul/files/patch-bug1243312
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/www/libxul/files/patch-bug1245076
===================================================================
--- trunk/www/libxul/files/patch-bug1245076 (rev 0)
+++ trunk/www/libxul/files/patch-bug1245076 2016-10-22 19:07:00 UTC (rev 21991)
@@ -0,0 +1,74 @@
+
+# HG changeset patch
+# User Mike Hommey <mh+mozilla at glandium.org>
+# Date 1457596445 -32400
+# Node ID 55212130f19da3079167a6b0a5a0ed6689c9a71d
+# Parent 27c94617d7064d566c24a42e11cd4c7ef725923d
+Bug 1245076 - Don't include mozalloc.h from the cstdlib wrapper. r=froydnj
+
+Our STL wrappers do various different things, one of which is including
+mozalloc.h for infallible operator new. mozalloc.h includes stdlib.h,
+which, in libstdc++ >= 6 is now itself a wrapper around cstdlib, which
+circles back to our STL wrapper.
+
+But of the things our STL wrappers do, including mozalloc.h is not one
+that is necessary for cstdlib. So skip including mozalloc.h in our
+cstdlib wrapper.
+
+Additionally, some C++ sources (in media/mtransport) are including
+headers in an extern "C" block, which end up including stdlib.h, which
+ends up including cstdlib because really, this is all C++, and our
+wrapper pre-includes <new> for mozalloc.h, which fails because templates
+don't work inside extern "C". So, don't pre-include <new> when we're not
+including mozalloc.h.
+
+
+diff --git config/gcc-stl-wrapper.template.h config/gcc-stl-wrapper.template.h
+--- config/gcc-stl-wrapper.template.h
++++ config/gcc-stl-wrapper.template.h
+@@ -12,33 +12,40 @@
+ // compiling ObjC.
+ #if defined(__EXCEPTIONS) && __EXCEPTIONS && !(__OBJC__ && __GNUC__ && XP_IOS)
+ # error "STL code can only be used with -fno-exceptions"
+ #endif
+
+ // Silence "warning: #include_next is a GCC extension"
+ #pragma GCC system_header
+
++// Don't include mozalloc for cstdlib. See bug 1245076.
++#ifndef moz_dont_include_mozalloc_for_cstdlib
++# define moz_dont_include_mozalloc_for_cstdlib
++#endif
++#ifndef moz_dont_include_mozalloc_for_${HEADER}
+ // mozalloc.h wants <new>; break the cycle by always explicitly
+ // including <new> here. NB: this is a tad sneaky. Sez the gcc docs:
+ //
+ // `#include_next' does not distinguish between <file> and "file"
+ // inclusion, nor does it check that the file you specify has the
+ // same name as the current file. It simply looks for the file
+ // named, starting with the directory in the search path after the
+ // one where the current file was found.
+-#include_next <new>
++# include_next <new>
+
+ // See if we're in code that can use mozalloc. NB: this duplicates
+ // code in nscore.h because nscore.h pulls in prtypes.h, and chromium
+ // can't build with that being included before base/basictypes.h.
+-#if !defined(XPCOM_GLUE) && !defined(NS_NO_XPCOM) && !defined(MOZ_NO_MOZALLOC)
+-# include "mozilla/mozalloc.h"
+-#else
+-# error "STL code can only be used with infallible ::operator new()"
++# if !defined(XPCOM_GLUE) && !defined(NS_NO_XPCOM) && !defined(MOZ_NO_MOZALLOC)
++# include "mozilla/mozalloc.h"
++# else
++# error "STL code can only be used with infallible ::operator new()"
++# endif
++
+ #endif
+
+ #if defined(DEBUG) && !defined(_GLIBCXX_DEBUG)
+ // Enable checked iterators and other goodies
+ //
+ // FIXME/bug 551254: gcc's debug STL implementation requires -frtti.
+ // Figure out how to resolve this with -fno-rtti. Maybe build with
+ // -frtti in DEBUG builds?
Property changes on: trunk/www/libxul/files/patch-bug1245076
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/www/libxul/files/patch-bug1252246
===================================================================
--- trunk/www/libxul/files/patch-bug1252246 (rev 0)
+++ trunk/www/libxul/files/patch-bug1252246 2016-10-22 19:07:00 UTC (rev 21991)
@@ -0,0 +1,44 @@
+# Prefer PTHREAD_PROCESS_SHARED on FreeBSD 11.0 or later
+
+diff --git a/ipc/glue/CrossProcessMutex.h b/ipc/glue/CrossProcessMutex.h
+--- ipc/glue/CrossProcessMutex.h
++++ ipc/glue/CrossProcessMutex.h
+@@ -9,7 +9,7 @@
+ #include "base/process.h"
+ #include "mozilla/Mutex.h"
+
+-#if defined(OS_LINUX) || defined(XP_DARWIN)
++#if !defined(OS_WIN) && !defined(OS_NETBSD) && !defined(OS_OPENBSD)
+ #include <pthread.h>
+ #include "SharedMemoryBasic.h"
+ #include "mozilla/Atomics.h"
+@@ -34,7 +34,7 @@ struct ParamTraits;
+ namespace mozilla {
+ #if defined(OS_WIN)
+ typedef HANDLE CrossProcessMutexHandle;
+-#elif defined(OS_LINUX) || defined(OS_MACOSX)
++#elif !defined(OS_NETBSD) && !defined(OS_OPENBSD)
+ typedef mozilla::ipc::SharedMemoryBasic::Handle CrossProcessMutexHandle;
+ #else
+ // Stub for other platforms. We can't use uintptr_t here since different
+@@ -100,7 +100,7 @@ private:
+
+ #if defined(OS_WIN)
+ HANDLE mMutex;
+-#elif defined(OS_LINUX) || defined(OS_MACOSX)
++#elif !defined(OS_NETBSD) && !defined(OS_OPENBSD)
+ RefPtr<mozilla::ipc::SharedMemoryBasic> mSharedBuffer;
+ pthread_mutex_t* mMutex;
+ mozilla::Atomic<int32_t>* mCount;
+diff --git a/ipc/glue/moz.build b/ipc/glue/moz.build
+--- ipc/glue/moz.build
++++ ipc/glue/moz.build
+@@ -61,7 +61,7 @@ if CONFIG['OS_ARCH'] == 'WINNT':
+ SOURCES += [
+ 'CrossProcessMutex_windows.cpp',
+ ]
+-elif CONFIG['OS_ARCH'] in ('Linux', 'Darwin'):
++elif not CONFIG['OS_ARCH'] in ('NetBSD', 'OpenBSD'):
+ UNIFIED_SOURCES += [
+ 'CrossProcessMutex_posix.cpp',
+ ]
Property changes on: trunk/www/libxul/files/patch-bug1252246
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/www/libxul/files/patch-bug1268816
===================================================================
--- trunk/www/libxul/files/patch-bug1268816 (rev 0)
+++ trunk/www/libxul/files/patch-bug1268816 2016-10-22 19:07:00 UTC (rev 21991)
@@ -0,0 +1,50 @@
+
+# HG changeset patch
+# User Lee Salzman <lsalzman at mozilla.com>
+# Date 1461978185 14400
+# Node ID b622cbd9ba13d01abcb1d04684dcb39c22a08590
+# Parent f3a5c8b5e17073a1e68f079da93f8dbe10e454a9
+Bug 1268816 - allow Skia to use C++11 features on platforms that have them. r=froydnj
+
+diff --git config/stl-headers config/stl-headers
+--- config/stl-headers
++++ config/stl-headers
+@@ -29,16 +29,17 @@ iterator
+ limits
+ list
+ map
+ memory
+ ostream
+ set
+ stack
+ string
++type_traits
+ utility
+ vector
+ cassert
+ climits
+ cmath
+ cstdarg
+ cstdio
+ cstdlib
+diff --git config/system-headers config/system-headers
+--- config/system-headers
++++ config/system-headers
+@@ -1109,16 +1109,17 @@ ThreadManagerTests.h
+ Threads.h
+ time.h
+ Timer.h
+ tlhelp32.h
+ ToolUtils.h
+ tr1/functional
+ trace.h
+ Traps.h
++type_traits
+ typeinfo
+ types.h
+ Types.h
+ UAppleEventsMgr.h
+ UAttachments.h
+ ucontext.h
+ uconv.h
+ UCursor.h
Property changes on: trunk/www/libxul/files/patch-bug1268816
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/www/libxul/files/patch-bug1269171
===================================================================
--- trunk/www/libxul/files/patch-bug1269171 (rev 0)
+++ trunk/www/libxul/files/patch-bug1269171 2016-10-22 19:07:00 UTC (rev 21991)
@@ -0,0 +1,258 @@
+
+# HG changeset patch
+# User Mike Hommey <mh+mozilla at glandium.org>
+# Date 1463557039 -32400
+# Node ID 68da139d0866977c0ada86319fa94388f2255446
+# Parent a640e6fa8ab9977fb6c5bcf63dc4daca6699477b
+Bug 1269171 - Change how mozalloc.h is hooked in STL wrappers. r=froydnj
+
+Since the introduction of the STL wrappers, they have included
+mozalloc.h, and multiple times, we've hit header reentrancy problems,
+and worked around them as best as we could.
+
+Taking a step back, all mozalloc.h does is:
+- declare moz_* allocator functions.
+- define inline implementations of various operator new/delete variants.
+
+The first only requires the functions to be declared before they are used,
+so mozalloc.h only needs to be included before anything that would use
+those functions.
+
+The second doesn't actually require a specific order, as long as the
+declaration for those functions comes before their use, and they are
+either declared in <new> or implicitly by the C++ compiler.
+
+So all in all, it doesn't matter that mozalloc.h is included before the
+wrapped STL headers. What matters is that it's included when STL headers
+are included. So arrange things such that mozalloc.h is included after
+the first wrapped STL header is fully preprocessed (and all its includes
+have been included).
+
+
+diff --git config/gcc-stl-wrapper.template.h config/gcc-stl-wrapper.template.h
+--- config/gcc-stl-wrapper.template.h
++++ config/gcc-stl-wrapper.template.h
+@@ -12,56 +12,54 @@
+ // compiling ObjC.
+ #if defined(__EXCEPTIONS) && __EXCEPTIONS && !(__OBJC__ && __GNUC__ && XP_IOS)
+ # error "STL code can only be used with -fno-exceptions"
+ #endif
+
+ // Silence "warning: #include_next is a GCC extension"
+ #pragma GCC system_header
+
+-// Don't include mozalloc for cstdlib. See bug 1245076.
+-#ifndef moz_dont_include_mozalloc_for_cstdlib
+-# define moz_dont_include_mozalloc_for_cstdlib
+-#endif
+-#ifndef moz_dont_include_mozalloc_for_${HEADER}
+-// mozalloc.h wants <new>; break the cycle by always explicitly
+-// including <new> here. NB: this is a tad sneaky. Sez the gcc docs:
+-//
+-// `#include_next' does not distinguish between <file> and "file"
+-// inclusion, nor does it check that the file you specify has the
+-// same name as the current file. It simply looks for the file
+-// named, starting with the directory in the search path after the
+-// one where the current file was found.
+-# include_next <new>
+-
+-// See if we're in code that can use mozalloc. NB: this duplicates
+-// code in nscore.h because nscore.h pulls in prtypes.h, and chromium
+-// can't build with that being included before base/basictypes.h.
+-# if !defined(XPCOM_GLUE) && !defined(NS_NO_XPCOM) && !defined(MOZ_NO_MOZALLOC)
+-# include "mozilla/mozalloc.h"
+-# else
+-# error "STL code can only be used with infallible ::operator new()"
+-# endif
+-
+-#endif
+-
+ #if defined(DEBUG) && !defined(_GLIBCXX_DEBUG)
+ // Enable checked iterators and other goodies
+ //
+ // FIXME/bug 551254: gcc's debug STL implementation requires -frtti.
+ // Figure out how to resolve this with -fno-rtti. Maybe build with
+ // -frtti in DEBUG builds?
+ //
+ // # define _GLIBCXX_DEBUG 1
+ #endif
+
++// Don't include mozalloc for cstdlib. See bug 1245076.
++#ifndef moz_dont_include_mozalloc_for_cstdlib
++# define moz_dont_include_mozalloc_for_cstdlib
++#endif
++
++// Include mozalloc after the STL header and all other headers it includes
++// have been preprocessed.
++#if !defined(MOZ_INCLUDE_MOZALLOC_H) && \
++ !defined(moz_dont_include_mozalloc_for_${HEADER})
++# define MOZ_INCLUDE_MOZALLOC_H
++# define MOZ_INCLUDE_MOZALLOC_H_FROM_${HEADER}
++#endif
++
+ #pragma GCC visibility push(default)
+ #include_next <${HEADER}>
+ #pragma GCC visibility pop
+
++#ifdef MOZ_INCLUDE_MOZALLOC_H_FROM_${HEADER}
++// See if we're in code that can use mozalloc. NB: this duplicates
++// code in nscore.h because nscore.h pulls in prtypes.h, and chromium
++// can't build with that being included before base/basictypes.h.
++# if !defined(XPCOM_GLUE) && !defined(NS_NO_XPCOM) && !defined(MOZ_NO_MOZALLOC)
++# include "mozilla/mozalloc.h"
++# else
++# error "STL code can only be used with infallible ::operator new()"
++# endif
++#endif
++
+ // gcc calls a __throw_*() function from bits/functexcept.h when it
+ // wants to "throw an exception". functexcept exists nominally to
+ // support -fno-exceptions, but since we'll always use the system
+ // libstdc++, and it's compiled with exceptions, then in practice
+ // these __throw_*() functions will always throw exceptions (shades of
+ // -fshort-wchar). We don't want that and so define our own inlined
+ // __throw_*().
+ #ifndef mozilla_throw_gcc_h
+diff --git config/make-stl-wrappers.py config/make-stl-wrappers.py
+--- config/make-stl-wrappers.py
++++ config/make-stl-wrappers.py
+@@ -25,28 +25,26 @@ def header_path(header, compiler):
+ def is_comment(line):
+ return re.match(r'\s*#.*', line)
+
+ def main(outdir, compiler, template_file, header_list_file):
+ if not os.path.isdir(outdir):
+ os.mkdir(outdir)
+
+ template = open(template_file, 'r').read()
+- path_to_new = header_path('new', compiler)
+
+ for header in open(header_list_file, 'r'):
+ header = header.rstrip()
+ if 0 == len(header) or is_comment(header):
+ continue
+
+ path = header_path(header, compiler)
+ with FileAvoidWrite(os.path.join(outdir, header)) as f:
+ f.write(string.Template(template).substitute(HEADER=header,
+- HEADER_PATH=path,
+- NEW_HEADER_PATH=path_to_new))
++ HEADER_PATH=path))
+
+
+ if __name__ == '__main__':
+ if 5 != len(sys.argv):
+ print("""Usage:
+ python {0} OUT_DIR ('msvc'|'gcc') TEMPLATE_FILE HEADER_LIST_FILE
+ """.format(sys.argv[0]), file=sys.stderr)
+ sys.exit(1)
+diff --git config/msvc-stl-wrapper.template.h config/msvc-stl-wrapper.template.h
+--- config/msvc-stl-wrapper.template.h
++++ config/msvc-stl-wrapper.template.h
+@@ -3,45 +3,33 @@
+ */
+ /* 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/. */
+
+ #ifndef mozilla_${HEADER}_h
+ #define mozilla_${HEADER}_h
+
+-#ifndef MOZ_HAVE_INCLUDED_ALLOC
+-#define MOZ_HAVE_INCLUDED_ALLOC
+-
+ #if _HAS_EXCEPTIONS
+ # error "STL code can only be used with -fno-exceptions"
+ #endif
+
++// Include mozalloc after the STL header and all other headers it includes
++// have been preprocessed.
++#if !defined(MOZ_INCLUDE_MOZALLOC_H)
++# define MOZ_INCLUDE_MOZALLOC_H
++# define MOZ_INCLUDE_MOZALLOC_H_FROM_${HEADER}
++#endif
++
+ // Code built with !_HAS_EXCEPTIONS calls std::_Throw(), but the win2k
+ // CRT doesn't export std::_Throw(). So we define it.
+ #ifndef mozilla_Throw_h
+ # include "mozilla/throw_msvc.h"
+ #endif
+
+-// Code might include <new> before other wrapped headers, but <new>
+-// includes <exception> and so we want to wrap it. But mozalloc.h
+-// wants <new> also, so we break the cycle by always explicitly
+-// including <new> here.
+-#include <${NEW_HEADER_PATH}>
+-
+-// See if we're in code that can use mozalloc. NB: this duplicates
+-// code in nscore.h because nscore.h pulls in prtypes.h, and chromium
+-// can't build with that being included before base/basictypes.h.
+-#if !defined(XPCOM_GLUE) && !defined(NS_NO_XPCOM) && !defined(MOZ_NO_MOZALLOC)
+-# include "mozilla/mozalloc.h"
+-#else
+-# error "STL code can only be used with infallible ::operator new()"
+-#endif
+-#endif /* MOZ_HAVE_INCLUDED_ALLOC */
+-
+ #ifdef _DEBUG
+ // From
+ // http://msdn.microsoft.com/en-us/library/aa985982%28VS.80%29.aspx
+ // and
+ // http://msdn.microsoft.com/en-us/library/aa985965%28VS.80%29.aspx
+ // there appear to be two types of STL container checking. The
+ // former is enabled by -D_DEBUG (which is implied by -MDd or -MTd), and
+ // looks to be full generation/mutation checked iterators as done by
+@@ -70,9 +58,20 @@
+ // but that's OK because we're not throwing them.
+ #pragma warning( push )
+ #pragma warning( disable : 4275 4530 )
+
+ #include <${HEADER_PATH}>
+
+ #pragma warning( pop )
+
++#ifdef MOZ_INCLUDE_MOZALLOC_H_FROM_${HEADER}
++// See if we're in code that can use mozalloc. NB: this duplicates
++// code in nscore.h because nscore.h pulls in prtypes.h, and chromium
++// can't build with that being included before base/basictypes.h.
++# if !defined(XPCOM_GLUE) && !defined(NS_NO_XPCOM) && !defined(MOZ_NO_MOZALLOC)
++# include "mozilla/mozalloc.h"
++# else
++# error "STL code can only be used with infallible ::operator new()"
++# endif
++#endif
++
+ #endif // if mozilla_${HEADER}_h
+diff --git memory/mozalloc/mozalloc.h memory/mozalloc/mozalloc.h
+--- memory/mozalloc/mozalloc.h
++++ memory/mozalloc/mozalloc.h
+@@ -7,20 +7,27 @@
+
+ #ifndef mozilla_mozalloc_h
+ #define mozilla_mozalloc_h
+
+ /*
+ * https://bugzilla.mozilla.org/show_bug.cgi?id=427099
+ */
+
+-#include <stdlib.h>
+-#include <string.h>
+ #if defined(__cplusplus)
+ # include <new>
++// Since libstdc++ 6, including the C headers (e.g. stdlib.h) instead of the
++// corresponding C++ header (e.g. cstdlib) can cause confusion in C++ code
++// using things defined there. Specifically, with stdlib.h, the use of abs()
++// in gfx/graphite2/src/inc/UtfCodec.h somehow ends up picking the wrong abs()
++# include <cstdlib>
++# include <cstring>
++#else
++# include <stdlib.h>
++# include <string.h>
+ #endif
+
+ #if defined(__cplusplus)
+ #include "mozilla/fallible.h"
+ #include "mozilla/TemplateLib.h"
+ #endif
+ #include "mozilla/Attributes.h"
+ #include "mozilla/Types.h"
Property changes on: trunk/www/libxul/files/patch-bug1269171
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/www/libxul/files/patch-bug1278861
===================================================================
--- trunk/www/libxul/files/patch-bug1278861 (rev 0)
+++ trunk/www/libxul/files/patch-bug1278861 2016-10-22 19:07:00 UTC (rev 21991)
@@ -0,0 +1,38 @@
+
+# HG changeset patch
+# User Nathan Froyd <froydnj at gmail.com>
+# Date 1466820205 14400
+# Node ID bd25b06261c840a62d035192cf4b1dbc18f54e3f
+# Parent fbe25a30fcbbe172bdd37c70c5b06cdbb07886af
+Bug 1278861 - adjust ifdefs in Conversions.h:ToInt32 to catch clang-on-arm-generally; r=luke
+
+The bug noted in ToInt32 doesn't just exist when compiling for
+arm-darwin; it exists for ARM targets generally. The ifdef should
+reflect that.
+
+diff --git js/public/Conversions.h js/public/Conversions.h
+--- js/public/Conversions.h
++++ js/public/Conversions.h
+@@ -395,19 +395,19 @@ ToIntWidth(double d)
+ }
+
+ } // namespace detail
+
+ /* ES5 9.5 ToInt32 (specialized for doubles). */
+ inline int32_t
+ ToInt32(double d)
+ {
+- // clang crashes compiling this when targeting arm-darwin:
++ // clang crashes compiling this when targeting arm:
+ // https://llvm.org/bugs/show_bug.cgi?id=22974
+-#if defined (__arm__) && defined (__GNUC__) && !defined(__APPLE__)
++#if defined (__arm__) && defined (__GNUC__) && !defined(__clang__)
+ int32_t i;
+ uint32_t tmp0;
+ uint32_t tmp1;
+ uint32_t tmp2;
+ asm (
+ // We use a pure integer solution here. In the 'softfp' ABI, the argument
+ // will start in r0 and r1, and VFP can't do all of the necessary ECMA
+ // conversions by itself so some integer code will be required anyway. A
+
Property changes on: trunk/www/libxul/files/patch-bug1278861
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/www/libxul/files/patch-modules-libpref-init-all.js
===================================================================
--- trunk/www/libxul/files/patch-modules-libpref-init-all.js (rev 0)
+++ trunk/www/libxul/files/patch-modules-libpref-init-all.js 2016-10-22 19:07:00 UTC (rev 21991)
@@ -0,0 +1,15 @@
+--- modules/libpref/init/all.js.orig 2015-08-06 22:39:34 UTC
++++ modules/libpref/init/all.js
+@@ -4052,7 +4052,12 @@ pref("layers.max-active", -1);
+ pref("layers.tiles.adjust", true);
+
+ // Set the default values, and then override per-platform as needed
++#ifdef MOZ_TREE_CAIRO
+ pref("layers.offmainthreadcomposition.enabled", true);
++#else
++// Disable for system cairo on suspicion of causing random crashes
++pref("layers.offmainthreadcomposition.enabled", false);
++#endif
+ // Compositor target frame rate. NOTE: If vsync is enabled the compositor
+ // frame rate will still be capped.
+ // -1 -> default (match layout.frame_rate or 60 FPS)
Property changes on: trunk/www/libxul/files/patch-modules-libpref-init-all.js
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/www/libxul/files/patch-sample-type
===================================================================
--- trunk/www/libxul/files/patch-sample-type (rev 0)
+++ trunk/www/libxul/files/patch-sample-type 2016-10-22 19:07:00 UTC (rev 21991)
@@ -0,0 +1,13 @@
+# Let ports handle default sample type
+
+--- configure.in~
++++ configure.in
+@@ -5144,7 +5144,7 @@ dnl Use integers over floats for audio o
+ dnl (regarless of the CPU architecture, because audio
+ dnl backends for those platforms don't support floats. We also
+ dnl use integers on ARM with other OS, because it's more efficient.
+-if test "$OS_TARGET" = "Android" -o "$CPU_ARCH" = "arm"; then
++if test -n "$MOZ_INTEGER_SAMPLES"; then
+ MOZ_SAMPLE_TYPE_S16=1
+ AC_DEFINE(MOZ_SAMPLE_TYPE_S16)
+ AC_SUBST(MOZ_SAMPLE_TYPE_S16)
Property changes on: trunk/www/libxul/files/patch-sample-type
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
More information about the Midnightbsd-cvs
mailing list