View | Details | Raw Unified | Return to bug 219963 | Differences between
and this patch

Collapse All | Expand All

(-)b/Mk/Uses/gecko.mk (-2 / +2 lines)
Lines 37-48 RUN_DEPENDS+= libxul>=45:www/libxul Link Here
37
.elif ${gecko_ARGS:Mfirefox}
37
.elif ${gecko_ARGS:Mfirefox}
38
38
39
_GECKO_DEFAULT_VERSION=	52
39
_GECKO_DEFAULT_VERSION=	52
40
_GECKO_VERSIONS=		52 54
40
_GECKO_VERSIONS=		52 55
41
_GECKO_TYPE=	firefox
41
_GECKO_TYPE=	firefox
42
42
43
# Dependence lines for different Firefox versions
43
# Dependence lines for different Firefox versions
44
52_DEPENDS=		${LOCALBASE}/lib/firefox/firefox:www/firefox-esr
44
52_DEPENDS=		${LOCALBASE}/lib/firefox/firefox:www/firefox-esr
45
54_DEPENDS=		${LOCALBASE}/lib/firefox/firefox:www/firefox
45
55_DEPENDS=		${LOCALBASE}/lib/firefox/firefox:www/firefox
46
46
47
.if exists(${LOCALBASE}/bin/firefox)
47
.if exists(${LOCALBASE}/bin/firefox)
48
_GECKO_INSTALLED_VER!=	${LOCALBASE}/bin/firefox --version 2>/dev/null
48
_GECKO_INSTALLED_VER!=	${LOCALBASE}/bin/firefox --version 2>/dev/null
(-)b/www/firefox/Makefile (-5 / +6 lines)
Lines 2-26 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	firefox
4
PORTNAME=	firefox
5
DISTVERSION=	54.0
5
DISTVERSION=	55.0b1
6
DISTVERSIONSUFFIX=.source
6
DISTVERSIONSUFFIX=.source
7
PORTEPOCH=	1
7
PORTEPOCH=	1
8
CATEGORIES=	www ipv6
8
CATEGORIES=	www ipv6
9
MASTER_SITES=	MOZILLA/${PORTNAME}/releases/${DISTVERSION}/source \
9
MASTER_SITES=	MOZILLA/${PORTNAME}/releases/${DISTVERSION}/source \
10
		MOZILLA/${PORTNAME}/candidates/${DISTVERSION}-candidates/build3/source
10
		MOZILLA/${PORTNAME}/candidates/${DISTVERSION}-candidates/build4/source
11
11
12
MAINTAINER=	gecko@FreeBSD.org
12
MAINTAINER=	gecko@FreeBSD.org
13
COMMENT=	Web browser based on the browser portion of Mozilla
13
COMMENT=	Web browser based on the browser portion of Mozilla
14
14
15
BUILD_DEPENDS=	nspr>=4.14:devel/nspr \
15
BUILD_DEPENDS=	nspr>=4.14:devel/nspr \
16
		nss>=3.30.2:security/nss \
16
		nss>=3.31:security/nss \
17
		libevent>=2.0.22:devel/libevent \
17
		libevent>=2.0.22:devel/libevent \
18
		harfbuzz>=1.4.3:print/harfbuzz \
18
		harfbuzz>=1.4.6:print/harfbuzz \
19
		graphite2>=1.3.10:graphics/graphite2 \
19
		graphite2>=1.3.10:graphics/graphite2 \
20
		png>=1.6.28:graphics/png \
20
		png>=1.6.28:graphics/png \
21
		libvorbis>=1.3.5,3:audio/libvorbis \
21
		libvorbis>=1.3.5,3:audio/libvorbis \
22
		libvpx>=1.5.0:multimedia/libvpx \
22
		libvpx>=1.5.0:multimedia/libvpx \
23
		sqlite3>=3.17.0:databases/sqlite3 \
23
		sqlite3>=3.19.2:databases/sqlite3 \
24
		${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3 \
24
		${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3 \
25
		v4l_compat>0:multimedia/v4l_compat \
25
		v4l_compat>0:multimedia/v4l_compat \
26
		autoconf-2.13:devel/autoconf213 \
26
		autoconf-2.13:devel/autoconf213 \
Lines 46-51 MOZ_OPTIONS= --enable-application=browser \ Link Here
46
46
47
OPTIONS_DEFINE=		RUST
47
OPTIONS_DEFINE=		RUST
48
OPTIONS_DEFAULT=	BUNDLED_CAIRO
48
OPTIONS_DEFAULT=	BUNDLED_CAIRO
49
OPTIONS_EXCLUDE=	GNOMEUI
49
# XXX lang/rust and devel/cargo currently build only on these platforms
50
# XXX lang/rust and devel/cargo currently build only on these platforms
50
OPTIONS_DEFAULT_amd64=	RUST
51
OPTIONS_DEFAULT_amd64=	RUST
51
OPTIONS_DEFAULT_i386=	RUST
52
OPTIONS_DEFAULT_i386=	RUST
(-)b/www/firefox/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1496961575
1
TIMESTAMP = 1497363179
2
SHA256 (firefox-54.0.source.tar.xz) = 08a9ff6870d904a2af1d03c17c6c44f67413608efb66bb280894d7b92c336a77
2
SHA256 (firefox-55.0b1.source.tar.xz) = 5424250111c6a1124325ba88481d28f37a90c771e66bb7bf3c05f7a0bd7a4d04
3
SIZE (firefox-54.0.source.tar.xz) = 229178564
3
SIZE (firefox-55.0b1.source.tar.xz) = 236308400
(-)b/www/firefox/files/patch-bug1021761 (-22 / +18 lines)
Lines 122-128 index 57bcb4c13652..68be024f4a68 100644 Link Here
122
 
122
 
123
 static int
123
 static int
124
 validate_stream_params(cubeb_stream_params * input_stream_params,
124
 validate_stream_params(cubeb_stream_params * input_stream_params,
125
@@ -138,6 +141,9 @@ cubeb_init(cubeb ** context, char const * context_name)
125
@@ -155,6 +158,10 @@ cubeb_init(cubeb ** context, char const * context_name, char const * backend_nam
126
 #if defined(USE_KAI)
127
       init_oneshot = kai_init;
128
 #endif
129
+    } else if (!strcmp(backend_name, "oss")) {
130
+#if defined(USE_OSS)
131
+      init_oneshot = oss_init;
132
+#endif
133
     } else {
134
       /* Already set */
135
     }
136
@@ -196,6 +203,9 @@ cubeb_init(cubeb ** context, char const * context_name, char const * backend_nam
126
 #if defined(USE_KAI)
137
 #if defined(USE_KAI)
127
     kai_init,
138
     kai_init,
128
 #endif
139
 #endif
Lines 246-252 index 05ad27fef53b..3ea78e994f59 100644 Link Here
246
+    char * buftail = stm->buffer + WRAP(snd_pcm_frames_to_bytes)(stm->pcm, stm->bufframes);
257
+    char * buftail = stm->buffer + WRAP(snd_pcm_frames_to_bytes)(stm->pcm, stm->bufframes);
247
 
258
 
248
     /* Correct read size to the other stream available frames */
259
     /* Correct read size to the other stream available frames */
249
     if (stm->other_stream && got > stm->other_stream->bufframes) {
260
     if (stm->other_stream && got > (snd_pcm_sframes_t) stm->other_stream->bufframes) {
250
@@ -372,8 +421,8 @@ alsa_process_stream(cubeb_stream * stm)
261
@@ -372,8 +421,8 @@ alsa_process_stream(cubeb_stream * stm)
251
     long drain_frames = avail - stm->bufframes;
262
     long drain_frames = avail - stm->bufframes;
252
     double drain_time = (double) drain_frames / stm->params.rate;
263
     double drain_time = (double) drain_frames / stm->params.rate;
Lines 579-585 index 05ad27fef53b..3ea78e994f59 100644 Link Here
579
+  r = WRAP(snd_pcm_poll_descriptors)(stm->pcm, stm->saved_fds, stm->nfds);
590
+  r = WRAP(snd_pcm_poll_descriptors)(stm->pcm, stm->saved_fds, stm->nfds);
580
   assert((nfds_t) r == stm->nfds);
591
   assert((nfds_t) r == stm->nfds);
581
 
592
 
582
   r = pthread_cond_init(&stm->cond, NULL);
593
   if (alsa_register_stream(ctx, stm) != 0) {
583
@@ -1048,7 +1156,7 @@ alsa_stream_destroy(cubeb_stream * stm)
594
@@ -1048,7 +1156,7 @@ alsa_stream_destroy(cubeb_stream * stm)
584
   pthread_mutex_lock(&stm->mutex);
595
   pthread_mutex_lock(&stm->mutex);
585
   if (stm->pcm) {
596
   if (stm->pcm) {
Lines 1182-1210 diff --git media/libcubeb/update.sh media/libcubeb/update.sh Link Here
1182
index b139b8f497fd..d1f8a223c6d8 100755
1193
index b139b8f497fd..d1f8a223c6d8 100755
1183
--- media/libcubeb/update.sh
1194
--- media/libcubeb/update.sh
1184
+++ media/libcubeb/update.sh
1195
+++ media/libcubeb/update.sh
1185
@@ -17,6 +17,7 @@ cp $1/src/cubeb_audiounit.cpp src
1196
@@ -20,6 +20,7 @@ cp $1/src/cubeb_log.h src
1186
 cp $1/src/cubeb_osx_run_loop.h src
1197
 cp $1/src/cubeb_mixer.cpp src
1187
 cp $1/src/cubeb_jack.cpp src
1198
 cp $1/src/cubeb_mixer.h src
1188
 cp $1/src/cubeb_opensl.c src
1199
 cp $1/src/cubeb_opensl.c src
1189
+cp $1/src/cubeb_oss.c src
1200
+cp $1/src/cubeb_oss.c src
1190
 cp $1/src/cubeb_array_queue.h src
1201
 cp $1/src/cubeb_osx_run_loop.h src
1191
 cp $1/src/cubeb_panner.cpp src
1202
 cp $1/src/cubeb_panner.cpp src
1192
 cp $1/src/cubeb_panner.h src
1203
 cp $1/src/cubeb_panner.h src
1193
diff --git media/webrtc/signaling/test/common.build media/webrtc/signaling/test/common.build
1194
index 3e5450f5d63a..dd45427f655a 100644
1195
--- media/webrtc/signaling/test/common.build
1196
+++ media/webrtc/signaling/test/common.build
1197
@@ -99,8 +99,8 @@ USE_LIBS += ['mozglue']
1198
 OS_LIBS += CONFIG['MOZ_WEBRTC_X11_LIBS']
1199
 OS_LIBS += CONFIG['REALTIME_LIBS']
1200
 
1201
-if CONFIG['MOZ_ALSA']:
1202
-    OS_LIBS += CONFIG['MOZ_ALSA_LIBS']
1203
+if CONFIG['MOZ_OSS']:
1204
+    OS_LIBS += CONFIG['MOZ_OSS_LIBS']
1205
 
1206
 if CONFIG['MOZ_SYSTEM_JPEG']:
1207
     OS_LIBS += CONFIG['MOZ_JPEG_LIBS']
1208
diff --git toolkit/library/moz.build toolkit/library/moz.build
1204
diff --git toolkit/library/moz.build toolkit/library/moz.build
1209
index a61c689c83c3..7764df6f8a6b 100644
1205
index a61c689c83c3..7764df6f8a6b 100644
1210
--- toolkit/library/moz.build
1206
--- toolkit/library/moz.build
(-)b/www/firefox/files/patch-bug1371927 (+124 lines)
Added Link Here
1
commit 40744bcfbf86
2
Author: Iaroslav (yarik) Sheptykin <yarik.sheptykin@googlemail.com>
3
Date:   Sat Jun 10 19:59:16 2017 +0200
4
5
    Bug 1371927: Build KeyedStackCapture only if profiler enabled. r=gfritzsche
6
    
7
    MozReview-Commit-ID: 9IoVY2K5hXc
8
---
9
 toolkit/components/telemetry/HangReports.cpp        | 6 +++---
10
 toolkit/components/telemetry/KeyedStackCapturer.cpp | 3 ---
11
 toolkit/components/telemetry/KeyedStackCapturer.h   | 4 ----
12
 toolkit/components/telemetry/Telemetry.cpp          | 5 ++++-
13
 toolkit/components/telemetry/moz.build              | 7 ++++++-
14
 5 files changed, 13 insertions(+), 12 deletions(-)
15
16
diff --git toolkit/components/telemetry/HangReports.cpp toolkit/components/telemetry/HangReports.cpp
17
index a093405fe7a9..da9e117b2524 100644
18
--- toolkit/components/telemetry/HangReports.cpp
19
+++ toolkit/components/telemetry/HangReports.cpp
20
@@ -11,9 +11,6 @@ namespace Telemetry {
21
 
22
 using namespace HangMonitor;
23
 
24
-/** The maximum number of stacks that we're keeping for hang reports. */
25
-const size_t kMaxHangStacksKept = 50;
26
-
27
 // This utility function generates a string key that is used to index the annotations
28
 // in a hash map from |HangReports::AddHang|.
29
 nsresult
30
@@ -36,6 +33,9 @@ ComputeAnnotationsKey(const HangAnnotationsPtr& aAnnotations, nsAString& aKeyOut
31
 }
32
 
33
 #if defined(MOZ_GECKO_PROFILER)
34
+/** The maximum number of stacks that we're keeping for hang reports. */
35
+const size_t kMaxHangStacksKept = 50;
36
+
37
 void
38
 HangReports::AddHang(const Telemetry::ProcessedStack& aStack,
39
                      uint32_t aDuration,
40
diff --git toolkit/components/telemetry/KeyedStackCapturer.cpp toolkit/components/telemetry/KeyedStackCapturer.cpp
41
index 25479485fcd9..6b6431a44978 100644
42
--- toolkit/components/telemetry/KeyedStackCapturer.cpp
43
+++ toolkit/components/telemetry/KeyedStackCapturer.cpp
44
@@ -12,8 +12,6 @@
45
 
46
 namespace {
47
 
48
-#if defined(MOZ_GECKO_PROFILER)
49
-
50
 /** Defines the size of the keyed stack dictionary. */
51
 const uint8_t kMaxKeyLength = 50;
52
 
53
@@ -161,7 +159,6 @@ KeyedStackCapturer::Clear()
54
   mStackInfos.Clear();
55
   mStacks.Clear();
56
 }
57
-#endif
58
 
59
 } // namespace Telemetry
60
 } // namespace mozilla
61
diff --git toolkit/components/telemetry/KeyedStackCapturer.h toolkit/components/telemetry/KeyedStackCapturer.h
62
index 77f17a613948..f554787b5934 100644
63
--- toolkit/components/telemetry/KeyedStackCapturer.h
64
+++ toolkit/components/telemetry/KeyedStackCapturer.h
65
@@ -6,8 +6,6 @@
66
 #ifndef KeyedStackCapturer_h__
67
 #define KeyedStackCapturer_h__
68
 
69
-#ifdef MOZ_GECKO_PROFILER
70
-
71
 #include "Telemetry.h"
72
 #include "nsString.h"
73
 #include "nsClassHashtable.h"
74
@@ -74,6 +72,4 @@ private:
75
 } // namespace Telemetry
76
 } // namespace mozilla
77
 
78
-#endif // MOZ_GECKO_PROFILER
79
-
80
 #endif // KeyedStackCapturer_h__
81
diff --git toolkit/components/telemetry/Telemetry.cpp toolkit/components/telemetry/Telemetry.cpp
82
index 4864f400a21a..a81975873d02 100644
83
--- toolkit/components/telemetry/Telemetry.cpp
84
+++ toolkit/components/telemetry/Telemetry.cpp
85
@@ -99,10 +99,13 @@ using Telemetry::Common::AutoHashtable;
86
 using mozilla::dom::Promise;
87
 using mozilla::dom::AutoJSAPI;
88
 using mozilla::Telemetry::HangReports;
89
-using mozilla::Telemetry::KeyedStackCapturer;
90
 using mozilla::Telemetry::CombinedStacks;
91
 using mozilla::Telemetry::ComputeAnnotationsKey;
92
 
93
+#if defined(MOZ_GECKO_PROFILER)
94
+using mozilla::Telemetry::KeyedStackCapturer;
95
+#endif
96
+
97
 /**
98
  * IOInterposeObserver recording statistics of main-thread I/O during execution,
99
  * aimed at consumption by TelemetryImpl
100
diff --git toolkit/components/telemetry/moz.build toolkit/components/telemetry/moz.build
101
index c8d5b177d205..30c8914c4055 100644
102
--- toolkit/components/telemetry/moz.build
103
+++ toolkit/components/telemetry/moz.build
104
@@ -57,7 +57,6 @@ SOURCES += [
105
     'HangReports.cpp',
106
     'ipc/TelemetryIPC.cpp',
107
     'ipc/TelemetryIPCAccumulator.cpp',
108
-    'KeyedStackCapturer.cpp',
109
     'Telemetry.cpp',
110
     'TelemetryCommon.cpp',
111
     'TelemetryEvent.cpp',
112
@@ -66,6 +65,12 @@ SOURCES += [
113
     'WebrtcTelemetry.cpp',
114
 ]
115
 
116
+# KeyedStackCapturer entirely relies on profiler to be enabled.
117
+if CONFIG['MOZ_GECKO_PROFILER']:
118
+    SOURCES += [
119
+      'KeyedStackCapturer.cpp'
120
+    ]
121
+
122
 EXTRA_COMPONENTS += [
123
     'TelemetryStartup.js',
124
     'TelemetryStartup.manifest'
(-)b/www/firefox/files/patch-bug702179 (-9 / +8 lines)
Lines 1-13 Link Here
1
--- js/src/moz.build.orig	2015-12-16 12:32:04.574425000 +0100
1
Don't build static JS lib to make sure DTrace probes are picked up.
2
+++ js/src/moz.build	2015-12-16 12:32:09.032032000 +0100
2
3
@@ -671,10 +671,6 @@ CFLAGS += CONFIG['MOZ_ICU_CFLAGS']
3
--- js/src/build/moz.build.orig	2017-04-16 18:00:50 UTC
4
 CXXFLAGS += CONFIG['MOZ_ICU_CFLAGS']
4
+++ js/src/build/moz.build
5
 LOCAL_INCLUDES += CONFIG['MOZ_ICU_INCLUDES']
5
@@ -71,7 +71,3 @@ if CONFIG['OS_ARCH'] == 'SunOS':
6
     ]
6
 
7
 
8
 OS_LIBS += CONFIG['REALTIME_LIBS']
9
-
7
-NO_EXPAND_LIBS = True
10
-NO_EXPAND_LIBS = True
8
-
11
-
9
-DIST_INSTALL = True
12
-DIST_INSTALL = True
10
-
11
 # Prepare self-hosted JS code for embedding
12
 GENERATED_FILES += ['selfhosted.out.h']
13
 selfhosted = GENERATED_FILES['selfhosted.out.h']
(-)b/www/firefox/files/patch-bug826985 (-12 lines)
Lines 51-68 index b483cd1..f1dd1f0 100644 Link Here
51
     # basic stuff for everything
51
     # basic stuff for everything
52
     'include_internal_video_render': 0,
52
     'include_internal_video_render': 0,
53
     'clang_use_chrome_plugins': 0,
53
     'clang_use_chrome_plugins': 0,
54
diff --git media/webrtc/signaling/test/common.build media/webrtc/signaling/test/common.build
55
index b483cd1..f1dd1f0 100644
56
--- media/webrtc/signaling/test/common.build
57
+++ media/webrtc/signaling/test/common.build
58
@@ -99,6 +99,7 @@ if CONFIG['JS_SHARED_LIBRARY']:
59
 
60
 USE_LIBS += ['mozglue']
61
 
62
+OS_LIBS += CONFIG['MOZ_LIBV4L2_LIBS']
63
 OS_LIBS += CONFIG['MOZ_WEBRTC_X11_LIBS']
64
 OS_LIBS += CONFIG['REALTIME_LIBS']
65
 
66
diff --git media/webrtc/trunk/webrtc/modules/video_capture/linux/device_info_linux.cc media/webrtc/trunk/webrtc/modules/video_capture/linux/device_info_linux.cc
54
diff --git media/webrtc/trunk/webrtc/modules/video_capture/linux/device_info_linux.cc media/webrtc/trunk/webrtc/modules/video_capture/linux/device_info_linux.cc
67
index 239a292..bab496c 100644
55
index 239a292..bab496c 100644
68
--- media/webrtc/trunk/webrtc/modules/video_capture/linux/device_info_linux.cc
56
--- media/webrtc/trunk/webrtc/modules/video_capture/linux/device_info_linux.cc
(-)b/www/firefox/files/patch-bug847568 (-1 / +1 lines)
Lines 261-267 index 9297e4d6f501..d8e273887e4b 100644 Link Here
261
+option('--with-system-harfbuzz',
261
+option('--with-system-harfbuzz',
262
+       help="Use system harfbuzz (located with pkgconfig)")
262
+       help="Use system harfbuzz (located with pkgconfig)")
263
+
263
+
264
+system_harfbuzz = pkg_check_modules('MOZ_HARFBUZZ', 'harfbuzz >= 1.4.3',
264
+system_harfbuzz = pkg_check_modules('MOZ_HARFBUZZ', 'harfbuzz >= 1.4.6',
265
+                                    when='--with-system-harfbuzz')
265
+                                    when='--with-system-harfbuzz')
266
+
266
+
267
+set_config('MOZ_SYSTEM_HARFBUZZ', depends_if(system_harfbuzz)(lambda _: True))
267
+set_config('MOZ_SYSTEM_HARFBUZZ', depends_if(system_harfbuzz)(lambda _: True))
(-)a/www/firefox/files/patch-bug981348 (-61 lines)
Removed Link Here
1
diff --git dom/system/OSFileConstants.cpp dom/system/OSFileConstants.cpp
2
index 88bba9baa401..99f240952dfe 100644
3
--- dom/system/OSFileConstants.cpp
4
+++ dom/system/OSFileConstants.cpp
5
@@ -16,14 +16,17 @@
6
 #include "dirent.h"
7
 #include "poll.h"
8
 #include "sys/stat.h"
9
-#if defined(ANDROID)
10
+#if defined(XP_LINUX)
11
 #include <sys/vfs.h>
12
 #define statvfs statfs
13
+#define f_frsize f_bsize
14
 #else
15
 #include "sys/statvfs.h"
16
+#endif // defined(XP_LINUX)
17
+#if !defined(ANDROID)
18
 #include "sys/wait.h"
19
 #include <spawn.h>
20
-#endif // defined(ANDROID)
21
+#endif // !defined(ANDROID)
22
 #endif // defined(XP_UNIX)
23
 
24
 #if defined(XP_LINUX)
25
@@ -699,7 +702,7 @@ static const dom::ConstantSpec gLibcProperties[] =
26
 
27
   { "OSFILE_SIZEOF_STATVFS", JS::Int32Value(sizeof (struct statvfs)) },
28
 
29
-  { "OSFILE_OFFSETOF_STATVFS_F_BSIZE", JS::Int32Value(offsetof (struct statvfs, f_bsize)) },
30
+  { "OSFILE_OFFSETOF_STATVFS_F_FRSIZE", JS::Int32Value(offsetof (struct statvfs, f_frsize)) },
31
   { "OSFILE_OFFSETOF_STATVFS_F_BAVAIL", JS::Int32Value(offsetof (struct statvfs, f_bavail)) },
32
 
33
 #endif // defined(XP_UNIX)
34
diff --git toolkit/components/osfile/modules/osfile_unix_back.jsm toolkit/components/osfile/modules/osfile_unix_back.jsm
35
index a028dda7d5ec..f5c632e3d7e5 100644
36
--- toolkit/components/osfile/modules/osfile_unix_back.jsm
37
+++ toolkit/components/osfile/modules/osfile_unix_back.jsm
38
@@ -228,8 +228,8 @@
39
          let statvfs = new SharedAll.HollowStructure("statvfs",
40
            Const.OSFILE_SIZEOF_STATVFS);
41
 
42
-         statvfs.add_field_at(Const.OSFILE_OFFSETOF_STATVFS_F_BSIZE,
43
-                        "f_bsize", Type.unsigned_long.implementation);
44
+         statvfs.add_field_at(Const.OSFILE_OFFSETOF_STATVFS_F_FRSIZE,
45
+                        "f_frsize", Type.unsigned_long.implementation);
46
          statvfs.add_field_at(Const.OSFILE_OFFSETOF_STATVFS_F_BAVAIL,
47
                         "f_bavail", Type.fsblkcnt_t.implementation);
48
 
49
diff --git toolkit/components/osfile/modules/osfile_unix_front.jsm toolkit/components/osfile/modules/osfile_unix_front.jsm
50
index bd60d4d8419c..a8cd6b546b0e 100644
51
--- toolkit/components/osfile/modules/osfile_unix_front.jsm
52
+++ toolkit/components/osfile/modules/osfile_unix_front.jsm
53
@@ -399,7 +399,7 @@
54
        throw_on_negative("statvfs",  (UnixFile.statvfs || UnixFile.statfs)(sourcePath, fileSystemInfoPtr));
55
 
56
        let bytes = new Type.uint64_t.implementation(
57
-                        fileSystemInfo.f_bsize * fileSystemInfo.f_bavail);
58
+                        fileSystemInfo.f_frsize * fileSystemInfo.f_bavail);
59
 
60
        return bytes.value;
61
      };
(-)a/www/firefox/files/patch-python_futures_concurrent_futures_process.py (-15 lines)
Removed Link Here
1
--- python/futures/concurrent/futures/process.py.orig	2017-04-11 04:15:19 UTC
2
+++ python/futures/concurrent/futures/process.py
3
@@ -247,7 +247,11 @@ def _check_system_limits():
4
     _system_limits_checked = True
5
     try:
6
         import os
7
-        nsems_max = os.sysconf("SC_SEM_NSEMS_MAX")
8
+        if sys.platform.startswith('freebsd'):
9
+            # sem(4) confuses sysconf(3) on FreeBSD < 11.1
10
+            nsems_max = -1
11
+        else:
12
+            nsems_max = os.sysconf("SC_SEM_NSEMS_MAX")
13
     except (AttributeError, ValueError):
14
         # sysconf not available or setting not available
15
         return
(-)b/www/firefox/files/patch-rust-option (-49 / +520 lines)
Lines 1-4 Link Here
1
Revert bug 1284816 and bug 1341967 to postpone bustage on non-x86 archs.
1
Revert bug 1284816, bug 1341967, bug 1336153 to postpone bustage on non-x86 archs.
2
2
3
diff --git browser/confvars.sh browser/confvars.sh
3
diff --git browser/confvars.sh browser/confvars.sh
4
index d8dcd99c2757..740d9d3e5fcf 100755
4
index d8dcd99c2757..740d9d3e5fcf 100755
Lines 56-66 index 267d989f1597..f709820e60ae 100644 Link Here
56
     if not rustc_info:
56
     if not rustc_info:
57
         die(dedent('''\
57
         die(dedent('''\
58
         Rust compiler not found.
58
         Rust compiler not found.
59
@@ -97,6 +110,9 @@ def rust_compiler(rustc_info, cargo_info):
60
 
61
     return True
62
 
63
+set_define('MOZ_RUST', rust_compiler)
64
+set_config('MOZ_RUST', rust_compiler)
65
+
66
 @template
67
 def rust_triple_alias(host_or_target):
68
     """Template defining the alias used for rustc's --target flag.
69
@@ -227,7 +243,8 @@ set_config('RUST_HOST_TARGET', rust_host_triple)
70
 
71
 @depends(rust_target_triple)
72
 def rust_target_env_name(triple):
73
-    return triple.upper().replace('-','_')
74
+    if triple:
75
+        return triple.upper().replace('-','_')
76
 
77
 # We need this to form various Cargo environment variables, as there is no
78
 # uppercase function in make, and we don't want to shell out just for
79
@@ -235,5 +252,6 @@ def rust_target_env_name(triple):
80
 set_config('RUST_TARGET_ENV_NAME', rust_target_env_name)
81
 
82
 # Until we remove all the other Rust checks in old-configure.
83
+add_old_configure_assignment('MOZ_RUST', rust_compiler)
84
 add_old_configure_assignment('RUSTC', rustc)
85
 add_old_configure_assignment('RUST_TARGET', rust_target_triple)
86
diff --git config/rules.mk config/rules.mk
87
index 94cc5556e3d0..7b143ebc5146 100644
88
--- config/rules.mk
89
+++ config/rules.mk
90
@@ -900,6 +900,7 @@ endif
91
 
92
 $(foreach file,$(DUMP_SYMS_TARGETS),$(eval $(call syms_template,$(file),$(file)_syms.track)))
93
 
94
+ifdef MOZ_RUST
95
 cargo_host_flag := --target=$(RUST_HOST_TARGET)
96
 cargo_target_flag := --target=$(RUST_TARGET)
97
 
98
@@ -1055,6 +1056,7 @@ force-cargo-host-program-build:
99
 
100
 $(HOST_RUST_PROGRAMS): force-cargo-host-program-build
101
 endif # HOST_RUST_PROGRAMS
102
+endif # MOZ_RUST
103
 
104
 $(SOBJS):
105
 	$(REPORT_BUILD)
59
diff --git dom/media/MediaPrefs.h dom/media/MediaPrefs.h
106
diff --git dom/media/MediaPrefs.h dom/media/MediaPrefs.h
60
index 4dcc659222a4..559334d89fd1 100644
107
index 4dcc659222a4..559334d89fd1 100644
61
--- dom/media/MediaPrefs.h
108
--- dom/media/MediaPrefs.h
62
+++ dom/media/MediaPrefs.h
109
+++ dom/media/MediaPrefs.h
63
@@ -165,7 +165,7 @@ private:
110
@@ -183,7 +183,7 @@ private:
64
   DECL_MEDIA_PREF("media.ogg.flac.enabled",                   FlacInOgg, bool, false);
111
   DECL_MEDIA_PREF("media.ogg.flac.enabled",                   FlacInOgg, bool, false);
65
   DECL_MEDIA_PREF("media.flac.enabled",                       FlacEnabled, bool, true);
112
   DECL_MEDIA_PREF("media.flac.enabled",                       FlacEnabled, bool, true);
66
 
113
 
Lines 69-74 index 4dcc659222a4..559334d89fd1 100644 Link Here
69
   DECL_MEDIA_PREF("media.rust.test_mode",                     RustTestMode, bool, false);
116
   DECL_MEDIA_PREF("media.rust.test_mode",                     RustTestMode, bool, false);
70
 #endif
117
 #endif
71
 
118
 
119
diff --git dom/media/gtest/moz.build dom/media/gtest/moz.build
120
index c66ac4a9437f..e2203c0a4321 100644
121
--- dom/media/gtest/moz.build
122
+++ dom/media/gtest/moz.build
123
@@ -22,7 +22,6 @@ UNIFIED_SOURCES += [
124
     'TestMozPromise.cpp',
125
     'TestMP3Demuxer.cpp',
126
     'TestMP4Demuxer.cpp',
127
-    'TestRust.cpp',
128
     'TestTrackEncoder.cpp',
129
     'TestVideoSegment.cpp',
130
     'TestVideoUtils.cpp',
131
@@ -36,6 +35,9 @@ if CONFIG['MOZ_WEBM_ENCODER']:
132
         'TestWebMWriter.cpp',
133
     ]
134
 
135
+if CONFIG['MOZ_RUST']:
136
+    UNIFIED_SOURCES += ['TestRust.cpp',]
137
+
138
 TEST_HARNESS_FILES.gtest += [
139
     '../test/gizmo-frag.mp4',
140
     '../test/gizmo.mp4',
141
diff --git media/libcubeb/src/moz.build media/libcubeb/src/moz.build
142
index c65b53b80f63..8953f646e831 100644
143
--- media/libcubeb/src/moz.build
144
+++ media/libcubeb/src/moz.build
145
@@ -32,7 +32,8 @@ if CONFIG['MOZ_PULSEAUDIO']:
146
         'cubeb_pulse.c',
147
     ]
148
     DEFINES['USE_PULSE'] = True
149
-    DEFINES['USE_PULSE_RUST'] = True
150
+    if CONFIG['MOZ_RUST']:
151
+        DEFINES['USE_PULSE_RUST'] = True
152
 
153
 if CONFIG['MOZ_JACK']:
154
     SOURCES += [
72
diff --git media/libstagefright/binding/DecoderData.cpp media/libstagefright/binding/DecoderData.cpp
155
diff --git media/libstagefright/binding/DecoderData.cpp media/libstagefright/binding/DecoderData.cpp
73
index 109ea329d154..a06e533b1e62 100644
156
index 109ea329d154..a06e533b1e62 100644
74
--- media/libstagefright/binding/DecoderData.cpp
157
--- media/libstagefright/binding/DecoderData.cpp
Lines 84-99 index 109ea329d154..a06e533b1e62 100644 Link Here
84
+#endif // MOZ_RUST_MP4PARSE
167
+#endif // MOZ_RUST_MP4PARSE
85
 
168
 
86
 using namespace stagefright;
169
 using namespace stagefright;
87
 
170
 using mozilla::media::TimeUnit;
88
@@ -187,6 +189,7 @@ MP4VideoInfo::Update(const MetaData* aMetaData, const char* aMimeType)
171
@@ -177,6 +179,7 @@ MP4VideoInfo::Update(const MetaData* aMetaData, const char* aMimeType)
89
 
172
   FindData(aMetaData, kKeyAVCC, mExtraData);
90
 }
173
 }
91
 
174
 
92
+#ifdef MOZ_RUST_MP4PARSE
175
+#ifdef MOZ_RUST_MP4PARSE
93
 static void
176
 static void
94
 UpdateTrackProtectedInfo(mozilla::TrackInfo& aConfig,
177
 UpdateTrackProtectedInfo(mozilla::TrackInfo& aConfig,
95
                          const mp4parse_sinf_info& aSinf)
178
                          const mp4parse_sinf_info& aSinf)
96
@@ -266,6 +269,7 @@ MP4VideoInfo::Update(const mp4parse_track_info* track,
179
@@ -263,6 +266,7 @@ MP4VideoInfo::Update(const mp4parse_track_info* track,
97
     mExtraData->AppendElements(video->extra_data.data, video->extra_data.length);
180
     mExtraData->AppendElements(video->extra_data.data, video->extra_data.length);
98
   }
181
   }
99
 }
182
 }
Lines 105-111 diff --git media/libstagefright/binding/MP4Metadata.cpp media/libstagefright/bin Link Here
105
index 5c3810d99a38..5d14dfd8b8a9 100644
188
index 5c3810d99a38..5d14dfd8b8a9 100644
106
--- media/libstagefright/binding/MP4Metadata.cpp
189
--- media/libstagefright/binding/MP4Metadata.cpp
107
+++ media/libstagefright/binding/MP4Metadata.cpp
190
+++ media/libstagefright/binding/MP4Metadata.cpp
108
@@ -19,14 +19,18 @@
191
@@ -20,14 +20,18 @@
109
 #include "mp4_demuxer/MP4Metadata.h"
192
 #include "mp4_demuxer/MP4Metadata.h"
110
 #include "mp4_demuxer/Stream.h"
193
 #include "mp4_demuxer/Stream.h"
111
 #include "MediaPrefs.h"
194
 #include "MediaPrefs.h"
Lines 123-130 index 5c3810d99a38..5d14dfd8b8a9 100644 Link Here
123
+#endif // MOZ_RUST_MP4PARSE
206
+#endif // MOZ_RUST_MP4PARSE
124
 
207
 
125
 using namespace stagefright;
208
 using namespace stagefright;
126
 
209
 using mozilla::media::TimeUnit;
127
@@ -101,6 +103,7 @@ private:
210
@@ -105,6 +109,7 @@ private:
128
   bool mCanSeek;
211
   bool mCanSeek;
129
 };
212
 };
130
 
213
 
Lines 132-150 index 5c3810d99a38..5d14dfd8b8a9 100644 Link Here
132
 // Wrap an mp4_demuxer::Stream to remember the read offset.
215
 // Wrap an mp4_demuxer::Stream to remember the read offset.
133
 
216
 
134
 class RustStreamAdaptor {
217
 class RustStreamAdaptor {
135
@@ -145,9 +149,11 @@ private:
218
@@ -151,6 +156,7 @@ private:
136
   RustStreamAdaptor mRustSource;
219
   RustStreamAdaptor mRustSource;
137
   mozilla::UniquePtr<mp4parse_parser, FreeMP4Parser> mRustParser;
220
   mozilla::UniquePtr<mp4parse_parser, FreeMP4Parser> mRustParser;
138
 };
221
 };
139
+#endif // MOZ_RUST_MP4PARSE
222
+#endif // MOZ_RUST_MP4PARSE
140
 
223
 
224
 class IndiceWrapperStagefright : public IndiceWrapper {
225
 public:
226
@@ -187,6 +193,7 @@ IndiceWrapperStagefright::GetIndice(size_t aIndex, Index::Indice& aIndice) const
227
   return true;
228
 }
229
 
230
+#ifdef MOZ_RUST_MP4PARSE
231
 // the owner of mIndice is rust mp4 paser, so lifetime of this class
232
 // SHOULD NOT longer than rust parser.
233
 class IndiceWrapperRust : public IndiceWrapper
234
@@ -232,9 +239,11 @@ IndiceWrapperRust::GetIndice(size_t aIndex, Index::Indice& aIndice) const
235
   aIndice.sync = indice->sync;
236
   return true;
237
 }
238
+#endif // MOZ_RUST_MP4PARSE
239
 
141
 MP4Metadata::MP4Metadata(Stream* aSource)
240
 MP4Metadata::MP4Metadata(Stream* aSource)
142
  : mStagefright(MakeUnique<MP4MetadataStagefright>(aSource))
241
  : mStagefright(MakeUnique<MP4MetadataStagefright>(aSource))
143
+#ifdef MOZ_RUST_MP4PARSE
242
+#ifdef MOZ_RUST_MP4PARSE
144
  , mRust(MakeUnique<MP4MetadataRust>(aSource))
243
  , mRust(MakeUnique<MP4MetadataRust>(aSource))
145
  , mPreferRust(false)
244
  , mPreferRust(MediaPrefs::EnableRustMP4Parser())
146
  , mReportedAudioTrackTelemetry(false)
245
  , mReportedAudioTrackTelemetry(false)
147
@@ -155,6 +161,7 @@ MP4Metadata::MP4Metadata(Stream* aSource)
246
@@ -242,6 +251,7 @@ MP4Metadata::MP4Metadata(Stream* aSource)
148
 #ifndef RELEASE_OR_BETA
247
 #ifndef RELEASE_OR_BETA
149
  , mRustTestMode(MediaPrefs::RustTestMode())
248
  , mRustTestMode(MediaPrefs::RustTestMode())
150
 #endif
249
 #endif
Lines 152-195 index 5c3810d99a38..5d14dfd8b8a9 100644 Link Here
152
 {
251
 {
153
 }
252
 }
154
 
253
 
155
@@ -186,6 +193,7 @@ MP4Metadata::GetNumberTracks(mozilla::TrackInfo::TrackType aType) const
254
@@ -274,8 +284,11 @@ MP4Metadata::GetNumberTracks(mozilla::TrackInfo::TrackType aType) const
156
 {
255
   MP4Metadata::ResultAndTrackCount numTracks =
157
   uint32_t numTracks = mStagefright->GetNumberTracks(aType);
256
     mStagefright->GetNumberTracks(aType);
158
 
257
 
159
+#ifdef MOZ_RUST_MP4PARSE
258
+#ifdef MOZ_RUST_MP4PARSE
160
   if (!mRust) {
259
   if (!mRust) {
260
+#endif // MOZ_RUST_MP4PARSE
161
     return numTracks;
261
     return numTracks;
262
+#ifdef MOZ_RUST_MP4PARSE
162
   }
263
   }
163
@@ -211,10 +219,12 @@ MP4Metadata::GetNumberTracks(mozilla::TrackInfo::TrackType aType) const
164
     mPreferRust = true;
165
     return numTracksRust;
166
   }
167
+#endif // MOZ_RUST_MP4PARSE
168
 
264
 
169
   return numTracks;
265
   MP4Metadata::ResultAndTrackCount numTracksRust =
266
@@ -350,8 +363,10 @@ MP4Metadata::GetNumberTracks(mozilla::TrackInfo::TrackType aType) const
267
   // Same non-error numbers, just return any.
268
   // (Choosing Rust here, in case it carries a warning, we'd want to know that.)
269
   return numTracksRust;
270
+#endif // MOZ_RUST_MP4PARSE
170
 }
271
 }
171
 
272
 
172
+#ifdef MOZ_RUST_MP4PARSE
273
+#ifdef MOZ_RUST_MP4PARSE
173
 bool MP4Metadata::ShouldPreferRust() const {
274
 bool MP4Metadata::ShouldPreferRust() const {
174
   if (!mRust) {
275
   if (!mRust) {
175
     return false;
276
     return false;
176
@@ -245,6 +255,7 @@ bool MP4Metadata::ShouldPreferRust() const {
277
@@ -389,6 +404,7 @@ bool MP4Metadata::ShouldPreferRust() const {
177
   // Otherwise, fall back.
278
   // Otherwise, fall back.
178
   return false;
279
   return false;
179
 }
280
 }
180
+#endif // MOZ_RUST_MP4PARSE
281
+#endif // MOZ_RUST_MP4PARSE
181
 
282
 
182
 mozilla::UniquePtr<mozilla::TrackInfo>
283
 static const char*
183
 MP4Metadata::GetTrackInfo(mozilla::TrackInfo::TrackType aType,
284
 GetDifferentField(const mozilla::TrackInfo& info,
184
@@ -253,6 +264,7 @@ MP4Metadata::GetTrackInfo(mozilla::TrackInfo::TrackType aType,
285
@@ -443,6 +459,7 @@ MP4Metadata::GetTrackInfo(mozilla::TrackInfo::TrackType aType,
185
   mozilla::UniquePtr<mozilla::TrackInfo> info =
286
   MP4Metadata::ResultAndTrackInfo info =
186
       mStagefright->GetTrackInfo(aType, aTrackNumber);
287
     mStagefright->GetTrackInfo(aType, aTrackNumber);
187
 
288
 
188
+#ifdef MOZ_RUST_MP4PARSE
289
+#ifdef MOZ_RUST_MP4PARSE
189
   if (!mRust) {
290
   if (!mRust) {
190
     return info;
291
     return info;
191
   }
292
   }
192
@@ -305,6 +317,7 @@ MP4Metadata::GetTrackInfo(mozilla::TrackInfo::TrackTyp
293
@@ -514,6 +531,7 @@ MP4Metadata::GetTrackInfo(mozilla::TrackInfo::TrackType aType,
193
   if (mPreferRust) {
294
   if (mPreferRust) {
194
     return infoRust;
295
     return infoRust;
195
   }
296
   }
Lines 197-211 index 5c3810d99a38..5d14dfd8b8a9 100644 Link Here
197
 
298
 
198
   return info;
299
   return info;
199
 }
300
 }
200
@@ -319,6 +334,7 @@ const CryptoFile&
301
@@ -528,6 +546,7 @@ MP4Metadata::ResultAndCryptoFile
201
 MP4Metadata::Crypto() const
302
 MP4Metadata::Crypto() const
202
 {
303
 {
203
   const CryptoFile& crypto = mStagefright->Crypto();
304
   MP4Metadata::ResultAndCryptoFile crypto = mStagefright->Crypto();
204
+#ifdef MOZ_RUST_MP4PARSE
305
+#ifdef MOZ_RUST_MP4PARSE
205
   const CryptoFile& rustCrypto = mRust->Crypto();
306
   MP4Metadata::ResultAndCryptoFile rustCrypto = mRust->Crypto();
206
 
307
 
207
 #ifndef RELEASE_OR_BETA
308
 #ifndef RELEASE_OR_BETA
208
@@ -330,6 +347,7 @@ MP4Metadata::Crypto() const
309
@@ -548,6 +567,7 @@ MP4Metadata::Crypto() const
209
   if (mPreferRust) {
310
   if (mPreferRust) {
210
     return rustCrypto;
311
     return rustCrypto;
211
   }
312
   }
Lines 213-229 index 5c3810d99a38..5d14dfd8b8a9 100644 Link Here
213
 
314
 
214
   return crypto;
315
   return crypto;
215
 }
316
 }
216
@@ -594,6 +612,7 @@ MP4MetadataStagefright::Metadata(Stream* aSource)
317
@@ -556,17 +576,22 @@ MP4Metadata::ResultAndIndice
217
   return parser->Metadata();
318
 MP4Metadata::GetTrackIndice(mozilla::TrackID aTrackID)
319
 {
320
   FallibleTArray<Index::Indice> indiceSF;
321
+#ifdef MOZ_RUST_MP4PARSE
322
   if (!mPreferRust
323
 #ifndef RELEASE_OR_BETA
324
       || mRustTestMode
325
 #endif
326
      ) {
327
+#endif // MOZ_RUST_MP4PARSE
328
     MediaResult rv = mStagefright->ReadTrackIndex(indiceSF, aTrackID);
329
     if (NS_FAILED(rv)) {
330
       return {Move(rv), nullptr};
331
     }
332
+#ifdef MOZ_RUST_MP4PARSE
333
   }
334
+#endif // MOZ_RUST_MP4PARSE
335
 
336
+#ifdef MOZ_RUST_MP4PARSE
337
   mp4parse_byte_data indiceRust = {};
338
   if (mPreferRust
339
 #ifndef RELEASE_OR_BETA
340
@@ -592,13 +617,18 @@ MP4Metadata::GetTrackIndice(mozilla::TrackID aTrackID)
341
     }
342
   }
343
 #endif
344
+#endif // MOZ_RUST_MP4PARSE
345
 
346
   UniquePtr<IndiceWrapper> indice;
347
+#ifdef MOZ_RUST_MP4PARSE
348
   if (mPreferRust) {
349
     indice = mozilla::MakeUnique<IndiceWrapperRust>(indiceRust);
350
   } else {
351
+#endif // MOZ_RUST_MP4PARSE
352
     indice = mozilla::MakeUnique<IndiceWrapperStagefright>(indiceSF);
353
+#ifdef MOZ_RUST_MP4PARSE
354
   }
355
+#endif // MOZ_RUST_MP4PARSE
356
 
357
   return {NS_OK, Move(indice)};
358
 }
359
@@ -856,6 +886,7 @@ MP4MetadataStagefright::Metadata(Stream* aSource)
360
   return {NS_OK, Move(buffer)};
218
 }
361
 }
219
 
362
 
220
+#ifdef MOZ_RUST_MP4PARSE
363
+#ifdef MOZ_RUST_MP4PARSE
221
 bool
364
 bool
222
 RustStreamAdaptor::Read(uint8_t* buffer, uintptr_t size, size_t* bytes_read)
365
 RustStreamAdaptor::Read(uint8_t* buffer, uintptr_t size, size_t* bytes_read)
223
 {
366
 {
224
@@ -859,5 +878,6 @@ MP4MetadataRust::Metadata(Stream* aSource)
367
@@ -1152,5 +1183,6 @@ MP4MetadataRust::Metadata(Stream* aSource)
225
   MOZ_ASSERT(false, "Not yet implemented");
368
   MOZ_ASSERT(false, "Not yet implemented");
226
   return nullptr;
369
   return {NS_ERROR_NOT_IMPLEMENTED, nullptr};
227
 }
370
 }
228
+#endif // MOZ_RUST_MP4PARSE
371
+#endif // MOZ_RUST_MP4PARSE
229
 
372
 
Lines 272-278 diff --git media/libstagefright/binding/include/mp4_demuxer/MP4Metadata.h media/ Link Here
272
index 492c9c1c1bc3..e16dbbd1155e 100644
415
index 492c9c1c1bc3..e16dbbd1155e 100644
273
--- media/libstagefright/binding/include/mp4_demuxer/MP4Metadata.h
416
--- media/libstagefright/binding/include/mp4_demuxer/MP4Metadata.h
274
+++ media/libstagefright/binding/include/mp4_demuxer/MP4Metadata.h
417
+++ media/libstagefright/binding/include/mp4_demuxer/MP4Metadata.h
275
@@ -36,6 +36,7 @@ public:
418
@@ -13,7 +13,9 @@
419
 #include "MediaInfo.h"
420
 #include "MediaResult.h"
421
 #include "Stream.h"
422
+#ifdef MOZ_RUST_MP4PARSE
423
 #include "mp4parse.h"
424
+#endif // MOZ_RUST_MP4PARSE
425
 
426
 namespace mp4_demuxer {
427
 
428
@@ -82,6 +84,7 @@ public:
276
 
429
 
277
 private:
430
 private:
278
   UniquePtr<MP4MetadataStagefright> mStagefright;
431
   UniquePtr<MP4MetadataStagefright> mStagefright;
Lines 280-286 index 492c9c1c1bc3..e16dbbd1155e 100644 Link Here
280
   UniquePtr<MP4MetadataRust> mRust;
433
   UniquePtr<MP4MetadataRust> mRust;
281
   mutable bool mPreferRust;
434
   mutable bool mPreferRust;
282
   mutable bool mReportedAudioTrackTelemetry;
435
   mutable bool mReportedAudioTrackTelemetry;
283
@@ -44,6 +45,7 @@ private:
436
@@ -90,6 +93,7 @@ private:
284
   mutable bool mRustTestMode;
437
   mutable bool mRustTestMode;
285
 #endif
438
 #endif
286
   bool ShouldPreferRust() const;
439
   bool ShouldPreferRust() const;
Lines 288-293 index 492c9c1c1bc3..e16dbbd1155e 100644 Link Here
288
 };
441
 };
289
 
442
 
290
 } // namespace mp4_demuxer
443
 } // namespace mp4_demuxer
444
diff --git media/libstagefright/gtest/moz.build media/libstagefright/gtest/moz.build
445
index be4d56fc93f7..66fdd365f8f3 100644
446
--- media/libstagefright/gtest/moz.build
447
+++ media/libstagefright/gtest/moz.build
448
@@ -38,12 +38,13 @@ TEST_HARNESS_FILES.gtest += [
449
     'test_case_1351094.mp4',
450
 ]
451
 
452
-UNIFIED_SOURCES += ['TestMP4Rust.cpp',]
453
-TEST_HARNESS_FILES.gtest += [
454
-    '../../../dom/media/test/street.mp4',
455
-]
456
-LOCAL_INCLUDES += [
457
-    '../binding/include',
458
-]
459
+if CONFIG['MOZ_RUST']:
460
+    UNIFIED_SOURCES += ['TestMP4Rust.cpp',]
461
+    TEST_HARNESS_FILES.gtest += [
462
+        '../../../dom/media/test/street.mp4',
463
+    ]
464
+    LOCAL_INCLUDES += [
465
+        '../binding/include',
466
+    ]
467
 
468
 FINAL_LIBRARY = 'xul-gtest'
469
diff --git media/libstagefright/moz.build media/libstagefright/moz.build
470
index af5d1194d621..6725a0179989 100644
471
--- media/libstagefright/moz.build
472
+++ media/libstagefright/moz.build
473
@@ -83,9 +83,10 @@ SOURCES += [
474
     'system/core/libutils/VectorImpl.cpp',
475
 ]
476
 
477
-EXPORTS += [
478
-    'binding/include/mp4parse.h',
479
-]
480
+if CONFIG['MOZ_RUST']:
481
+    EXPORTS += [
482
+        'binding/include/mp4parse.h',
483
+    ]
484
 
485
 UNIFIED_SOURCES += [
486
     'binding/Adts.cpp',
291
diff --git mobile/android/confvars.sh mobile/android/confvars.sh
487
diff --git mobile/android/confvars.sh mobile/android/confvars.sh
292
index e79b6f5c0707..eb62763acaf7 100644
488
index e79b6f5c0707..eb62763acaf7 100644
293
--- mobile/android/confvars.sh
489
--- mobile/android/confvars.sh
Lines 301-321 index e79b6f5c0707..eb62763acaf7 100644 Link Here
301
 # use custom widget for html:select
497
 # use custom widget for html:select
302
 MOZ_USE_NATIVE_POPUP_WINDOWS=1
498
 MOZ_USE_NATIVE_POPUP_WINDOWS=1
303
 
499
 
500
diff --git netwerk/base/moz.build netwerk/base/moz.build
501
index 61d022a9660e..e5ca1d77d859 100644
502
--- netwerk/base/moz.build
503
+++ netwerk/base/moz.build
504
@@ -256,7 +256,7 @@ UNIFIED_SOURCES += [
505
     'TLSServerSocket.cpp',
506
 ]
507
 
508
-if CONFIG['MOZ_RUST_URLPARSE']:
509
+if CONFIG['MOZ_RUST'] and CONFIG['MOZ_RUST_URLPARSE']:
510
     EXPORTS.mozilla.net += [ 'RustURL.h' ]
511
     UNIFIED_SOURCES += [ 'RustURL.cpp' ]
512
 
513
diff --git netwerk/base/nsStandardURL.cpp netwerk/base/nsStandardURL.cpp
514
index 608b918a4ecf..20bcdeb34ab8 100644
515
--- netwerk/base/nsStandardURL.cpp
516
+++ netwerk/base/nsStandardURL.cpp
517
@@ -858,6 +858,7 @@ nsStandardURL::BuildNormalizedSpec(const char *spec)
518
         if (!SegmentIs(spec, mScheme, "resource") &&
519
             !SegmentIs(spec, mScheme, "chrome")) {
520
             nsAutoCString ipString;
521
+#ifdef MOZ_RUST
522
             if (encHost.Length() > 0 &&
523
                 encHost.First() == '[' && encHost.Last() == ']' &&
524
                 ValidIPv6orHostname(encHost.get(), encHost.Length())) {
525
@@ -866,7 +867,9 @@ nsStandardURL::BuildNormalizedSpec(const char *spec)
526
                     return rv;
527
                 }
528
                 encHost = ipString;
529
-            } else if (NS_SUCCEEDED(NormalizeIPv4(encHost, ipString))) {
530
+            } else
531
+#endif
532
+            if (NS_SUCCEEDED(NormalizeIPv4(encHost, ipString))) {
533
                 encHost = ipString;
534
             }
535
         }
536
@@ -2112,6 +2115,7 @@ nsStandardURL::SetHost(const nsACString &input)
537
 
538
     if (!SegmentIs(mScheme, "resource") && !SegmentIs(mScheme, "chrome")) {
539
         nsAutoCString ipString;
540
+#ifdef MOZ_RUST
541
         if (hostBuf.Length() > 0 &&
542
             hostBuf.First() == '[' && hostBuf.Last() == ']' &&
543
             ValidIPv6orHostname(hostBuf.get(), hostBuf.Length())) {
544
@@ -2120,7 +2124,9 @@ nsStandardURL::SetHost(const nsACString &input)
545
                 return rv;
546
             }
547
             hostBuf = ipString;
548
-        } else if (NS_SUCCEEDED(NormalizeIPv4(hostBuf, ipString))) {
549
+        } else
550
+#endif
551
+        if (NS_SUCCEEDED(NormalizeIPv4(hostBuf, ipString))) {
552
           hostBuf = ipString;
553
         }
554
     }
555
diff --git old-configure.in old-configure.in
556
index 717a94fcc692..54b29d737cc1 100644
557
--- old-configure.in
558
+++ old-configure.in
559
@@ -2330,9 +2330,14 @@ if test -n "$MOZ_MULET"; then
560
 fi
561
 
562
 # Propagate feature switches for code written in rust from confvars.sh
563
-if test -n "$MOZ_RUST_URLPARSE"; then
564
-    AC_DEFINE(MOZ_RUST_URLPARSE)
565
-    AC_SUBST(MOZ_RUST_URLPARSE)
566
+if test -n "$MOZ_RUST"; then
567
+    if test -n "$MOZ_RUST_MP4PARSE"; then
568
+        AC_DEFINE(MOZ_RUST_MP4PARSE)
569
+    fi
570
+    if test -n "$MOZ_RUST_URLPARSE"; then
571
+        AC_DEFINE(MOZ_RUST_URLPARSE)
572
+        AC_SUBST(MOZ_RUST_URLPARSE)
573
+    fi
574
 fi
575
 
576
 AC_SUBST(MOZ_PHOENIX)
304
diff --git toolkit/components/telemetry/Histograms.json toolkit/components/telemetry/Histograms.json
577
diff --git toolkit/components/telemetry/Histograms.json toolkit/components/telemetry/Histograms.json
305
index 061c55f6a5b6..e49dfd176952 100644
578
index 061c55f6a5b6..e49dfd176952 100644
306
--- toolkit/components/telemetry/Histograms.json
579
--- toolkit/components/telemetry/Histograms.json
307
+++ toolkit/components/telemetry/Histograms.json
580
+++ toolkit/components/telemetry/Histograms.json
308
@@ -6996,7 +6996,8 @@
581
@@ -8320,7 +8320,8 @@
309
     "expires_in_version": "55",
582
     "expires_in_version": "60",
310
     "kind": "boolean",
583
     "kind": "boolean",
311
     "bug_numbers": [1220885],
584
     "bug_numbers": [1220885],
312
-    "description": "(Bug 1220885) Whether the rust mp4 demuxer successfully parsed a stream segment."
585
-    "description": "Whether the rust mp4 demuxer successfully parsed a stream segment."
313
+    "description": "(Bug 1220885) Whether the rust mp4 demuxer successfully parsed a stream segment.",
586
+    "description": "Whether the rust mp4 demuxer successfully parsed a stream segment.",
314
+    "cpp_guard": "MOZ_RUST_MP4PARSE"
587
+    "cpp_guard": "MOZ_RUST_MP4PARSE"
315
   },
588
   },
316
   "MEDIA_RUST_MP4PARSE_ERROR_CODE": {
589
   "MEDIA_RUST_MP4PARSE_ERROR_CODE": {
317
     "alert_emails": ["giles@mozilla.com", "kinetik@flim.org"],
590
     "record_in_processes": ["main", "content"],
318
@@ -7004,21 +7005,24 @@
591
@@ -8329,7 +8330,8 @@
319
     "kind": "enumerated",
592
     "kind": "enumerated",
320
     "n_values": 32,
593
     "n_values": 32,
321
     "bug_numbers": [1238420],
594
     "bug_numbers": [1238420],
Lines 324-331 index 061c55f6a5b6..e49dfd176952 100644 Link Here
324
+    "cpp_guard": "MOZ_RUST_MP4PARSE"
597
+    "cpp_guard": "MOZ_RUST_MP4PARSE"
325
   },
598
   },
326
   "MEDIA_RUST_MP4PARSE_TRACK_MATCH_AUDIO": {
599
   "MEDIA_RUST_MP4PARSE_TRACK_MATCH_AUDIO": {
327
     "alert_emails": ["giles@mozilla.com", "kinetik@flim.org"],
600
     "record_in_processes": ["main", "content"],
328
     "expires_in_version": "55",
601
@@ -8337,7 +8339,8 @@
602
     "expires_in_version": "60",
329
     "kind": "boolean",
603
     "kind": "boolean",
330
     "bug_numbers": [1231169],
604
     "bug_numbers": [1231169],
331
-    "description": "Whether rust and stagefight mp4 parser audio track results match."
605
-    "description": "Whether rust and stagefight mp4 parser audio track results match."
Lines 333-340 index 061c55f6a5b6..e49dfd176952 100644 Link Here
333
+    "cpp_guard": "MOZ_RUST_MP4PARSE"
607
+    "cpp_guard": "MOZ_RUST_MP4PARSE"
334
   },
608
   },
335
   "MEDIA_RUST_MP4PARSE_TRACK_MATCH_VIDEO": {
609
   "MEDIA_RUST_MP4PARSE_TRACK_MATCH_VIDEO": {
336
     "alert_emails": ["giles@mozilla.com", "kinetik@flim.org"],
610
     "record_in_processes": ["main", "content"],
337
     "expires_in_version": "55",
611
@@ -8345,7 +8348,8 @@
612
     "expires_in_version": "60",
338
     "kind": "boolean",
613
     "kind": "boolean",
339
     "bug_numbers": [1231169],
614
     "bug_numbers": [1231169],
340
-    "description": "Whether rust and stagefight mp4 parser video track results match."
615
-    "description": "Whether rust and stagefight mp4 parser video track results match."
Lines 342-345 index 061c55f6a5b6..e49dfd176952 100644 Link Here
342
+    "cpp_guard": "MOZ_RUST_MP4PARSE"
617
+    "cpp_guard": "MOZ_RUST_MP4PARSE"
343
   },
618
   },
344
   "MEDIA_WMF_DECODE_ERROR": {
619
   "MEDIA_WMF_DECODE_ERROR": {
345
     "expires_in_version": "55",
620
     "record_in_processes": ["main", "content", "gpu"],
621
diff --git toolkit/library/gtest/moz.build toolkit/library/gtest/moz.build
622
index 69a8fb1f4893..c684f48e456e 100644
623
--- toolkit/library/gtest/moz.build
624
+++ toolkit/library/gtest/moz.build
625
@@ -7,7 +7,6 @@
626
 FINAL_TARGET = 'dist/bin/gtest'
627
 
628
 USE_LIBS += [
629
-    'gkrust-gtest',
630
     'static:xul',
631
     # xul-gtest is an intermediate static library. It is used as FINAL_TARGET
632
     # for gtest code.
633
@@ -21,6 +20,11 @@ USE_LIBS += [
634
 # before StaticXULComponentStart.
635
 Libxul('xul-gtest-real')
636
 
637
+if CONFIG['MOZ_RUST']:
638
+    USE_LIBS += [
639
+        'gkrust-gtest',
640
+    ]
641
+
642
 DIRS += [
643
     'static',
644
 ]
645
diff --git toolkit/library/moz.build toolkit/library/moz.build
646
index 650f6eaba980..191e90ceb09a 100644
647
--- toolkit/library/moz.build
648
+++ toolkit/library/moz.build
649
@@ -63,7 +63,7 @@ def Libxul(name):
650
 
651
     # This option should go away in bug 1290972, but we need to wait until
652
     # Rust 1.12 has been released.
653
-    if CONFIG['OS_ARCH'] == 'Darwin':
654
+    if CONFIG['MOZ_RUST'] and CONFIG['OS_ARCH'] == 'Darwin':
655
         LDFLAGS += ['-Wl,-no_compact_unwind']
656
 
657
 Libxul('xul')
658
@@ -343,4 +343,5 @@ USE_LIBS += ['StaticXULComponentsEnd']
659
 # The above library needs to be last for C++ purposes.  This library,
660
 # however, is entirely composed of Rust code, and needs to come after
661
 # all the C++ code so any possible C++ -> Rust calls can be resolved.
662
-USE_LIBS += ['gkrust']
663
+if CONFIG['MOZ_RUST']:
664
+    USE_LIBS += ['gkrust']
665
diff --git toolkit/moz.configure toolkit/moz.configure
666
index ac9d123224ce..e90da70f0fa5 100644
667
--- toolkit/moz.configure
668
+++ toolkit/moz.configure
669
@@ -88,8 +88,7 @@ include('../js/moz.configure')
670
 
671
 # Rust
672
 # ==============================================================
673
-include('../build/moz.configure/rust.configure',
674
-        when='--enable-compile-environment')
675
+include('../build/moz.configure/rust.configure')
676
 
677
 
678
 # L10N
679
@@ -623,13 +622,13 @@ id_and_secret_keyfile('Leanplum SDK')
680
 option('--enable-stylo', nargs='?', choices=('build',),
681
        help='Include Stylo in the build and/or enable it at runtime')
682
 
683
-@depends('--enable-stylo')
684
-def stylo_config(value):
685
+@depends('--enable-stylo', '--enable-rust')
686
+def stylo_config(value, rust_enabled):
687
     build_stylo = None
688
     enable_stylo = None
689
 
690
     # The default is to not build Stylo at all.
691
-    if value.origin == 'default':
692
+    if not rust_enabled or value.origin == 'default':
693
         pass
694
     elif value == 'build':
695
         build_stylo = True
696
@@ -769,12 +768,14 @@ set_config('SERVO_TARGET_DIR', servo_target_dir)
697
 option('--enable-webrender', nargs='?', choices=('build',),
698
        help='Include WebRender in the build and/or enable it at runtime')
699
 
700
-@depends('--enable-webrender', milestone)
701
-def webrender(value, milestone):
702
+@depends('--enable-webrender', '--enable-rust', milestone)
703
+def webrender(value, rust_enabled, milestone):
704
     build_webrender = None
705
     enable_webrender = None
706
 
707
-    if value.origin == 'default':
708
+    if not rust_enabled:
709
+        pass
710
+    elif value.origin == 'default':
711
         # if nothing is specified, default to just building on Nightly
712
         build_webrender = milestone.is_nightly
713
     elif value == 'build':
714
diff --git toolkit/toolkit.mozbuild toolkit/toolkit.mozbuild
715
index b845aab48023..9215afc6dd2d 100644
716
--- toolkit/toolkit.mozbuild
717
+++ toolkit/toolkit.mozbuild
718
@@ -133,16 +133,23 @@ if CONFIG['MOZ_PREF_EXTENSIONS']:
719
 
720
 DIRS += [
721
     '/devtools',
722
-    '/toolkit/library',
723
-    '/toolkit/library/gtest/rust',
724
-    '/toolkit/library/rust',
725
-    '/toolkit/library/StaticXULComponentsEnd',
726
     '/services',
727
     '/startupcache',
728
     '/js/ductwork/debugger',
729
     '/other-licenses/snappy',
730
 ]
731
 
732
+if CONFIG['MOZ_RUST']:
733
+    DIRS += [
734
+        '/toolkit/library/gtest/rust',
735
+        '/toolkit/library/rust',
736
+    ]
737
+
738
+DIRS += [
739
+    '/toolkit/library/StaticXULComponentsEnd',
740
+    '/toolkit/library',
741
+]
742
+
743
 if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']:
744
     DIRS += ['/toolkit/system/gnome']
745
 
746
diff --git toolkit/xre/nsAppRunner.cpp toolkit/xre/nsAppRunner.cpp
747
index 667c2eb1b365..6fb6cf102baa 100644
748
--- toolkit/xre/nsAppRunner.cpp
749
+++ toolkit/xre/nsAppRunner.cpp
750
@@ -227,11 +227,13 @@
751
 extern uint32_t gRestartMode;
752
 extern void InstallSignalHandlers(const char *ProgramName);
753
 
754
+#ifdef MOZ_RUST
755
 // This workaround is fixed in Rust 1.19. For details, see bug 1358151.
756
 // Implementation in toolkit/library/rust/shared/lib.rs
757
 extern "C" {
758
   void rust_init_please_remove_this_after_updating_rust_1_19();
759
 }
760
+#endif
761
 
762
 #define FILE_COMPATIBILITY_INFO NS_LITERAL_CSTRING("compatibility.ini")
763
 #define FILE_INVALIDATE_CACHES NS_LITERAL_CSTRING(".purgecaches")
764
@@ -3122,8 +3124,10 @@ XREMain::XRE_mainInit(bool* aExitFlag)
765
     return 1;
766
   *aExitFlag = false;
767
 
768
+#ifdef MOZ_RUST
769
   // This workaround is fixed in Rust 1.19. For details, see bug 1358151.
770
   rust_init_please_remove_this_after_updating_rust_1_19();
771
+#endif
772
 
773
   atexit(UnexpectedExit);
774
   auto expectedShutdown = mozilla::MakeScopeExit([&] {
775
diff --git xpcom/base/nsDebugImpl.cpp xpcom/base/nsDebugImpl.cpp
776
index e6bb623c258b..c49d61dce605 100644
777
--- xpcom/base/nsDebugImpl.cpp
778
+++ xpcom/base/nsDebugImpl.cpp
779
@@ -148,14 +148,20 @@ nsDebugImpl::Abort(const char* aFile, int32_t aLine)
780
   return NS_OK;
781
 }
782
 
783
+#ifdef MOZ_RUST
784
 // From toolkit/library/rust/lib.rs
785
 extern "C" void intentional_panic(const char* message);
786
+#endif
787
 
788
 NS_IMETHODIMP
789
 nsDebugImpl::RustPanic(const char* aMessage)
790
 {
791
+#ifdef MOZ_RUST
792
   intentional_panic(aMessage);
793
   return NS_OK;
794
+#else
795
+  return NS_ERROR_NOT_IMPLEMENTED;
796
+#endif
797
 }
798
 
799
 NS_IMETHODIMP
800
diff --git xpcom/rust/nsstring/gtest/moz.build xpcom/rust/nsstring/gtest/moz.build
801
index 197411678815..5bed9e57e57d 100644
802
--- xpcom/rust/nsstring/gtest/moz.build
803
+++ xpcom/rust/nsstring/gtest/moz.build
804
@@ -4,8 +4,9 @@
805
 # License, v. 2.0. If a copy of the MPL was not distributed with this
806
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
807
 
808
-UNIFIED_SOURCES += [
809
-    'Test.cpp'
810
-]
811
+if CONFIG['MOZ_RUST']:
812
+    UNIFIED_SOURCES += [
813
+        'Test.cpp'
814
+    ]
815
 
816
 FINAL_LIBRARY = 'xul-gtest'
(-)b/www/firefox/files/patch-third__party_python_futures_concurrent_futures_process.py (+15 lines)
Added Link Here
1
--- third_party/python/futures/concurrent/futures/process.py.orig	2017-04-11 04:15:19 UTC
2
+++ third_party/python/futures/concurrent/futures/process.py
3
@@ -247,7 +247,11 @@ def _check_system_limits():
4
     _system_limits_checked = True
5
     try:
6
         import os
7
-        nsems_max = os.sysconf("SC_SEM_NSEMS_MAX")
8
+        if sys.platform.startswith('freebsd'):
9
+            # sem(4) confuses sysconf(3) on FreeBSD < 11.1
10
+            nsems_max = -1
11
+        else:
12
+            nsems_max = os.sysconf("SC_SEM_NSEMS_MAX")
13
     except (AttributeError, ValueError):
14
         # sysconf not available or setting not available
15
         return

Return to bug 219963