View | Details | Raw Unified | Return to bug 226476 | 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 59
40
_GECKO_VERSIONS=		52 60
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
59_DEPENDS=		${LOCALBASE}/lib/firefox/firefox:www/firefox
45
60_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/Mk/bsd.gecko.mk (-1 / +1 lines)
Lines 379-385 post-patch-SNDIO-on: Link Here
379
.endif
379
.endif
380
380
381
.if ${PORT_OPTIONS:MRUST} || ${MOZILLA_VER:R:R} >= 54
381
.if ${PORT_OPTIONS:MRUST} || ${MOZILLA_VER:R:R} >= 54
382
BUILD_DEPENDS+=	${RUST_PORT:T}>=1.22.1:${RUST_PORT}
382
BUILD_DEPENDS+=	${RUST_PORT:T}>=1.24:${RUST_PORT}
383
RUST_PORT?=		lang/rust
383
RUST_PORT?=		lang/rust
384
. if ${MOZILLA_VER:R:R} < 54
384
. if ${MOZILLA_VER:R:R} < 54
385
MOZ_OPTIONS+=	--enable-rust
385
MOZ_OPTIONS+=	--enable-rust
(-)b/www/firefox-i18n/Makefile (-2 / +2 lines)
Lines 2-8 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	firefox-i18n
4
PORTNAME=	firefox-i18n
5
PORTVERSION=	59.0.2
5
PORTVERSION=	60.0b12
6
CATEGORIES=	www
6
CATEGORIES=	www
7
MASTER_SITES=	MOZILLA/${PORTNAME:S|-i18n||}/releases/${DISTVERSION}/linux-i686/xpi \
7
MASTER_SITES=	MOZILLA/${PORTNAME:S|-i18n||}/releases/${DISTVERSION}/linux-i686/xpi \
8
		MOZILLA/${PORTNAME:S|-i18n||}/candidates/${DISTVERSION}-candidates/build1/linux-i686/xpi
8
		MOZILLA/${PORTNAME:S|-i18n||}/candidates/${DISTVERSION}-candidates/build1/linux-i686/xpi
Lines 15-21 COMMENT= Localized interface for Firefox Link Here
15
15
16
EXTRACT_DEPENDS=	zip:archivers/zip
16
EXTRACT_DEPENDS=	zip:archivers/zip
17
17
18
USES=		zip:infozip gecko:firefox,59,build
18
USES=		zip:infozip gecko:firefox,60,build
19
USE_XPI=	firefox
19
USE_XPI=	firefox
20
20
21
NO_ARCH=	yes
21
NO_ARCH=	yes
(-)b/www/firefox-i18n/Makefile.lang (-1 / +4 lines)
Lines 6-12 FIREFOX_I18N_ALL_= ach af an ar as ast az be bg bn-BD bn-IN br bs ca cak \ Link Here
6
			es-ES es-MX et eu fa ff fi fr fy-NL ga-IE gd gl gn	\
6
			es-ES es-MX et eu fa ff fi fr fy-NL ga-IE gd gl gn	\
7
			gu-IN he hi-IN hr hsb hu hy-AM ia id is it ja ka kab	\
7
			gu-IN he hi-IN hr hsb hu hy-AM ia id is it ja ka kab	\
8
			kk km kn ko lij lt lv mai mk ml mr ms my nb-NO ne-NP nl	\
8
			kk km kn ko lij lt lv mai mk ml mr ms my nb-NO ne-NP nl	\
9
			nn-NO or pa-IN pl pt-BR pt-PT rm ro ru si sk sl son	\
9
			nn-NO oc or pa-IN pl pt-BR pt-PT rm ro ru si sk sl son	\
10
			sq sr sv-SE ta te th tr uk ur uz vi xh zh-CN zh-TW
10
			sq sr sv-SE ta te th tr uk ur uz vi xh zh-CN zh-TW
11
11
12
.if defined(FIREFOX_I18N_ALL) || defined(PACKAGE_BUILDING) || target(package)
12
.if defined(FIREFOX_I18N_ALL) || defined(PACKAGE_BUILDING) || target(package)
Lines 225-230 FIREFOX_I18N+= nl Link Here
225
.if ${PORT_OPTIONS:MLANG_NN}
225
.if ${PORT_OPTIONS:MLANG_NN}
226
FIREFOX_I18N+=  nn-NO
226
FIREFOX_I18N+=  nn-NO
227
.endif
227
.endif
228
.if ${PORT_OPTIONS:MLANG_OC}
229
FIREFOX_I18N+=  oc
230
.endif
228
.if ${PORT_OPTIONS:MLANG_OR}
231
.if ${PORT_OPTIONS:MLANG_OR}
229
FIREFOX_I18N+=  or
232
FIREFOX_I18N+=  or
230
.endif
233
.endif
(-)b/www/firefox-i18n/Makefile.option (+2 lines)
Lines 73-78 OPTIONS_DEFINE= LANG_ACH \ Link Here
73
		LANG_NE \
73
		LANG_NE \
74
		LANG_NL \
74
		LANG_NL \
75
		LANG_NN \
75
		LANG_NN \
76
		LANG_OC \
76
		LANG_OR \
77
		LANG_OR \
77
		LANG_PA \
78
		LANG_PA \
78
		LANG_PL \
79
		LANG_PL \
Lines 122-127 LANG_LIJ_DESC?= Ligurian (Genoa) language support Link Here
122
LANG_MS_DESC?=	Malay language support
123
LANG_MS_DESC?=	Malay language support
123
LANG_MY_DESC?=	Burmese language support
124
LANG_MY_DESC?=	Burmese language support
124
LANG_NE_DESC?=	Nepali language support
125
LANG_NE_DESC?=	Nepali language support
126
LANG_OC_DESC?=	Occitan (lengadocian) language support
125
LANG_SW_DESC?=	Swahili language support
127
LANG_SW_DESC?=	Swahili language support
126
LANG_UR_DESC?=	Urdu (Pakistan) language support
128
LANG_UR_DESC?=	Urdu (Pakistan) language support
127
LANG_UZ_DESC?=	Uzbek language support
129
LANG_UZ_DESC?=	Uzbek language support
(-)b/www/firefox-i18n/distinfo (-195 / +197 lines)
Lines 1-195 Link Here
1
TIMESTAMP = 1521751601
1
TIMESTAMP = 1523564700
2
SHA256 (xpi/firefox-i18n-59.0.2/ach.xpi) = d4fd5f94e6463049826f854f66589984854042c997f977049d4f8a990698eb53
2
SHA256 (xpi/firefox-i18n-60.0b12/ach.xpi) = eb0275dc9dbe466ea34d4f492462aec7d25626ec6cf965bd0b344634120e232d
3
SIZE (xpi/firefox-i18n-59.0.2/ach.xpi) = 439227
3
SIZE (xpi/firefox-i18n-60.0b12/ach.xpi) = 495264
4
SHA256 (xpi/firefox-i18n-59.0.2/af.xpi) = faca2b8efbef96c1f8362ba5b7f0b39ed76fce2e77028abfc9c1ecad4fc95ac6
4
SHA256 (xpi/firefox-i18n-60.0b12/af.xpi) = 8ed6b5a5cd2bc33e49b03e450eea8de83a18c82c74b1f10984d59ce5af92af5d
5
SIZE (xpi/firefox-i18n-59.0.2/af.xpi) = 436731
5
SIZE (xpi/firefox-i18n-60.0b12/af.xpi) = 485755
6
SHA256 (xpi/firefox-i18n-59.0.2/an.xpi) = e39ea62741370620936c43c84adc34eb63618108633b2840909ec9365588d76b
6
SHA256 (xpi/firefox-i18n-60.0b12/an.xpi) = 127d18c9cc6c174637fe104ab6a3a35b117c2084c5a3e7f671f3273efe6c3d87
7
SIZE (xpi/firefox-i18n-59.0.2/an.xpi) = 463405
7
SIZE (xpi/firefox-i18n-60.0b12/an.xpi) = 518899
8
SHA256 (xpi/firefox-i18n-59.0.2/ar.xpi) = 732cf91f7e5f8c21798ccf5ed7647afd7a3d64147393da23d6d5df97409685d3
8
SHA256 (xpi/firefox-i18n-60.0b12/ar.xpi) = 55f5cb4c8e4abc08d18711df475557545a479e01e87aaaa8ffa352f17bd8f39a
9
SIZE (xpi/firefox-i18n-59.0.2/ar.xpi) = 486633
9
SIZE (xpi/firefox-i18n-60.0b12/ar.xpi) = 546105
10
SHA256 (xpi/firefox-i18n-59.0.2/as.xpi) = a862f49f7045e8a10411007486401f134c38e3a0fce9f6f3331bf18783f1541c
10
SHA256 (xpi/firefox-i18n-60.0b12/as.xpi) = 07ac1970345845fd22f9797a60dbe9b876569a6a60cbca80ccacf7e7bb8478a1
11
SIZE (xpi/firefox-i18n-59.0.2/as.xpi) = 483301
11
SIZE (xpi/firefox-i18n-60.0b12/as.xpi) = 529488
12
SHA256 (xpi/firefox-i18n-59.0.2/ast.xpi) = 43cb3a6e8aea1f876722508a6ed1c456fd313c129a93b0d49827d37752b320be
12
SHA256 (xpi/firefox-i18n-60.0b12/ast.xpi) = 3514982d520a43fe390af2c02c1047c501d7be00094aacf5b43a0a91c8505e51
13
SIZE (xpi/firefox-i18n-59.0.2/ast.xpi) = 454343
13
SIZE (xpi/firefox-i18n-60.0b12/ast.xpi) = 506992
14
SHA256 (xpi/firefox-i18n-59.0.2/az.xpi) = 7f09f746bb2afcb8d82c76e3919607b7fc2f8a6c7ac65221134d2b713f610493
14
SHA256 (xpi/firefox-i18n-60.0b12/az.xpi) = 9145185db74b0b764cc72e20737564da86f5412768729b4890e869f1fb937611
15
SIZE (xpi/firefox-i18n-59.0.2/az.xpi) = 464270
15
SIZE (xpi/firefox-i18n-60.0b12/az.xpi) = 520378
16
SHA256 (xpi/firefox-i18n-59.0.2/be.xpi) = 0c9d0500a9f85997334283a015528b2a2a3c86dbd604571206a5522d01811802
16
SHA256 (xpi/firefox-i18n-60.0b12/be.xpi) = 0e7eb6efd3a1e31867ee9c6d67d158b38f6013eaaf031bccbcc6771cc93d8a76
17
SIZE (xpi/firefox-i18n-59.0.2/be.xpi) = 517059
17
SIZE (xpi/firefox-i18n-60.0b12/be.xpi) = 578595
18
SHA256 (xpi/firefox-i18n-59.0.2/bg.xpi) = 6ce855064e22750088cd09d61fd3d77cd3a2cd2b286e8603df9d02386dd4985d
18
SHA256 (xpi/firefox-i18n-60.0b12/bg.xpi) = df7b4ee4b4c4e4156fa68236bac876551b1b52c35d5839926879244257578139
19
SIZE (xpi/firefox-i18n-59.0.2/bg.xpi) = 508613
19
SIZE (xpi/firefox-i18n-60.0b12/bg.xpi) = 568202
20
SHA256 (xpi/firefox-i18n-59.0.2/bn-BD.xpi) = 860f9e8d7a7c7e8c35acde03a35f9f94182bd4172e0cfebc43d09a5057f54265
20
SHA256 (xpi/firefox-i18n-60.0b12/bn-BD.xpi) = a8dcc12789cb50fe72fe9a4d07594793be936bf10f2215c2a62b287a8dac173a
21
SIZE (xpi/firefox-i18n-59.0.2/bn-BD.xpi) = 526352
21
SIZE (xpi/firefox-i18n-60.0b12/bn-BD.xpi) = 586620
22
SHA256 (xpi/firefox-i18n-59.0.2/bn-IN.xpi) = 11cc8e9eeabb0171125939ff050fe736581df2957fa96fc54ba0f5c5c6f91e12
22
SHA256 (xpi/firefox-i18n-60.0b12/bn-IN.xpi) = 0fbe5a3f4c2cb2bb2a4fdefa65a7807bf94ebe617546400e8f3e4bec860be554
23
SIZE (xpi/firefox-i18n-59.0.2/bn-IN.xpi) = 510797
23
SIZE (xpi/firefox-i18n-60.0b12/bn-IN.xpi) = 569235
24
SHA256 (xpi/firefox-i18n-59.0.2/br.xpi) = 0d5068e3ac9293da71a2bfc3566e6cbe52273741cc9e82d5514b7334a6ed0e4c
24
SHA256 (xpi/firefox-i18n-60.0b12/br.xpi) = f5d02a20037bc68750f31d517c73e9f0d2a624f8385502beacfa8e78322ee873
25
SIZE (xpi/firefox-i18n-59.0.2/br.xpi) = 451719
25
SIZE (xpi/firefox-i18n-60.0b12/br.xpi) = 510409
26
SHA256 (xpi/firefox-i18n-59.0.2/bs.xpi) = 291a4f8e85977a8eb93ab52ae7caa857caf7998f1c561baa534ab8a3958411c6
26
SHA256 (xpi/firefox-i18n-60.0b12/bs.xpi) = e418e0f96889dfc5df0d63c9acf3eb3f7776d4bf607430376450524094cbcd7c
27
SIZE (xpi/firefox-i18n-59.0.2/bs.xpi) = 457859
27
SIZE (xpi/firefox-i18n-60.0b12/bs.xpi) = 513133
28
SHA256 (xpi/firefox-i18n-59.0.2/ca.xpi) = 5cbec24877869340fd52eab4af21acdb0e30a298ad9e9d97b899a5a0223be1c4
28
SHA256 (xpi/firefox-i18n-60.0b12/ca.xpi) = 2ca4e3e2504f90f76e18824635c85a341a66e872cc52f689a915c15e0fb5b41a
29
SIZE (xpi/firefox-i18n-59.0.2/ca.xpi) = 464912
29
SIZE (xpi/firefox-i18n-60.0b12/ca.xpi) = 523679
30
SHA256 (xpi/firefox-i18n-59.0.2/cak.xpi) = 935960adb4cd204153f1790397ce3b8793151a6d9b1f5bf38630b7a274b36bfe
30
SHA256 (xpi/firefox-i18n-60.0b12/cak.xpi) = 9dae5c8091819d68a4a02aed3a7c3c666f1e151a71e674efb83a117ec171c343
31
SIZE (xpi/firefox-i18n-59.0.2/cak.xpi) = 475234
31
SIZE (xpi/firefox-i18n-60.0b12/cak.xpi) = 533312
32
SHA256 (xpi/firefox-i18n-59.0.2/cs.xpi) = 266664866deaff544d47ffb90ada91c0d270fb563a1ef67baad86c175d88b606
32
SHA256 (xpi/firefox-i18n-60.0b12/cs.xpi) = 7d49e420d807c79bb90f470660b2014ff1bede25db46293fbe70c8ff475d34f8
33
SIZE (xpi/firefox-i18n-59.0.2/cs.xpi) = 471575
33
SIZE (xpi/firefox-i18n-60.0b12/cs.xpi) = 529821
34
SHA256 (xpi/firefox-i18n-59.0.2/cy.xpi) = 73ed7ec234a6e197688ec0fd7809d3bf24d6f6f6f8aad9e47bb10bc600d8918b
34
SHA256 (xpi/firefox-i18n-60.0b12/cy.xpi) = e9a05276fd4f11bc9e07d1af85cfe98ad1d1ed98398182cae6a67de6e2689919
35
SIZE (xpi/firefox-i18n-59.0.2/cy.xpi) = 454433
35
SIZE (xpi/firefox-i18n-60.0b12/cy.xpi) = 514701
36
SHA256 (xpi/firefox-i18n-59.0.2/da.xpi) = db17d7492e07c2c825572353a1407242180e0b53d399b48579d5f1e53ec8d11e
36
SHA256 (xpi/firefox-i18n-60.0b12/da.xpi) = c545cf0d38330af607cdd949ae704e73ce2a009187264040f2f9cf912d14fca3
37
SIZE (xpi/firefox-i18n-59.0.2/da.xpi) = 446948
37
SIZE (xpi/firefox-i18n-60.0b12/da.xpi) = 501549
38
SHA256 (xpi/firefox-i18n-59.0.2/de.xpi) = 4e02cf24936162334435ecf99a9b1abefeebda06b34a75e527c6328502c1fcff
38
SHA256 (xpi/firefox-i18n-60.0b12/de.xpi) = 9881f5339770218e602dc2b5a9e6d6b823f733d71067f7048893eff7baedf7e0
39
SIZE (xpi/firefox-i18n-59.0.2/de.xpi) = 466272
39
SIZE (xpi/firefox-i18n-60.0b12/de.xpi) = 521919
40
SHA256 (xpi/firefox-i18n-59.0.2/dsb.xpi) = 91ef3e6bac7be38155e5f957756f21761bf548a2216e2588721bf59a10792f14
40
SHA256 (xpi/firefox-i18n-60.0b12/dsb.xpi) = e2a098c2f96c73198a9ef2313a1f29d127850f85edc453b78ef394f1511c57ae
41
SIZE (xpi/firefox-i18n-59.0.2/dsb.xpi) = 478974
41
SIZE (xpi/firefox-i18n-60.0b12/dsb.xpi) = 537772
42
SHA256 (xpi/firefox-i18n-59.0.2/el.xpi) = c3457ea19f44ebbd2bcf34403c19d483edee46bdf2fa2de3ad78bb7ee2510f62
42
SHA256 (xpi/firefox-i18n-60.0b12/el.xpi) = bc4b1a51c4f18477468613250d57772fc1f0ee2e04bd7b64c955923a7f54e586
43
SIZE (xpi/firefox-i18n-59.0.2/el.xpi) = 531408
43
SIZE (xpi/firefox-i18n-60.0b12/el.xpi) = 590682
44
SHA256 (xpi/firefox-i18n-59.0.2/en-GB.xpi) = 4920efb507cfee37e39b705b5bda6b1716eb491274f9df5be505e2a65c4d8fd7
44
SHA256 (xpi/firefox-i18n-60.0b12/en-GB.xpi) = 0ffae8109ad0b10fb47ce4cebcf781f59af0c713ead0757399015ba931168946
45
SIZE (xpi/firefox-i18n-59.0.2/en-GB.xpi) = 434300
45
SIZE (xpi/firefox-i18n-60.0b12/en-GB.xpi) = 490139
46
SHA256 (xpi/firefox-i18n-59.0.2/en-US.xpi) = c2b1533bb3c2b75c60662225017795905a2f3f28989d6098bdd7b6757ae3bff7
46
SHA256 (xpi/firefox-i18n-60.0b12/en-US.xpi) = 111352725063d9216e56e8712b3844e2faa94f99dc761dbd09dd9f968a81245f
47
SIZE (xpi/firefox-i18n-59.0.2/en-US.xpi) = 432749
47
SIZE (xpi/firefox-i18n-60.0b12/en-US.xpi) = 472098
48
SHA256 (xpi/firefox-i18n-59.0.2/en-ZA.xpi) = d3655db524f7eaee1f6c735efe1697bc183776adb85edaaa4b93bfdaf8861924
48
SHA256 (xpi/firefox-i18n-60.0b12/en-ZA.xpi) = 6778029d6e58f6a946fc8142bec8774846e80107b064c066b9356c4ff7214694
49
SIZE (xpi/firefox-i18n-59.0.2/en-ZA.xpi) = 427365
49
SIZE (xpi/firefox-i18n-60.0b12/en-ZA.xpi) = 473354
50
SHA256 (xpi/firefox-i18n-59.0.2/eo.xpi) = ca5d2cfd209a5c90521fe4fb014c1d3835b4bf11fd74f9e3c30ec57ada7e4655
50
SHA256 (xpi/firefox-i18n-60.0b12/eo.xpi) = 822d61d7fa96599f120b75ee8fabd7c271e002191a5743a6408005728f6252de
51
SIZE (xpi/firefox-i18n-59.0.2/eo.xpi) = 453366
51
SIZE (xpi/firefox-i18n-60.0b12/eo.xpi) = 507600
52
SHA256 (xpi/firefox-i18n-59.0.2/es-AR.xpi) = 9322e35d7dac234c334a9b65347344b4ec47df1bd415d0c715ff310edcae3aea
52
SHA256 (xpi/firefox-i18n-60.0b12/es-AR.xpi) = 7bc9ea632b7ac33a8667d422d26d3ad136977339dc91767ebe882cd5c7e1e36c
53
SIZE (xpi/firefox-i18n-59.0.2/es-AR.xpi) = 461797
53
SIZE (xpi/firefox-i18n-60.0b12/es-AR.xpi) = 522639
54
SHA256 (xpi/firefox-i18n-59.0.2/es-CL.xpi) = 28b312de9234e3654ef5105777d195c6dcbd58107978407b4ff69ebabc75d4bc
54
SHA256 (xpi/firefox-i18n-60.0b12/es-CL.xpi) = f914054524387113170d95d21ba0427757deec24ea45451d948d1cdc1735d759
55
SIZE (xpi/firefox-i18n-59.0.2/es-CL.xpi) = 464654
55
SIZE (xpi/firefox-i18n-60.0b12/es-CL.xpi) = 525288
56
SHA256 (xpi/firefox-i18n-59.0.2/es-ES.xpi) = 3bf4c6c0de74e5eb1202f5dd6cea420b38b1210289f4d8ed78d54095e9241846
56
SHA256 (xpi/firefox-i18n-60.0b12/es-ES.xpi) = 5cc277231eb85d0983441fe3b4c7796613ca5727d64e9a9a1d667a8c71fbb70d
57
SIZE (xpi/firefox-i18n-59.0.2/es-ES.xpi) = 348463
57
SIZE (xpi/firefox-i18n-60.0b12/es-ES.xpi) = 455094
58
SHA256 (xpi/firefox-i18n-59.0.2/es-MX.xpi) = 065e7bb9c94c38eb7d18f674a51076c6356e9c201ab647bc8a9f88d6bc24b934
58
SHA256 (xpi/firefox-i18n-60.0b12/es-MX.xpi) = 4cca2bb21c8dea5959f6becfe712ba5f133b9e6e7d0ac8cf136637d82e58c855
59
SIZE (xpi/firefox-i18n-59.0.2/es-MX.xpi) = 466313
59
SIZE (xpi/firefox-i18n-60.0b12/es-MX.xpi) = 523253
60
SHA256 (xpi/firefox-i18n-59.0.2/et.xpi) = f19a1382ee7616d9c0bad256ec10b7dab3c4b5c2395f6cb306f242eb8ce99eb5
60
SHA256 (xpi/firefox-i18n-60.0b12/et.xpi) = bed41d6bca2b59050e6ccb4e6e8da62cf6d2d2449f23d3487c2ffcaa4fee75ff
61
SIZE (xpi/firefox-i18n-59.0.2/et.xpi) = 445394
61
SIZE (xpi/firefox-i18n-60.0b12/et.xpi) = 503401
62
SHA256 (xpi/firefox-i18n-59.0.2/eu.xpi) = b28fd08c3a6f923e4cd469ecf8ba58e6a323a754733f13144716e31ef86d002e
62
SHA256 (xpi/firefox-i18n-60.0b12/eu.xpi) = 00f40a6a8cbde8c4782e5ef8e8a169de2331261279eb7f9a69f31a84d5a68f27
63
SIZE (xpi/firefox-i18n-59.0.2/eu.xpi) = 455236
63
SIZE (xpi/firefox-i18n-60.0b12/eu.xpi) = 510093
64
SHA256 (xpi/firefox-i18n-59.0.2/fa.xpi) = 0cecfc780e5d5fd00e9bdba9b4b23b1c5da34b520636417cd7636a679bbc50f4
64
SHA256 (xpi/firefox-i18n-60.0b12/fa.xpi) = ddabcbee074bbd5c079ee3194339982c5eb5dc5acf99205cda168856fbf63b7f
65
SIZE (xpi/firefox-i18n-59.0.2/fa.xpi) = 508098
65
SIZE (xpi/firefox-i18n-60.0b12/fa.xpi) = 564727
66
SHA256 (xpi/firefox-i18n-59.0.2/ff.xpi) = 74ae886495cc10e62cf64eb6d0a90111e79a90f95fe365402b19c1c0d0dc8a7a
66
SHA256 (xpi/firefox-i18n-60.0b12/ff.xpi) = 524fd91c007ca5eb5822765a0e78b78201715c2106a2f02f278f5c5ce2aeaa41
67
SIZE (xpi/firefox-i18n-59.0.2/ff.xpi) = 455027
67
SIZE (xpi/firefox-i18n-60.0b12/ff.xpi) = 510722
68
SHA256 (xpi/firefox-i18n-59.0.2/fi.xpi) = a3a0291633b412eedd3e93e1e6726b74d181203a4c057a8a31db0981f2abd449
68
SHA256 (xpi/firefox-i18n-60.0b12/fi.xpi) = d219b17ea1efe8183755f980ce38e2d8e4c121b49ce6d29e2c1a85f07c8fd1e9
69
SIZE (xpi/firefox-i18n-59.0.2/fi.xpi) = 445182
69
SIZE (xpi/firefox-i18n-60.0b12/fi.xpi) = 503907
70
SHA256 (xpi/firefox-i18n-59.0.2/fr.xpi) = 17bfbbe27944608489b08a3abfa414cce964eecd03b9c341f29d5f125062298d
70
SHA256 (xpi/firefox-i18n-60.0b12/fr.xpi) = b2ab253dc22abc6e0395e1b58b0ac829a29280a887fc8744bf5c2b9816ca5f7e
71
SIZE (xpi/firefox-i18n-59.0.2/fr.xpi) = 473593
71
SIZE (xpi/firefox-i18n-60.0b12/fr.xpi) = 532669
72
SHA256 (xpi/firefox-i18n-59.0.2/fy-NL.xpi) = 61cdf4a594632ad0ae2f4cc224b61c3822b81784f6145f9632461f4f596f4b34
72
SHA256 (xpi/firefox-i18n-60.0b12/fy-NL.xpi) = 9c2517677f5a8a6a80aa86f1eb88c6d64125e972961c5674907d72aabc4b0e22
73
SIZE (xpi/firefox-i18n-59.0.2/fy-NL.xpi) = 462918
73
SIZE (xpi/firefox-i18n-60.0b12/fy-NL.xpi) = 522496
74
SHA256 (xpi/firefox-i18n-59.0.2/ga-IE.xpi) = cbfcfb995c91ca794714a881cd12701d01ae3830ff518477c4b1235380052de1
74
SHA256 (xpi/firefox-i18n-60.0b12/ga-IE.xpi) = f65cb9277665b84f56fc48fc2ca9855e37872e4b0212ffb570dcb5b1470dda27
75
SIZE (xpi/firefox-i18n-59.0.2/ga-IE.xpi) = 471909
75
SIZE (xpi/firefox-i18n-60.0b12/ga-IE.xpi) = 525360
76
SHA256 (xpi/firefox-i18n-59.0.2/gd.xpi) = 65f578cf7a0c58592d75b7f85c2a3b1c847810ffc623ae3bdc6f8517d8e33c41
76
SHA256 (xpi/firefox-i18n-60.0b12/gd.xpi) = 5c6804b80adca0b2ce2090931a61420ff64d78d1931a8651866ac08ce3047c7c
77
SIZE (xpi/firefox-i18n-59.0.2/gd.xpi) = 461297
77
SIZE (xpi/firefox-i18n-60.0b12/gd.xpi) = 519251
78
SHA256 (xpi/firefox-i18n-59.0.2/gl.xpi) = 9a3e6621a25ba77291bc3e78f539680eb679929d810d8ff51cbb4db21f4622bb
78
SHA256 (xpi/firefox-i18n-60.0b12/gl.xpi) = b7f7e696a68592ccaf0729a343d9dc6ce918187e18aca1e56f980c50a21e1b51
79
SIZE (xpi/firefox-i18n-59.0.2/gl.xpi) = 441615
79
SIZE (xpi/firefox-i18n-60.0b12/gl.xpi) = 493683
80
SHA256 (xpi/firefox-i18n-59.0.2/gn.xpi) = 3f44a6af5e7d75e283514e0a73f1a30a2e35865086bcfb4f47a76cc957f8265d
80
SHA256 (xpi/firefox-i18n-60.0b12/gn.xpi) = 59e05d58df7315ea3706f826894b7fbf36a66e9af6b6e1b1d6cba96620a30998
81
SIZE (xpi/firefox-i18n-59.0.2/gn.xpi) = 469397
81
SIZE (xpi/firefox-i18n-60.0b12/gn.xpi) = 531219
82
SHA256 (xpi/firefox-i18n-59.0.2/gu-IN.xpi) = 105229e5f047d917f277c13d72ee50e981c92cecd8a342608c15245b28d4d303
82
SHA256 (xpi/firefox-i18n-60.0b12/gu-IN.xpi) = 3e1c615e20902070aa0e96d0b5ce2d062c7e34292d6f07eda39ae46b6351d801
83
SIZE (xpi/firefox-i18n-59.0.2/gu-IN.xpi) = 521804
83
SIZE (xpi/firefox-i18n-60.0b12/gu-IN.xpi) = 585580
84
SHA256 (xpi/firefox-i18n-59.0.2/he.xpi) = a1a5744ce47eaa193278f697a5bf267cccd01777d8e4d7c7433bd7bfe1ddd132
84
SHA256 (xpi/firefox-i18n-60.0b12/he.xpi) = debd5ddf0d3772c04475d2883b4383494c3503d42bdb6ae4506c6f3e82c055e2
85
SIZE (xpi/firefox-i18n-59.0.2/he.xpi) = 472771
85
SIZE (xpi/firefox-i18n-60.0b12/he.xpi) = 530855
86
SHA256 (xpi/firefox-i18n-59.0.2/hi-IN.xpi) = b51b0aac6319414c1a49858f180949a07c999c866c63e619818505727ebca52d
86
SHA256 (xpi/firefox-i18n-60.0b12/hi-IN.xpi) = 7c0825d7fce0ce4f0592c8915a8592b7245ab9eadd7078646d56ab2ac9aa95f6
87
SIZE (xpi/firefox-i18n-59.0.2/hi-IN.xpi) = 524279
87
SIZE (xpi/firefox-i18n-60.0b12/hi-IN.xpi) = 586673
88
SHA256 (xpi/firefox-i18n-59.0.2/hr.xpi) = bde5da8ad592142500f36757d3327129a6343dc52fb7c63b4edb1138b290ac80
88
SHA256 (xpi/firefox-i18n-60.0b12/hr.xpi) = b8332af2debb06b9caa3bc2134e09b4e02ad71845fc82eca4968c33ba3dbc333
89
SIZE (xpi/firefox-i18n-59.0.2/hr.xpi) = 459978
89
SIZE (xpi/firefox-i18n-60.0b12/hr.xpi) = 514377
90
SHA256 (xpi/firefox-i18n-59.0.2/hsb.xpi) = 84354abb5b8d735061284a8357dbf80ad0ab4d49618af82074d6b8cd7990339a
90
SHA256 (xpi/firefox-i18n-60.0b12/hsb.xpi) = cb1ee0411910204934078575422836a1c70e7486aab4f7fa1afa2afe567e968e
91
SIZE (xpi/firefox-i18n-59.0.2/hsb.xpi) = 475940
91
SIZE (xpi/firefox-i18n-60.0b12/hsb.xpi) = 535351
92
SHA256 (xpi/firefox-i18n-59.0.2/hu.xpi) = a8c1ceb1fdd231acd78d91a67b79f4a0932842322b76a5cb6e495c8901b83823
92
SHA256 (xpi/firefox-i18n-60.0b12/hu.xpi) = 557c21926e12f53aa596513f21a3503f5e066274225eb28e25eca5831b87e24f
93
SIZE (xpi/firefox-i18n-59.0.2/hu.xpi) = 476896
93
SIZE (xpi/firefox-i18n-60.0b12/hu.xpi) = 536407
94
SHA256 (xpi/firefox-i18n-59.0.2/hy-AM.xpi) = afbcfa2bb1f5201a832978eb3ec66ac779107606ee21e7ed21b118887e982a70
94
SHA256 (xpi/firefox-i18n-60.0b12/hy-AM.xpi) = d8691c31c8de33caac328162508f6c60f340c43f71d0ebe2b384f762a3f265e9
95
SIZE (xpi/firefox-i18n-59.0.2/hy-AM.xpi) = 508167
95
SIZE (xpi/firefox-i18n-60.0b12/hy-AM.xpi) = 567575
96
SHA256 (xpi/firefox-i18n-59.0.2/ia.xpi) = 8272d2de413ef02c0ae56633c1814004d4b33893853e2914c01cdd46c9427c32
96
SHA256 (xpi/firefox-i18n-60.0b12/ia.xpi) = 8d6f56763adccb060c7cfc2d7c54ba46777e96bc74f7e9faed549c2730a8893e
97
SIZE (xpi/firefox-i18n-59.0.2/ia.xpi) = 448829
97
SIZE (xpi/firefox-i18n-60.0b12/ia.xpi) = 508828
98
SHA256 (xpi/firefox-i18n-59.0.2/id.xpi) = 083e9ed9646f3dcf558e44b65ddd9fd56bdcf8fe19c35e81de20fb5132854589
98
SHA256 (xpi/firefox-i18n-60.0b12/id.xpi) = 0cdf253f87e34a98fe5dde08fa65d6a4c4ce48c325d919a06fa2de3e193601f0
99
SIZE (xpi/firefox-i18n-59.0.2/id.xpi) = 441952
99
SIZE (xpi/firefox-i18n-60.0b12/id.xpi) = 496436
100
SHA256 (xpi/firefox-i18n-59.0.2/is.xpi) = 091504efc4de1c554bde2d11e4d547deb03355384776594fb794a818c0b09dd5
100
SHA256 (xpi/firefox-i18n-60.0b12/is.xpi) = 499220c637d51988980c26436f760683e3e41f072518d4a9332ed5060e0448fc
101
SIZE (xpi/firefox-i18n-59.0.2/is.xpi) = 451373
101
SIZE (xpi/firefox-i18n-60.0b12/is.xpi) = 510788
102
SHA256 (xpi/firefox-i18n-59.0.2/it.xpi) = aa5807fbc05cccb0ff71504b7669908744aa61d8e6080fc8a0ccdec015d43f3e
102
SHA256 (xpi/firefox-i18n-60.0b12/it.xpi) = b1d52bc5ab6263f085419d29e2e0484cb7233d9186ac3bd62728b92159a7b60d
103
SIZE (xpi/firefox-i18n-59.0.2/it.xpi) = 342524
103
SIZE (xpi/firefox-i18n-60.0b12/it.xpi) = 396703
104
SHA256 (xpi/firefox-i18n-59.0.2/ja.xpi) = eb713392349af7ed2383b59463554ee0b2ded2a4f8b5292de5481c056f271bc2
104
SHA256 (xpi/firefox-i18n-60.0b12/ja.xpi) = bcc67ce6be31a8beac9e3c17d76d5af2b2366166019e0902477a2550d189f5f7
105
SIZE (xpi/firefox-i18n-59.0.2/ja.xpi) = 508148
105
SIZE (xpi/firefox-i18n-60.0b12/ja.xpi) = 566344
106
SHA256 (xpi/firefox-i18n-59.0.2/ka.xpi) = 7cc0bfa96e5a2b5203c78a123cf293f9150bf080cb901a97991658047902bacd
106
SHA256 (xpi/firefox-i18n-60.0b12/ka.xpi) = ca236d3d28f72f5f4bb12952d4c0353b990450454157a474101ae583b264bc94
107
SIZE (xpi/firefox-i18n-59.0.2/ka.xpi) = 492569
107
SIZE (xpi/firefox-i18n-60.0b12/ka.xpi) = 554854
108
SHA256 (xpi/firefox-i18n-59.0.2/kab.xpi) = f1ba41b49e0ff467b549d406d5554235251d75b91eca0eac193172eeb4a8c5ef
108
SHA256 (xpi/firefox-i18n-60.0b12/kab.xpi) = da58b9b8c1fe94509051d792fff971dd4cbe884726f33e627edd72155156481e
109
SIZE (xpi/firefox-i18n-59.0.2/kab.xpi) = 461840
109
SIZE (xpi/firefox-i18n-60.0b12/kab.xpi) = 518712
110
SHA256 (xpi/firefox-i18n-59.0.2/kk.xpi) = ecddec11fcc909fb2bc520da8b4ffe573fde85a29f25b4c4ea72e15d014ebba3
110
SHA256 (xpi/firefox-i18n-60.0b12/kk.xpi) = adc45ac369d5c54f65b64b53385762f43cbe622577d90a3375182ada65236af0
111
SIZE (xpi/firefox-i18n-59.0.2/kk.xpi) = 517583
111
SIZE (xpi/firefox-i18n-60.0b12/kk.xpi) = 578898
112
SHA256 (xpi/firefox-i18n-59.0.2/km.xpi) = d70ef8dad857d4f7b99d508495b3f717d6a27d7b2aa96788c51af4d5e875cd7e
112
SHA256 (xpi/firefox-i18n-60.0b12/km.xpi) = e32d79412b83983ebefa4f39ede5350d7b0eb17df6c1eb073d1ac81878f5598b
113
SIZE (xpi/firefox-i18n-59.0.2/km.xpi) = 526359
113
SIZE (xpi/firefox-i18n-60.0b12/km.xpi) = 581504
114
SHA256 (xpi/firefox-i18n-59.0.2/kn.xpi) = 7cadd99b0d23cf4f673ef76c0a5beab1ca6a4e9f41b686ca23c752aa2570c794
114
SHA256 (xpi/firefox-i18n-60.0b12/kn.xpi) = 89c3cffad23a4800fe1b1b2ad3508563838df9e964c1f575d504090e66bca914
115
SIZE (xpi/firefox-i18n-59.0.2/kn.xpi) = 527879
115
SIZE (xpi/firefox-i18n-60.0b12/kn.xpi) = 584186
116
SHA256 (xpi/firefox-i18n-59.0.2/ko.xpi) = f7e418dbb3b98023b080814c52bf2bed020b764420084158161c1cc68baab87b
116
SHA256 (xpi/firefox-i18n-60.0b12/ko.xpi) = 635be553aa465ac88ffaa41e77b560d335047cb74ef711dc392f31571321572b
117
SIZE (xpi/firefox-i18n-59.0.2/ko.xpi) = 487661
117
SIZE (xpi/firefox-i18n-60.0b12/ko.xpi) = 543864
118
SHA256 (xpi/firefox-i18n-59.0.2/lij.xpi) = d47c2eb90d25be6fbc4f2880659902713495c7cfdfd31cf3d23166e584061dbd
118
SHA256 (xpi/firefox-i18n-60.0b12/lij.xpi) = 099947a8eb4119e278eba867292ca1830625be2d6c6f1b5304ff7d500588aa14
119
SIZE (xpi/firefox-i18n-59.0.2/lij.xpi) = 446606
119
SIZE (xpi/firefox-i18n-60.0b12/lij.xpi) = 511281
120
SHA256 (xpi/firefox-i18n-59.0.2/lt.xpi) = e6620d3f8b4a8e479d45bf572e3897be1edc0493735fa599c86abfe8d32bdcba
120
SHA256 (xpi/firefox-i18n-60.0b12/lt.xpi) = e09da551a408d22e957bfb7d57d1be94c632e96a1f54d20f76f621a7e832434f
121
SIZE (xpi/firefox-i18n-59.0.2/lt.xpi) = 475142
121
SIZE (xpi/firefox-i18n-60.0b12/lt.xpi) = 532412
122
SHA256 (xpi/firefox-i18n-59.0.2/lv.xpi) = 2a549953373041fa8e36ae40ad913cbadd7af5a08555c5c6dc60459aedae2987
122
SHA256 (xpi/firefox-i18n-60.0b12/lv.xpi) = fa1bd71110cae2b9a8a9bc2078f3d99511ca8863c663352d5d8215246c58476f
123
SIZE (xpi/firefox-i18n-59.0.2/lv.xpi) = 463655
123
SIZE (xpi/firefox-i18n-60.0b12/lv.xpi) = 524804
124
SHA256 (xpi/firefox-i18n-59.0.2/mai.xpi) = 6903c60c5eccd3e3ba29315aae1406b48841b9396be3927899d6bce6955546b9
124
SHA256 (xpi/firefox-i18n-60.0b12/mai.xpi) = ffe4737322485104dbdb88f00afcc54dece9ebda91906f95e72b3b63e1c5e132
125
SIZE (xpi/firefox-i18n-59.0.2/mai.xpi) = 499910
125
SIZE (xpi/firefox-i18n-60.0b12/mai.xpi) = 548124
126
SHA256 (xpi/firefox-i18n-59.0.2/mk.xpi) = f5e80c52b4474f88460329cf8642287a96c7dd61bd03f70d5acb3cac0e25ec4f
126
SHA256 (xpi/firefox-i18n-60.0b12/mk.xpi) = c04a74839a6452ecfc2e8abd9f261298fadcd2c77921e2833c565c1d8251821c
127
SIZE (xpi/firefox-i18n-59.0.2/mk.xpi) = 484076
127
SIZE (xpi/firefox-i18n-60.0b12/mk.xpi) = 512585
128
SHA256 (xpi/firefox-i18n-59.0.2/ml.xpi) = 29a1db58dce400dd16fb13cd424bdba0f097d9eee2e2e701f8acc0366bc7e473
128
SHA256 (xpi/firefox-i18n-60.0b12/ml.xpi) = e2a3169bde66d9c8939e48feaacc34aa4cce75d2a4e6581a19680ba5df107dc7
129
SIZE (xpi/firefox-i18n-59.0.2/ml.xpi) = 539735
129
SIZE (xpi/firefox-i18n-60.0b12/ml.xpi) = 597317
130
SHA256 (xpi/firefox-i18n-59.0.2/mr.xpi) = a4be8ab4e2417c4056c92146a549afe8665071ba777d4252669c67c9ed6f242b
130
SHA256 (xpi/firefox-i18n-60.0b12/mr.xpi) = d4f543c75380d7353677aae21118e075d9315c93a849488c851d85ec8c98a504
131
SIZE (xpi/firefox-i18n-59.0.2/mr.xpi) = 517961
131
SIZE (xpi/firefox-i18n-60.0b12/mr.xpi) = 577510
132
SHA256 (xpi/firefox-i18n-59.0.2/ms.xpi) = 354f738c0df3f4568c52cd70f4b0c59bea2764fef283a0d552b9d209dbf6c3f4
132
SHA256 (xpi/firefox-i18n-60.0b12/ms.xpi) = cb5285902674663453253bc9fb8f4dccc43b96d9716b13b5a736913b6dfc5b6d
133
SIZE (xpi/firefox-i18n-59.0.2/ms.xpi) = 450075
133
SIZE (xpi/firefox-i18n-60.0b12/ms.xpi) = 507829
134
SHA256 (xpi/firefox-i18n-59.0.2/my.xpi) = 97ade42f8ec1ac2c698e1777ce10a1c4abadef1e2987a3da4df50c64fe1ba758
134
SHA256 (xpi/firefox-i18n-60.0b12/my.xpi) = 8512a220bd0ae5bad608b27a31720077be38f0116249789311aef513a6edd460
135
SIZE (xpi/firefox-i18n-59.0.2/my.xpi) = 511894
135
SIZE (xpi/firefox-i18n-60.0b12/my.xpi) = 568745
136
SHA256 (xpi/firefox-i18n-59.0.2/nb-NO.xpi) = 9f45d75e5ad7fa288b3794661ba2eeba2eb857c11d6bd200324ee1c2188a5467
136
SHA256 (xpi/firefox-i18n-60.0b12/nb-NO.xpi) = 81174130339708128f8bfc0ecd211bd56a82ba2dcae572dc4a9804346e44a096
137
SIZE (xpi/firefox-i18n-59.0.2/nb-NO.xpi) = 450276
137
SIZE (xpi/firefox-i18n-60.0b12/nb-NO.xpi) = 507873
138
SHA256 (xpi/firefox-i18n-59.0.2/ne-NP.xpi) = 023e578ee98db7f1549011b600430a5800e89b75d8ef172719041fba4ecca633
138
SHA256 (xpi/firefox-i18n-60.0b12/ne-NP.xpi) = c0414e8f733f06a8ee7a228258cdcfbf977d8169c73ba18f88c4faeace381c87
139
SIZE (xpi/firefox-i18n-59.0.2/ne-NP.xpi) = 509177
139
SIZE (xpi/firefox-i18n-60.0b12/ne-NP.xpi) = 553650
140
SHA256 (xpi/firefox-i18n-59.0.2/nl.xpi) = 65384c5e4d3f36257f6f0793f311be4a50333ec67fff877a1aac01b9c403868f
140
SHA256 (xpi/firefox-i18n-60.0b12/nl.xpi) = 68ea51e2190a47a4a7c6b7d410579d03cc470325949a5dea5211fc07e15d7acf
141
SIZE (xpi/firefox-i18n-59.0.2/nl.xpi) = 458128
141
SIZE (xpi/firefox-i18n-60.0b12/nl.xpi) = 514758
142
SHA256 (xpi/firefox-i18n-59.0.2/nn-NO.xpi) = d583ae5e1ec6dff31adc76bd243db1c05c390adb7e757bb3be823370141d6e81
142
SHA256 (xpi/firefox-i18n-60.0b12/nn-NO.xpi) = 4c0987647c2a07022611607b09934648b7482a0aa396dc74256633ee5b0723d6
143
SIZE (xpi/firefox-i18n-59.0.2/nn-NO.xpi) = 451470
143
SIZE (xpi/firefox-i18n-60.0b12/nn-NO.xpi) = 508785
144
SHA256 (xpi/firefox-i18n-59.0.2/or.xpi) = 64bead2c33ccc197348ecdaeae4bc2b16d947e2d17fa3e83fff9eece9fdc3109
144
SHA256 (xpi/firefox-i18n-60.0b12/oc.xpi) = 947ce552e7e1272e4aeb6780016fb73446dd009f250e08b9790864454856233f
145
SIZE (xpi/firefox-i18n-59.0.2/or.xpi) = 493181
145
SIZE (xpi/firefox-i18n-60.0b12/oc.xpi) = 524072
146
SHA256 (xpi/firefox-i18n-59.0.2/pa-IN.xpi) = 504d8e4a3e3c485ab03fce76636de738dd3bd5ab75e5c52bebbe74634972686e
146
SHA256 (xpi/firefox-i18n-60.0b12/or.xpi) = 7b0765e412e1175f76e958a676f50c6d1d8ab87caa90363d005ee502034ff849
147
SIZE (xpi/firefox-i18n-59.0.2/pa-IN.xpi) = 492420
147
SIZE (xpi/firefox-i18n-60.0b12/or.xpi) = 539631
148
SHA256 (xpi/firefox-i18n-59.0.2/pl.xpi) = e34d92a38abdd251bf110b64c3c2bbf70ddefdc3d32ef50a6545dd3d8c8022e6
148
SHA256 (xpi/firefox-i18n-60.0b12/pa-IN.xpi) = bbd44be2d95a2bd076047e2fb32f1c0f6c7d858190f3d29f89371ce700b9c186
149
SIZE (xpi/firefox-i18n-59.0.2/pl.xpi) = 358511
149
SIZE (xpi/firefox-i18n-60.0b12/pa-IN.xpi) = 551189
150
SHA256 (xpi/firefox-i18n-59.0.2/pt-BR.xpi) = cd0e1e1fb5063fd9a82940506777fd5a9447df36f46f604026b1a4987e65b8e4
150
SHA256 (xpi/firefox-i18n-60.0b12/pl.xpi) = 469081ef835650bd250474ff30551d60faada08f3f7ebb7ff2a988fea6adda67
151
SIZE (xpi/firefox-i18n-59.0.2/pt-BR.xpi) = 455916
151
SIZE (xpi/firefox-i18n-60.0b12/pl.xpi) = 414843
152
SHA256 (xpi/firefox-i18n-59.0.2/pt-PT.xpi) = ab480af25495f57649c19cf54668bab1e209b60d07654907e13010b26503506a
152
SHA256 (xpi/firefox-i18n-60.0b12/pt-BR.xpi) = 2057e5e86ad7ed50b8375d9ad5b4ce410aa5d2502b348b8dd1bc2f0ebc952115
153
SIZE (xpi/firefox-i18n-59.0.2/pt-PT.xpi) = 459331
153
SIZE (xpi/firefox-i18n-60.0b12/pt-BR.xpi) = 513155
154
SHA256 (xpi/firefox-i18n-59.0.2/rm.xpi) = bd4918a2b0ce184da481fde4d6030991096defd8486a49deec07ccd94dd11990
154
SHA256 (xpi/firefox-i18n-60.0b12/pt-PT.xpi) = aa69dd505639b8b31e9b7608cb5a57e271c67aa2b6fcb93300af6f41e4d70b36
155
SIZE (xpi/firefox-i18n-59.0.2/rm.xpi) = 449757
155
SIZE (xpi/firefox-i18n-60.0b12/pt-PT.xpi) = 517459
156
SHA256 (xpi/firefox-i18n-59.0.2/ro.xpi) = cd6ff4632e846c0d982faccbda31ee379dc002c16a11e119de1b35543bb9f912
156
SHA256 (xpi/firefox-i18n-60.0b12/rm.xpi) = 2debd11a4f49b95bef8f6d876a3fc68fef6a86faaf9fa91afe8623bd57d255a0
157
SIZE (xpi/firefox-i18n-59.0.2/ro.xpi) = 453403
157
SIZE (xpi/firefox-i18n-60.0b12/rm.xpi) = 504467
158
SHA256 (xpi/firefox-i18n-59.0.2/ru.xpi) = 2554a16e953fe70e923778fac94aff135cec1dc83177b8d01c3062a27da3b8d6
158
SHA256 (xpi/firefox-i18n-60.0b12/ro.xpi) = 46fe276aed3cee517d385d0dedcd55afecc06632a5d133a05dd217116db94e5e
159
SIZE (xpi/firefox-i18n-59.0.2/ru.xpi) = 526523
159
SIZE (xpi/firefox-i18n-60.0b12/ro.xpi) = 511962
160
SHA256 (xpi/firefox-i18n-59.0.2/si.xpi) = 5a34546cefac845cb6131382cb04771ae20f18a6eb6c058cab582419cc9324e9
160
SHA256 (xpi/firefox-i18n-60.0b12/ru.xpi) = cc5796d905b7eb58f0620421b336e1b07a2073af0e9fbcad285e7ad43d9c9b8c
161
SIZE (xpi/firefox-i18n-59.0.2/si.xpi) = 492588
161
SIZE (xpi/firefox-i18n-60.0b12/ru.xpi) = 588199
162
SHA256 (xpi/firefox-i18n-59.0.2/sk.xpi) = 34f7705c36c88f20ba2bcafd09b6ada3c90ae5d71acd4b7747ac60cce70c222c
162
SHA256 (xpi/firefox-i18n-60.0b12/si.xpi) = a0387dc2d8a670e20fc4e87b8f64864077c0afffea066a82f6bd8785a5e81c65
163
SIZE (xpi/firefox-i18n-59.0.2/sk.xpi) = 480813
163
SIZE (xpi/firefox-i18n-60.0b12/si.xpi) = 544117
164
SHA256 (xpi/firefox-i18n-59.0.2/sl.xpi) = 19d8af678cd2874a37bc5f5836e030d0e04c64de5f3cab994f25dc27c48048ae
164
SHA256 (xpi/firefox-i18n-60.0b12/sk.xpi) = 080e3c86e56f12fde3f578d901e5f8d94fdaedd1eb239b3bec080242b2ce2fbd
165
SIZE (xpi/firefox-i18n-59.0.2/sl.xpi) = 458824
165
SIZE (xpi/firefox-i18n-60.0b12/sk.xpi) = 537940
166
SHA256 (xpi/firefox-i18n-59.0.2/son.xpi) = f6d897f43b61d7b476cf0bbdfaa9bb09c97e1b923ed93ebaa45796da17d5815a
166
SHA256 (xpi/firefox-i18n-60.0b12/sl.xpi) = 0cfd44f86deeb85665d21688076cc9b12081900e607a486b82b68e0355cc0868
167
SIZE (xpi/firefox-i18n-59.0.2/son.xpi) = 446400
167
SIZE (xpi/firefox-i18n-60.0b12/sl.xpi) = 514729
168
SHA256 (xpi/firefox-i18n-59.0.2/sq.xpi) = dd0fa029de2d70ac4982d2ec5d904a8543126198080ae8a45b1037100dfc1454
168
SHA256 (xpi/firefox-i18n-60.0b12/son.xpi) = 36f54dfc8405a2a0a4d271d98055b92fccf5ac3e085c47d09128be47c1aa5d59
169
SIZE (xpi/firefox-i18n-59.0.2/sq.xpi) = 464463
169
SIZE (xpi/firefox-i18n-60.0b12/son.xpi) = 496054
170
SHA256 (xpi/firefox-i18n-59.0.2/sr.xpi) = ff0e506cfde1150867113f1fadf49a075c7b39ec1273254fd1c825c7aa3fc61d
170
SHA256 (xpi/firefox-i18n-60.0b12/sq.xpi) = 4abbe0c817c473cc32e8ea84182e11ea215276aee355d650c344f3496b2acd79
171
SIZE (xpi/firefox-i18n-59.0.2/sr.xpi) = 486178
171
SIZE (xpi/firefox-i18n-60.0b12/sq.xpi) = 519631
172
SHA256 (xpi/firefox-i18n-59.0.2/sv-SE.xpi) = 0062281cc43f2b132663a690eaaaac8c483196daed5fc1c8f1de02b59005ad70
172
SHA256 (xpi/firefox-i18n-60.0b12/sr.xpi) = 2eb45d422246b8b8f02eba19baddb90d7cfc596933f5ada048a6fc260ac49678
173
SIZE (xpi/firefox-i18n-59.0.2/sv-SE.xpi) = 458659
173
SIZE (xpi/firefox-i18n-60.0b12/sr.xpi) = 546784
174
SHA256 (xpi/firefox-i18n-59.0.2/ta.xpi) = 12d92d14cdb6aba7228cf634da62ba2ebca3210ed4db9119f4ba2d7c9c8296fc
174
SHA256 (xpi/firefox-i18n-60.0b12/sv-SE.xpi) = 4fd0d7b68a5956f6bb4c12d8b45605ba5e4ac9ea3467993e32ee07191544c353
175
SIZE (xpi/firefox-i18n-59.0.2/ta.xpi) = 512843
175
SIZE (xpi/firefox-i18n-60.0b12/sv-SE.xpi) = 515846
176
SHA256 (xpi/firefox-i18n-59.0.2/te.xpi) = 7026e14f3760b906048d45d25eaa73d0f2a657614eb07ba3a567803b4daf2bfe
176
SHA256 (xpi/firefox-i18n-60.0b12/ta.xpi) = 9b93d35afc8126cf2434b2bb72a92e5ff1f1855b6fe4d019dddf74fe27c4b9e3
177
SIZE (xpi/firefox-i18n-59.0.2/te.xpi) = 527083
177
SIZE (xpi/firefox-i18n-60.0b12/ta.xpi) = 572413
178
SHA256 (xpi/firefox-i18n-59.0.2/th.xpi) = 226efaa18781edc8c5ffec902c2a00047d3a0796507c9799134a5fe0517b2cc9
178
SHA256 (xpi/firefox-i18n-60.0b12/te.xpi) = c297db02cf724d0f1500a8a59273878f47abab713fad86d3359e8609dc2e0052
179
SIZE (xpi/firefox-i18n-59.0.2/th.xpi) = 498544
179
SIZE (xpi/firefox-i18n-60.0b12/te.xpi) = 588324
180
SHA256 (xpi/firefox-i18n-59.0.2/tr.xpi) = a39db56a64511ced3451aac4cb6d6dad6e3d49f7a60e074742b08a492a04580c
180
SHA256 (xpi/firefox-i18n-60.0b12/th.xpi) = f5d19a073ee824805d22015b23be82cefe64e81f556e61e2676b742b37a4e901
181
SIZE (xpi/firefox-i18n-59.0.2/tr.xpi) = 463593
181
SIZE (xpi/firefox-i18n-60.0b12/th.xpi) = 559792
182
SHA256 (xpi/firefox-i18n-59.0.2/uk.xpi) = f4b96792dbca4b8de74dccce1b51d5c4e6d0cd2509ef2573c1f992f37dd71c32
182
SHA256 (xpi/firefox-i18n-60.0b12/tr.xpi) = 6000688caf19f8744107b419cb6436f1a59bdea873abb5cfb3a4f31c8f8fb1be
183
SIZE (xpi/firefox-i18n-59.0.2/uk.xpi) = 516926
183
SIZE (xpi/firefox-i18n-60.0b12/tr.xpi) = 523888
184
SHA256 (xpi/firefox-i18n-59.0.2/ur.xpi) = 06eea9f0bde0e5d3299e59d76cbc486a5a9e4d36f6ee9e262b2199bb45967b59
184
SHA256 (xpi/firefox-i18n-60.0b12/uk.xpi) = 143d58d29e46588b409cbf4623fa5beda8b691a6b77b6eddbdafe47fc0a443aa
185
SIZE (xpi/firefox-i18n-59.0.2/ur.xpi) = 507379
185
SIZE (xpi/firefox-i18n-60.0b12/uk.xpi) = 578924
186
SHA256 (xpi/firefox-i18n-59.0.2/uz.xpi) = 16f3a699afa42f645c0276b53be27d93f35f21f20289206431be0da811e3fe34
186
SHA256 (xpi/firefox-i18n-60.0b12/ur.xpi) = 7a2ef4f02b1720938962226e6c267b2902f6413b5ec4cd378c2aa96bde6a413d
187
SIZE (xpi/firefox-i18n-59.0.2/uz.xpi) = 456923
187
SIZE (xpi/firefox-i18n-60.0b12/ur.xpi) = 561995
188
SHA256 (xpi/firefox-i18n-59.0.2/vi.xpi) = b1abb414442450d836094dcae26268c61608102e31d745b717efdc92e05fd760
188
SHA256 (xpi/firefox-i18n-60.0b12/uz.xpi) = f5e2f25734862433b8cfd2aca802a237efd80b9490a436371146d09cf27f7be1
189
SIZE (xpi/firefox-i18n-59.0.2/vi.xpi) = 470069
189
SIZE (xpi/firefox-i18n-60.0b12/uz.xpi) = 508608
190
SHA256 (xpi/firefox-i18n-59.0.2/xh.xpi) = 7de47e610d82ec7ed7a57d830ef20c4a113770fdc659f19c47c17f4465a9e83b
190
SHA256 (xpi/firefox-i18n-60.0b12/vi.xpi) = ffc8fd7f604bcfce12aa945dc66ef15e944b27a2738eb1b0eded84aada3d7f1e
191
SIZE (xpi/firefox-i18n-59.0.2/xh.xpi) = 460772
191
SIZE (xpi/firefox-i18n-60.0b12/vi.xpi) = 526682
192
SHA256 (xpi/firefox-i18n-59.0.2/zh-CN.xpi) = 1e30757d37bb8f13bec733e302e393204bc5f9c9b859465252b25ae053e87b27
192
SHA256 (xpi/firefox-i18n-60.0b12/xh.xpi) = 908a459c6100afbeb414fa4a14809474837274a888c357ad1afe6503e981ed31
193
SIZE (xpi/firefox-i18n-59.0.2/zh-CN.xpi) = 483449
193
SIZE (xpi/firefox-i18n-60.0b12/xh.xpi) = 510246
194
SHA256 (xpi/firefox-i18n-59.0.2/zh-TW.xpi) = 5d852b837ce85c5a7bb4a4e95655bba83ca3e428a20b252c023125cc55e538a4
194
SHA256 (xpi/firefox-i18n-60.0b12/zh-CN.xpi) = dada2525fb8c325596eedc032ded65f4abc689fb0f0b0eb2d0406c4fa0221933
195
SIZE (xpi/firefox-i18n-59.0.2/zh-TW.xpi) = 477089
195
SIZE (xpi/firefox-i18n-60.0b12/zh-CN.xpi) = 541637
196
SHA256 (xpi/firefox-i18n-60.0b12/zh-TW.xpi) = 21476675d26ade3846c2329a14c9ab525c16c1cdbc8269a704f0676c2682b0f1
197
SIZE (xpi/firefox-i18n-60.0b12/zh-TW.xpi) = 539937
(-)b/www/firefox/Makefile (-15 / +12 lines)
Lines 2-29 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	firefox
4
PORTNAME=	firefox
5
DISTVERSION=	59.0.2
5
DISTVERSION=	60.0b12
6
PORTREVISION=	4
7
PORTEPOCH=	1
6
PORTEPOCH=	1
8
CATEGORIES=	www ipv6
7
CATEGORIES=	www ipv6
9
MASTER_SITES=	https://hg.mozilla.org/releases/mozilla-release/archive/
8
MASTER_SITES=	MOZILLA/${PORTNAME}/releases/${DISTVERSION}/source \
10
DISTNAME=	${MASTER_SITES:M*hg*:S,/archive/,,:T}-239e434d6d2b8e1e2b697c3416d1e96d48fe98e5
9
		MOZILLA/${PORTNAME}/candidates/${DISTVERSION}-candidates/build1/source
11
DISTFILES=	${DISTNAME:C/.*-//}${EXTRACT_SUFX}
10
DISTNAME=	${PORTNAME}-${PORTVERSION:R}
12
DIST_SUBDIR=	firefox
11
DISTFILES=	${DISTNAME}${PORTVERSION:E}.source${EXTRACT_SUFX}
13
12
14
MAINTAINER=	gecko@FreeBSD.org
13
MAINTAINER=	gecko@FreeBSD.org
15
COMMENT=	Web browser based on the browser portion of Mozilla
14
COMMENT=	Web browser based on the browser portion of Mozilla
16
15
17
BUILD_DEPENDS=	nspr>=4.18:devel/nspr \
16
BUILD_DEPENDS=	nspr>=4.19:devel/nspr \
18
		nss>=3.35:security/nss \
17
		nss>=3.36.1:security/nss \
19
		icu>=59.1,1:devel/icu \
18
		icu>=59.1,1:devel/icu \
20
		libevent>=2.1.8:devel/libevent \
19
		libevent>=2.1.8:devel/libevent \
21
		harfbuzz>=1.7.4:print/harfbuzz \
20
		harfbuzz>=1.7.6:print/harfbuzz \
22
		graphite2>=1.3.10:graphics/graphite2 \
21
		graphite2>=1.3.11:graphics/graphite2 \
23
		png>=1.6.34:graphics/png \
22
		png>=1.6.34:graphics/png \
24
		libvorbis>=1.3.5,3:audio/libvorbis \
23
		libvorbis>=1.3.6,3:audio/libvorbis \
25
		libvpx>=1.5.0:multimedia/libvpx \
24
		libvpx>=1.5.0:multimedia/libvpx \
26
		sqlite3>=3.21.0:databases/sqlite3 \
25
		sqlite3>=3.22.0:databases/sqlite3 \
27
		${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3@${PY_FLAVOR} \
26
		${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3@${PY_FLAVOR} \
28
		v4l_compat>0:multimedia/v4l_compat \
27
		v4l_compat>0:multimedia/v4l_compat \
29
		autoconf-2.13:devel/autoconf213 \
28
		autoconf-2.13:devel/autoconf213 \
Lines 31-45 BUILD_DEPENDS= nspr>=4.18:devel/nspr \ Link Here
31
		zip:archivers/zip
30
		zip:archivers/zip
32
#		soundtouch>=1.9.0:audio/soundtouch \
31
#		soundtouch>=1.9.0:audio/soundtouch \
33
32
34
LIB_DEPENDS=	libv4l2.so:multimedia/libv4l
35
36
USE_GECKO=	gecko
33
USE_GECKO=	gecko
37
CONFLICTS_INSTALL=	firefox-esr
34
CONFLICTS_INSTALL=	firefox-esr
38
MOZ_PKGCONFIG_FILES=	# empty
35
MOZ_PKGCONFIG_FILES=	# empty
39
USE_MOZILLA=	-cairo -soundtouch
36
USE_MOZILLA=	-cairo -soundtouch
40
37
41
USE_GL=		gl
38
USE_GL=		gl
42
USES=		tar:bz2
39
USES=		tar:xz
43
40
44
FIREFOX_ICON=		${MOZILLA}.png
41
FIREFOX_ICON=		${MOZILLA}.png
45
FIREFOX_ICON_SRC=	${PREFIX}/lib/${MOZILLA}/browser/chrome/icons/default/default48.png
42
FIREFOX_ICON_SRC=	${PREFIX}/lib/${MOZILLA}/browser/chrome/icons/default/default48.png
(-)b/www/firefox/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1521751601
1
TIMESTAMP = 1523564700
2
SHA256 (firefox/239e434d6d2b8e1e2b697c3416d1e96d48fe98e5.tar.bz2) = 5b7382ac0697e2abce5e2873878069a47fff5f3a5eeec4c3a0186598a1592833
2
SHA256 (firefox-60.0b12.source.tar.xz) = 296c80075131b4076941fcbdd74b36bffd94ba9206d5950b4aa03ba3ac86810e
3
SIZE (firefox/239e434d6d2b8e1e2b697c3416d1e96d48fe98e5.tar.bz2) = 304965099
3
SIZE (firefox-60.0b12.source.tar.xz) = 270813524
(-)b/www/firefox/files/patch-bug1021761 (-207 / +258 lines)
Lines 1-150 Link Here
1
diff --git build/moz.configure/old.configure build/moz.configure/old.configure
1
commit f9bcf9c81c4a
2
index cd6c37cf4c7c..e98dc7973a6a 100644
2
Author: Evgeniy Vodolazskiy <waterlaz@gmail.com>
3
--- build/moz.configure/old.configure
3
Date:   Tue Sep 9 14:38:00 2014 -0700
4
+++ build/moz.configure/old.configure
4
5
@@ -275,6 +275,7 @@ def old_configure_options(*options):
5
    Bug 1021761 - Make ALSA optional on Linux, allowing fallback to another backend. r=kinetik r=glandium
6
     '--with-nspr-prefix',
6
---
7
     '--with-nss-exec-prefix',
7
 media/libcubeb/gtest/moz.build  |   1 -
8
     '--with-nss-prefix',
8
 media/libcubeb/src/cubeb_alsa.c | 228 +++++++++++++++++++++++++++++-----------
9
+    '--with-oss',
9
 toolkit/library/moz.build       |   3 -
10
     '--with-pthreads',
10
 3 files changed, 168 insertions(+), 64 deletions(-)
11
     '--with-qemu-exe',
11
12
     '--with-sixgill',
12
diff --git media/libcubeb/gtest/moz.build media/libcubeb/gtest/moz.build
13
diff --git old-configure.in old-configure.in
13
index 558130188c2e..0cf157d41903 100644
14
index dff46614635e..dbbfdb76ab78 100644
14
--- media/libcubeb/gtest/moz.build
15
--- old-configure.in
15
+++ media/libcubeb/gtest/moz.build
16
+++ old-configure.in
16
@@ -72,7 +72,6 @@ elif CONFIG['OS_TARGET'] == 'OpenBSD':
17
@@ -3128,6 +3128,67 @@ AC_DEFINE(MOZ_WEBM_ENCODER)
17
         'sndio',
18
 AC_SUBST(MOZ_WEBM_ENCODER)
18
     ]
19
 
19
 else:
20
 dnl ==================================
20
-    OS_LIBS += CONFIG['MOZ_ALSA_LIBS']
21
+dnl = Check OSS availability
21
     OS_LIBS += CONFIG['MOZ_PULSEAUDIO_LIBS']
22
+dnl ==================================
23
+
24
+dnl If using Linux, Solaris or BSDs, ensure that OSS is available
25
+case "$OS_TARGET" in
26
+Linux|SunOS|DragonFly|FreeBSD|NetBSD|GNU/kFreeBSD)
27
+    MOZ_OSS=1
28
+    ;;
29
+esac
30
+
31
+MOZ_ARG_WITH_STRING(oss,
32
+[  --with-oss[=PFX]        Enable OpenSoundSystem support [installed at prefix PFX]],
33
+   OSSPREFIX=$withval)
34
+
35
+if test -n "$OSSPREFIX"; then
36
+    if test "$OSSPREFIX" != "no"; then
37
+        MOZ_OSS=1
38
+    else
39
+        MOZ_OSS=
40
+    fi
41
+fi
42
+
43
+_SAVE_CFLAGS=$CFLAGS
44
+_SAVE_LIBS=$LIBS
45
+if test -n "$MOZ_OSS"; then
46
+    dnl Prefer 4Front implementation
47
+    AC_MSG_CHECKING([MOZ_OSS_CFLAGS])
48
+    if test "$OSSPREFIX" != "yes"; then
49
+        oss_conf=${OSSPREFIX%/usr}/etc/oss.conf
50
+        if test -f "$oss_conf"; then
51
+            . "$oss_conf"
52
+        else
53
+            OSSLIBDIR=$OSSPREFIX/lib/oss
54
+        fi
55
+        if test -d "$OSSLIBDIR"; then
56
+            MOZ_OSS_CFLAGS="$MOZ_OSS_CFLAGS -I$OSSLIBDIR/include"
57
+        fi
58
+    fi
59
+    AC_MSG_RESULT([$MOZ_OSS_CFLAGS])
60
+
61
+    CFLAGS="$CFLAGS $MOZ_OSS_CFLAGS"
62
+    MOZ_CHECK_HEADERS(sys/soundcard.h soundcard.h)
63
+
64
+    if test "$ac_cv_header_sys_soundcard_h" != "yes" -a \
65
+            "$ac_cv_header_soundcard_h" != "yes"; then
66
+        AC_MSG_ERROR([Need OSS for Ogg, Wave or WebM decoding on $OS_TARGET.  Disable with --without-oss.])
67
+    fi
68
+
69
+    dnl Assume NetBSD implementation over SunAudio
70
+    AC_CHECK_LIB(ossaudio, _oss_ioctl,
71
+        [AC_DEFINE_UNQUOTED(CUBEB_OSS_DEFAULT_OUTPUT, "/dev/sound")
72
+         MOZ_OSS_LIBS="$MOZ_OSS_LIBS -lossaudio"])
73
+fi
74
+CFLAGS=$_SAVE_CFLAGS
75
+LIBS=$_SAVE_LIBS
76
+
77
+AC_SUBST(MOZ_OSS)
78
+AC_SUBST_LIST(MOZ_OSS_CFLAGS)
79
+AC_SUBST_LIST(MOZ_OSS_LIBS)
80
+
81
+dnl ==================================
82
 dnl = Check alsa availability on Linux
83
 dnl ==================================
84
 
85
diff --git dom/media/CubebUtils.cpp dom/media/CubebUtils.cpp
86
index e10e07e06ade..1fd561bea113 100644
87
--- dom/media/CubebUtils.cpp
88
+++ dom/media/CubebUtils.cpp
89
@@ -71,7 +71,8 @@ const char* AUDIOSTREAM_BACKEND_ID_STR[] = {
90
   "sndio",
91
   "opensl",
92
   "audiotrack",
93
-  "kai"
94
+  "kai",
95
+  "oss",
96
 };
97
 /* Index for failures to create an audio stream the first time. */
98
 const int CUBEB_BACKEND_INIT_FAILURE_FIRST =
99
diff --git media/libcubeb/AUTHORS media/libcubeb/AUTHORS
100
index 0fde65baad34..f8663c43b475 100644
101
--- media/libcubeb/AUTHORS
102
+++ media/libcubeb/AUTHORS
103
@@ -4,6 +4,7 @@ Michael Wu <mwu@mozilla.com>
104
 Paul Adenot <paul@paul.cx>
105
 David Richards <drichards@mozilla.com>
106
 Sebastien Alaiwan <sebastien.alaiwan@gmail.com>
107
+Evgeniy Vodolazskiy <waterlaz@gmail.com>
108
 KO Myung-Hun <komh@chollian.net>
109
 Haakon Sporsheim <haakon.sporsheim@telenordigital.com>
110
 Alex Chronopoulos <achronop@gmail.com>
111
diff --git media/libcubeb/src/cubeb.c media/libcubeb/src/cubeb.c
112
index 57bcb4c13652..68be024f4a68 100644
113
--- media/libcubeb/src/cubeb.c
114
+++ media/libcubeb/src/cubeb.c
115
@@ -54,6 +54,9 @@ int audiotrack_init(cubeb ** context, char const * context_name);
116
 #if defined(USE_KAI)
117
 int kai_init(cubeb ** context, char const * context_name);
118
 #endif
119
+#if defined(USE_OSS)
120
+int oss_init(cubeb ** context, char const * context_name);
121
+#endif
122
 
123
 static int
124
 validate_stream_params(cubeb_stream_params * input_stream_params,
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
137
 #if defined(USE_KAI)
138
     kai_init,
139
 #endif
140
+#if defined(USE_OSS)
141
+    oss_init,
142
+#endif
143
   };
144
   int i;
145
 
22
 
23
 if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
146
diff --git media/libcubeb/src/cubeb_alsa.c media/libcubeb/src/cubeb_alsa.c
24
diff --git media/libcubeb/src/cubeb_alsa.c media/libcubeb/src/cubeb_alsa.c
147
index 05ad27fef53b..3ea78e994f59 100644
25
index bfd4d8f199d4..213c1eaa3d07 100644
148
--- media/libcubeb/src/cubeb_alsa.c
26
--- media/libcubeb/src/cubeb_alsa.c
149
+++ media/libcubeb/src/cubeb_alsa.c
27
+++ media/libcubeb/src/cubeb_alsa.c
150
@@ -12,6 +12,7 @@
28
@@ -12,6 +12,7 @@
Lines 217-223 index 05ad27fef53b..3ea78e994f59 100644 Link Here
217
 };
95
 };
218
 
96
 
219
 enum stream_state {
97
 enum stream_state {
220
@@ -243,8 +292,8 @@ set_timeout(struct timeval * timeout, unsigned int ms)
98
@@ -245,8 +294,8 @@ set_timeout(struct timeval * timeout, unsigned int ms)
221
 static void
99
 static void
222
 stream_buffer_decrement(cubeb_stream * stm, long count)
100
 stream_buffer_decrement(cubeb_stream * stm, long count)
223
 {
101
 {
Lines 228-234 index 05ad27fef53b..3ea78e994f59 100644 Link Here
228
   stm->bufframes -= count;
106
   stm->bufframes -= count;
229
 }
107
 }
230
 
108
 
231
@@ -276,9 +325,9 @@ alsa_process_stream(cubeb_stream * stm)
109
@@ -278,9 +327,9 @@ alsa_process_stream(cubeb_stream * stm)
232
   /* Call _poll_descriptors_revents() even if we don't use it
110
   /* Call _poll_descriptors_revents() even if we don't use it
233
      to let underlying plugins clear null events.  Otherwise poll()
111
      to let underlying plugins clear null events.  Otherwise poll()
234
      may wake up again and again, producing unnecessary CPU usage. */
112
      may wake up again and again, producing unnecessary CPU usage. */
Lines 240-246 index 05ad27fef53b..3ea78e994f59 100644 Link Here
240
 
118
 
241
   /* Got null event? Bail and wait for another wakeup. */
119
   /* Got null event? Bail and wait for another wakeup. */
242
   if (avail == 0) {
120
   if (avail == 0) {
243
@@ -301,7 +350,7 @@ alsa_process_stream(cubeb_stream * stm)
121
@@ -303,7 +352,7 @@ alsa_process_stream(cubeb_stream * stm)
244
       // TODO: should it be marked as DRAINING?
122
       // TODO: should it be marked as DRAINING?
245
     }
123
     }
246
 
124
 
Lines 249-255 index 05ad27fef53b..3ea78e994f59 100644 Link Here
249
 
127
 
250
     if (got < 0) {
128
     if (got < 0) {
251
       avail = got; // the error handler below will recover us
129
       avail = got; // the error handler below will recover us
252
@@ -345,7 +394,7 @@ alsa_process_stream(cubeb_stream * stm)
130
@@ -347,7 +396,7 @@ alsa_process_stream(cubeb_stream * stm)
253
       (!stm->other_stream || stm->other_stream->bufframes > 0)) {
131
       (!stm->other_stream || stm->other_stream->bufframes > 0)) {
254
     long got = avail - stm->bufframes;
132
     long got = avail - stm->bufframes;
255
     void * other_buffer = stm->other_stream ? stm->other_stream->buffer : NULL;
133
     void * other_buffer = stm->other_stream ? stm->other_stream->buffer : NULL;
Lines 258-264 index 05ad27fef53b..3ea78e994f59 100644 Link Here
258
 
136
 
259
     /* Correct read size to the other stream available frames */
137
     /* Correct read size to the other stream available frames */
260
     if (stm->other_stream && got > (snd_pcm_sframes_t) stm->other_stream->bufframes) {
138
     if (stm->other_stream && got > (snd_pcm_sframes_t) stm->other_stream->bufframes) {
261
@@ -372,8 +421,8 @@ alsa_process_stream(cubeb_stream * stm)
139
@@ -374,8 +423,8 @@ alsa_process_stream(cubeb_stream * stm)
262
     long drain_frames = avail - stm->bufframes;
140
     long drain_frames = avail - stm->bufframes;
263
     double drain_time = (double) drain_frames / stm->params.rate;
141
     double drain_time = (double) drain_frames / stm->params.rate;
264
 
142
 
Lines 269-275 index 05ad27fef53b..3ea78e994f59 100644 Link Here
269
     stm->bufframes = avail;
147
     stm->bufframes = avail;
270
 
148
 
271
     /* Mark as draining, unless we're waiting for capture */
149
     /* Mark as draining, unless we're waiting for capture */
272
@@ -400,7 +449,7 @@ alsa_process_stream(cubeb_stream * stm)
150
@@ -402,7 +451,7 @@ alsa_process_stream(cubeb_stream * stm)
273
       }
151
       }
274
     }
152
     }
275
 
153
 
Lines 278-284 index 05ad27fef53b..3ea78e994f59 100644 Link Here
278
     if (wrote < 0) {
156
     if (wrote < 0) {
279
       avail = wrote; // the error handler below will recover us
157
       avail = wrote; // the error handler below will recover us
280
     } else {
158
     } else {
281
@@ -413,13 +462,13 @@ alsa_process_stream(cubeb_stream * stm)
159
@@ -415,13 +464,13 @@ alsa_process_stream(cubeb_stream * stm)
282
 
160
 
283
   /* Got some error? Let's try to recover the stream. */
161
   /* Got some error? Let's try to recover the stream. */
284
   if (avail < 0) {
162
   if (avail < 0) {
Lines 295-301 index 05ad27fef53b..3ea78e994f59 100644 Link Here
295
     }
173
     }
296
   }
174
   }
297
 
175
 
298
@@ -535,26 +584,26 @@ get_slave_pcm_node(snd_config_t * lconf, snd_config_t * root_pcm)
176
@@ -537,26 +586,26 @@ get_slave_pcm_node(snd_config_t * lconf, snd_config_t * root_pcm)
299
 
177
 
300
   slave_def = NULL;
178
   slave_def = NULL;
301
 
179
 
Lines 327-333 index 05ad27fef53b..3ea78e994f59 100644 Link Here
327
     if (r < 0) {
205
     if (r < 0) {
328
       break;
206
       break;
329
     }
207
     }
330
@@ -563,7 +612,7 @@ get_slave_pcm_node(snd_config_t * lconf, snd_config_t * root_pcm)
208
@@ -565,7 +614,7 @@ get_slave_pcm_node(snd_config_t * lconf, snd_config_t * root_pcm)
331
     if (r < 0 || r > (int) sizeof(node_name)) {
209
     if (r < 0 || r > (int) sizeof(node_name)) {
332
       break;
210
       break;
333
     }
211
     }
Lines 336-342 index 05ad27fef53b..3ea78e994f59 100644 Link Here
336
     if (r < 0) {
214
     if (r < 0) {
337
       break;
215
       break;
338
     }
216
     }
339
@@ -572,7 +621,7 @@ get_slave_pcm_node(snd_config_t * lconf, snd_config_t * root_pcm)
217
@@ -574,7 +623,7 @@ get_slave_pcm_node(snd_config_t * lconf, snd_config_t * root_pcm)
340
   } while (0);
218
   } while (0);
341
 
219
 
342
   if (slave_def) {
220
   if (slave_def) {
Lines 345-351 index 05ad27fef53b..3ea78e994f59 100644 Link Here
345
   }
223
   }
346
 
224
 
347
   return NULL;
225
   return NULL;
348
@@ -595,22 +644,22 @@ init_local_config_with_workaround(char const * pcm_name)
226
@@ -597,22 +646,22 @@ init_local_config_with_workaround(char const * pcm_name)
349
 
227
 
350
   lconf = NULL;
228
   lconf = NULL;
351
 
229
 
Lines 372-378 index 05ad27fef53b..3ea78e994f59 100644 Link Here
372
     if (r < 0) {
250
     if (r < 0) {
373
       break;
251
       break;
374
     }
252
     }
375
@@ -619,7 +668,7 @@ init_local_config_with_workaround(char const * pcm_name)
253
@@ -621,7 +670,7 @@ init_local_config_with_workaround(char const * pcm_name)
376
     if (r < 0 || r > (int) sizeof(node_name)) {
254
     if (r < 0 || r > (int) sizeof(node_name)) {
377
       break;
255
       break;
378
     }
256
     }
Lines 381-387 index 05ad27fef53b..3ea78e994f59 100644 Link Here
381
     if (r < 0) {
259
     if (r < 0) {
382
       break;
260
       break;
383
     }
261
     }
384
@@ -630,12 +679,12 @@ init_local_config_with_workaround(char const * pcm_name)
262
@@ -632,12 +681,12 @@ init_local_config_with_workaround(char const * pcm_name)
385
     }
263
     }
386
 
264
 
387
     /* Fetch the PCM node's type, and bail out if it's not the PulseAudio plugin. */
265
     /* Fetch the PCM node's type, and bail out if it's not the PulseAudio plugin. */
Lines 396-402 index 05ad27fef53b..3ea78e994f59 100644 Link Here
396
     if (r < 0) {
274
     if (r < 0) {
397
       break;
275
       break;
398
     }
276
     }
399
@@ -646,18 +695,18 @@ init_local_config_with_workaround(char const * pcm_name)
277
@@ -648,18 +697,18 @@ init_local_config_with_workaround(char const * pcm_name)
400
 
278
 
401
     /* Don't clobber an explicit existing handle_underrun value, set it only
279
     /* Don't clobber an explicit existing handle_underrun value, set it only
402
        if it doesn't already exist. */
280
        if it doesn't already exist. */
Lines 418-424 index 05ad27fef53b..3ea78e994f59 100644 Link Here
418
     if (r < 0) {
296
     if (r < 0) {
419
       break;
297
       break;
420
     }
298
     }
421
@@ -665,7 +714,7 @@ init_local_config_with_workaround(char const * pcm_name)
299
@@ -667,7 +716,7 @@ init_local_config_with_workaround(char const * pcm_name)
422
     return lconf;
300
     return lconf;
423
   } while (0);
301
   } while (0);
424
 
302
 
Lines 427-433 index 05ad27fef53b..3ea78e994f59 100644 Link Here
427
 
305
 
428
   return NULL;
306
   return NULL;
429
 }
307
 }
430
@@ -677,9 +726,9 @@ alsa_locked_pcm_open(snd_pcm_t ** pcm, char const * pcm_name, snd_pcm_stream_t s
308
@@ -679,9 +728,9 @@ alsa_locked_pcm_open(snd_pcm_t ** pcm, char const * pcm_name, snd_pcm_stream_t s
431
 
309
 
432
   pthread_mutex_lock(&cubeb_alsa_mutex);
310
   pthread_mutex_lock(&cubeb_alsa_mutex);
433
   if (local_config) {
311
   if (local_config) {
Lines 439-445 index 05ad27fef53b..3ea78e994f59 100644 Link Here
439
   }
317
   }
440
   pthread_mutex_unlock(&cubeb_alsa_mutex);
318
   pthread_mutex_unlock(&cubeb_alsa_mutex);
441
 
319
 
442
@@ -692,7 +741,7 @@ alsa_locked_pcm_close(snd_pcm_t * pcm)
320
@@ -694,7 +743,7 @@ alsa_locked_pcm_close(snd_pcm_t * pcm)
443
   int r;
321
   int r;
444
 
322
 
445
   pthread_mutex_lock(&cubeb_alsa_mutex);
323
   pthread_mutex_lock(&cubeb_alsa_mutex);
Lines 448-454 index 05ad27fef53b..3ea78e994f59 100644 Link Here
448
   pthread_mutex_unlock(&cubeb_alsa_mutex);
326
   pthread_mutex_unlock(&cubeb_alsa_mutex);
449
 
327
 
450
   return r;
328
   return r;
451
@@ -755,12 +804,65 @@ alsa_init(cubeb ** context, char const * context_name)
329
@@ -757,12 +806,65 @@ alsa_init(cubeb ** context, char const * context_name)
452
   pthread_attr_t attr;
330
   pthread_attr_t attr;
453
   snd_pcm_t * dummy;
331
   snd_pcm_t * dummy;
454
 
332
 
Lines 515-521 index 05ad27fef53b..3ea78e994f59 100644 Link Here
515
     cubeb_alsa_error_handler_set = 1;
393
     cubeb_alsa_error_handler_set = 1;
516
   }
394
   }
517
   pthread_mutex_unlock(&cubeb_alsa_mutex);
395
   pthread_mutex_unlock(&cubeb_alsa_mutex);
518
@@ -768,6 +870,8 @@ alsa_init(cubeb ** context, char const * context_name)
396
@@ -770,6 +872,8 @@ alsa_init(cubeb ** context, char const * context_name)
519
   ctx = calloc(1, sizeof(*ctx));
397
   ctx = calloc(1, sizeof(*ctx));
520
   assert(ctx);
398
   assert(ctx);
521
 
399
 
Lines 524-530 index 05ad27fef53b..3ea78e994f59 100644 Link Here
524
   ctx->ops = &alsa_ops;
402
   ctx->ops = &alsa_ops;
525
 
403
 
526
   r = pthread_mutex_init(&ctx->mutex, NULL);
404
   r = pthread_mutex_init(&ctx->mutex, NULL);
527
@@ -817,7 +921,7 @@ alsa_init(cubeb ** context, char const * context_name)
405
@@ -819,7 +923,7 @@ alsa_init(cubeb ** context, char const * context_name)
528
        config fails with EINVAL, the PA PCM is too old for this workaround. */
406
        config fails with EINVAL, the PA PCM is too old for this workaround. */
529
     if (r == -EINVAL) {
407
     if (r == -EINVAL) {
530
       pthread_mutex_lock(&cubeb_alsa_mutex);
408
       pthread_mutex_lock(&cubeb_alsa_mutex);
Lines 533-539 index 05ad27fef53b..3ea78e994f59 100644 Link Here
533
       pthread_mutex_unlock(&cubeb_alsa_mutex);
411
       pthread_mutex_unlock(&cubeb_alsa_mutex);
534
       ctx->local_config = NULL;
412
       ctx->local_config = NULL;
535
     } else if (r >= 0) {
413
     } else if (r >= 0) {
536
@@ -857,9 +961,13 @@ alsa_destroy(cubeb * ctx)
414
@@ -859,9 +963,13 @@ alsa_destroy(cubeb * ctx)
537
   pthread_mutex_destroy(&ctx->mutex);
415
   pthread_mutex_destroy(&ctx->mutex);
538
   free(ctx->fds);
416
   free(ctx->fds);
539
 
417
 
Lines 548-554 index 05ad27fef53b..3ea78e994f59 100644 Link Here
548
     pthread_mutex_unlock(&cubeb_alsa_mutex);
426
     pthread_mutex_unlock(&cubeb_alsa_mutex);
549
   }
427
   }
550
 
428
 
551
@@ -939,7 +1047,7 @@ alsa_stream_init_single(cubeb * ctx, cubeb_stream ** stream, char const * stream
429
@@ -948,7 +1056,7 @@ alsa_stream_init_single(cubeb * ctx, cubeb_stream ** stream, char const * stream
552
     return CUBEB_ERROR;
430
     return CUBEB_ERROR;
553
   }
431
   }
554
 
432
 
Lines 557-563 index 05ad27fef53b..3ea78e994f59 100644 Link Here
557
   assert(r == 0);
435
   assert(r == 0);
558
 
436
 
559
   latency_us = latency_frames * 1e6 / stm->params.rate;
437
   latency_us = latency_frames * 1e6 / stm->params.rate;
560
@@ -952,7 +1060,7 @@ alsa_stream_init_single(cubeb * ctx, cubeb_stream ** stream, char const * stream
438
@@ -961,7 +1069,7 @@ alsa_stream_init_single(cubeb * ctx, cubeb_stream ** stream, char const * stream
561
     latency_us = latency_us < min_latency ? min_latency: latency_us;
439
     latency_us = latency_us < min_latency ? min_latency: latency_us;
562
   }
440
   }
563
 
441
 
Lines 566-572 index 05ad27fef53b..3ea78e994f59 100644 Link Here
566
                          stm->params.channels, stm->params.rate, 1,
444
                          stm->params.channels, stm->params.rate, 1,
567
                          latency_us);
445
                          latency_us);
568
   if (r < 0) {
446
   if (r < 0) {
569
@@ -960,20 +1068,20 @@ alsa_stream_init_single(cubeb * ctx, cubeb_stream ** stream, char const * stream
447
@@ -969,20 +1077,20 @@ alsa_stream_init_single(cubeb * ctx, cubeb_stream ** stream, char const * stream
570
     return CUBEB_ERROR_INVALID_FORMAT;
448
     return CUBEB_ERROR_INVALID_FORMAT;
571
   }
449
   }
572
 
450
 
Lines 591-597 index 05ad27fef53b..3ea78e994f59 100644 Link Here
591
   assert((nfds_t) r == stm->nfds);
469
   assert((nfds_t) r == stm->nfds);
592
 
470
 
593
   if (alsa_register_stream(ctx, stm) != 0) {
471
   if (alsa_register_stream(ctx, stm) != 0) {
594
@@ -1048,7 +1156,7 @@ alsa_stream_destroy(cubeb_stream * stm)
472
@@ -1054,7 +1162,7 @@ alsa_stream_destroy(cubeb_stream * stm)
595
   pthread_mutex_lock(&stm->mutex);
473
   pthread_mutex_lock(&stm->mutex);
596
   if (stm->pcm) {
474
   if (stm->pcm) {
597
     if (stm->state == DRAINING) {
475
     if (stm->state == DRAINING) {
Lines 600-606 index 05ad27fef53b..3ea78e994f59 100644 Link Here
600
     }
478
     }
601
     alsa_locked_pcm_close(stm->pcm);
479
     alsa_locked_pcm_close(stm->pcm);
602
     stm->pcm = NULL;
480
     stm->pcm = NULL;
603
@@ -1094,12 +1202,12 @@ alsa_get_max_channel_count(cubeb * ctx, uint32_t * max_channels)
481
@@ -1100,12 +1208,12 @@ alsa_get_max_channel_count(cubeb * ctx, uint32_t * max_channels)
604
 
482
 
605
   assert(stm);
483
   assert(stm);
606
 
484
 
Lines 615-621 index 05ad27fef53b..3ea78e994f59 100644 Link Here
615
   if (r < 0) {
493
   if (r < 0) {
616
     return CUBEB_ERROR;
494
     return CUBEB_ERROR;
617
   }
495
   }
618
@@ -1120,34 +1228,34 @@ alsa_get_preferred_sample_rate(cubeb * ctx, uint32_t * rate) {
496
@@ -1126,34 +1234,34 @@ alsa_get_preferred_sample_rate(cubeb * ctx, uint32_t * rate) {
619
 
497
 
620
   /* get a pcm, disabling resampling, so we get a rate the
498
   /* get a pcm, disabling resampling, so we get a rate the
621
    * hardware/dmix/pulse/etc. supports. */
499
    * hardware/dmix/pulse/etc. supports. */
Lines 658-664 index 05ad27fef53b..3ea78e994f59 100644 Link Here
658
 
536
 
659
   return CUBEB_OK;
537
   return CUBEB_OK;
660
 }
538
 }
661
@@ -1180,10 +1288,10 @@ alsa_stream_start(cubeb_stream * stm)
539
@@ -1186,10 +1294,10 @@ alsa_stream_start(cubeb_stream * stm)
662
   pthread_mutex_lock(&stm->mutex);
540
   pthread_mutex_lock(&stm->mutex);
663
   /* Capture pcm must be started after initial setup/recover */
541
   /* Capture pcm must be started after initial setup/recover */
664
   if (stm->stream_type == SND_PCM_STREAM_CAPTURE &&
542
   if (stm->stream_type == SND_PCM_STREAM_CAPTURE &&
Lines 672-678 index 05ad27fef53b..3ea78e994f59 100644 Link Here
672
   gettimeofday(&stm->last_activity, NULL);
550
   gettimeofday(&stm->last_activity, NULL);
673
   pthread_mutex_unlock(&stm->mutex);
551
   pthread_mutex_unlock(&stm->mutex);
674
 
552
 
675
@@ -1223,7 +1331,7 @@ alsa_stream_stop(cubeb_stream * stm)
553
@@ -1229,7 +1337,7 @@ alsa_stream_stop(cubeb_stream * stm)
676
   pthread_mutex_unlock(&ctx->mutex);
554
   pthread_mutex_unlock(&ctx->mutex);
677
 
555
 
678
   pthread_mutex_lock(&stm->mutex);
556
   pthread_mutex_lock(&stm->mutex);
Lines 681-687 index 05ad27fef53b..3ea78e994f59 100644 Link Here
681
   pthread_mutex_unlock(&stm->mutex);
559
   pthread_mutex_unlock(&stm->mutex);
682
 
560
 
683
   return CUBEB_OK;
561
   return CUBEB_OK;
684
@@ -1239,8 +1347,8 @@ alsa_stream_get_position(cubeb_stream * stm, uint64_t * position)
562
@@ -1245,8 +1353,8 @@ alsa_stream_get_position(cubeb_stream * stm, uint64_t * position)
685
   pthread_mutex_lock(&stm->mutex);
563
   pthread_mutex_lock(&stm->mutex);
686
 
564
 
687
   delay = -1;
565
   delay = -1;
Lines 692-698 index 05ad27fef53b..3ea78e994f59 100644 Link Here
692
     *position = stm->last_position;
570
     *position = stm->last_position;
693
     pthread_mutex_unlock(&stm->mutex);
571
     pthread_mutex_unlock(&stm->mutex);
694
     return CUBEB_OK;
572
     return CUBEB_OK;
695
@@ -1265,7 +1373,7 @@ alsa_stream_get_latency(cubeb_stream * stm, uint32_t * latency)
573
@@ -1271,7 +1379,7 @@ alsa_stream_get_latency(cubeb_stream * stm, uint32_t * latency)
696
   snd_pcm_sframes_t delay;
574
   snd_pcm_sframes_t delay;
697
   /* This function returns the delay in frames until a frame written using
575
   /* This function returns the delay in frames until a frame written using
698
      snd_pcm_writei is sent to the DAC. The DAC delay should be < 1ms anyways. */
576
      snd_pcm_writei is sent to the DAC. The DAC delay should be < 1ms anyways. */
Lines 701-712 index 05ad27fef53b..3ea78e994f59 100644 Link Here
701
     return CUBEB_ERROR;
579
     return CUBEB_ERROR;
702
   }
580
   }
703
 
581
 
582
diff --git toolkit/library/moz.build toolkit/library/moz.build
583
index b0df6b98b91f..e06592daa265 100644
584
--- toolkit/library/moz.build
585
+++ toolkit/library/moz.build
586
@@ -247,9 +247,6 @@ if CONFIG['MOZ_SYSTEM_LIBVPX']:
587
 if not CONFIG['MOZ_TREE_PIXMAN']:
588
     OS_LIBS += CONFIG['MOZ_PIXMAN_LIBS']
589
 
590
-if CONFIG['MOZ_ALSA']:
591
-    OS_LIBS += CONFIG['MOZ_ALSA_LIBS']
592
-
593
 if CONFIG['HAVE_CLOCK_MONOTONIC']:
594
     OS_LIBS += CONFIG['REALTIME_LIBS']
595
 
596
597
commit 161bcd671217
598
Author: Evgeniy Vodolazskiy <waterlaz@gmail.com>
599
Date:   Wed Sep 3 10:47:00 2014 -0700
600
601
    Bug 1021761 - Add OSS backend to libcubeb, default but last on Linux. r=kinetik r=glandium
602
---
603
 build/moz.configure/old.configure |   1 +
604
 dom/media/CubebUtils.cpp          |   3 +-
605
 media/libcubeb/AUTHORS            |   1 +
606
 media/libcubeb/src/cubeb.c        |  10 +
607
 media/libcubeb/src/cubeb_oss.c    | 453 ++++++++++++++++++++++++++++++++++++++
608
 media/libcubeb/src/moz.build      |   7 +
609
 media/libcubeb/update.sh          |   1 +
610
 old-configure.in                  |  62 ++++++
611
 toolkit/library/moz.build         |   3 +
612
 9 files changed, 540 insertions(+), 1 deletion(-)
613
614
diff --git build/moz.configure/old.configure build/moz.configure/old.configure
615
index 17d0c5bf3420..3e6dbc16ca14 100644
616
--- build/moz.configure/old.configure
617
+++ build/moz.configure/old.configure
618
@@ -262,6 +262,7 @@ def old_configure_options(*options):
619
     '--with-nspr-prefix',
620
     '--with-nss-exec-prefix',
621
     '--with-nss-prefix',
622
+    '--with-oss',
623
     '--with-pthreads',
624
     '--with-qemu-exe',
625
     '--with-sixgill',
626
diff --git dom/media/CubebUtils.cpp dom/media/CubebUtils.cpp
627
index 88063ed3a4d6..8613f86dbd16 100644
628
--- dom/media/CubebUtils.cpp
629
+++ dom/media/CubebUtils.cpp
630
@@ -149,7 +149,8 @@ const char* AUDIOSTREAM_BACKEND_ID_STR[] = {
631
   "sndio",
632
   "opensl",
633
   "audiotrack",
634
-  "kai"
635
+  "kai",
636
+  "oss",
637
 };
638
 /* Index for failures to create an audio stream the first time. */
639
 const int CUBEB_BACKEND_INIT_FAILURE_FIRST =
640
diff --git media/libcubeb/AUTHORS media/libcubeb/AUTHORS
641
index f0f9595227f2..e7e7048190ab 100644
642
--- media/libcubeb/AUTHORS
643
+++ media/libcubeb/AUTHORS
644
@@ -4,6 +4,7 @@ Michael Wu <mwu@mozilla.com>
645
 Paul Adenot <paul@paul.cx>
646
 David Richards <drichards@mozilla.com>
647
 Sebastien Alaiwan <sebastien.alaiwan@gmail.com>
648
+Evgeniy Vodolazskiy <waterlaz@gmail.com>
649
 KO Myung-Hun <komh@chollian.net>
650
 Haakon Sporsheim <haakon.sporsheim@telenordigital.com>
651
 Alex Chronopoulos <achronop@gmail.com>
652
diff --git media/libcubeb/src/cubeb.c media/libcubeb/src/cubeb.c
653
index bb35e0ce349f..e523d94108a3 100644
654
--- media/libcubeb/src/cubeb.c
655
+++ media/libcubeb/src/cubeb.c
656
@@ -60,6 +60,9 @@ int audiotrack_init(cubeb ** context, char const * context_name);
657
 #if defined(USE_KAI)
658
 int kai_init(cubeb ** context, char const * context_name);
659
 #endif
660
+#if defined(USE_OSS)
661
+int oss_init(cubeb ** context, char const * context_name);
662
+#endif
663
 
664
 static int
665
 validate_stream_params(cubeb_stream_params * input_stream_params,
666
@@ -159,6 +162,10 @@ cubeb_init(cubeb ** context, char const * context_name, char const * backend_nam
667
     } else if (!strcmp(backend_name, "kai")) {
668
 #if defined(USE_KAI)
669
       init_oneshot = kai_init;
670
+#endif
671
+    } else if (!strcmp(backend_name, "oss")) {
672
+#if defined(USE_OSS)
673
+      init_oneshot = oss_init;
674
 #endif
675
     } else {
676
       /* Already set */
677
@@ -203,6 +210,9 @@ cubeb_init(cubeb ** context, char const * context_name, char const * backend_nam
678
 #endif
679
 #if defined(USE_KAI)
680
     kai_init,
681
+#endif
682
+#if defined(USE_OSS)
683
+    oss_init,
684
 #endif
685
   };
686
   int i;
704
diff --git media/libcubeb/src/cubeb_oss.c media/libcubeb/src/cubeb_oss.c
687
diff --git media/libcubeb/src/cubeb_oss.c media/libcubeb/src/cubeb_oss.c
705
new file mode 100644
688
new file mode 100644
706
index 000000000000..7b0b4f37dbe4
689
index 000000000000..7d96168b9ea6
707
--- /dev/null
690
--- /dev/null
708
+++ media/libcubeb/src/cubeb_oss.c
691
+++ media/libcubeb/src/cubeb_oss.c
709
@@ -0,0 +1,445 @@
692
@@ -0,0 +1,454 @@
710
+/*
693
+/*
711
+ * Copyright © 2014 Mozilla Foundation
694
+ * Copyright © 2014 Mozilla Foundation
712
+ *
695
+ *
Lines 743-753 index 000000000000..7b0b4f37dbe4 Link Here
743
+};
726
+};
744
+
727
+
745
+struct cubeb_stream {
728
+struct cubeb_stream {
729
+  /* Note: Must match cubeb_stream layout in cubeb.c. */
746
+  cubeb * context;
730
+  cubeb * context;
731
+  void * user_ptr;
732
+  /**/
747
+
733
+
748
+  cubeb_data_callback data_callback;
734
+  cubeb_data_callback data_callback;
749
+  cubeb_state_callback state_callback;
735
+  cubeb_state_callback state_callback;
750
+  void * user_ptr;
751
+  float volume;
736
+  float volume;
752
+  float panning;
737
+  float panning;
753
+
738
+
Lines 976-981 index 000000000000..7b0b4f37dbe4 Link Here
976
+    return CUBEB_ERROR_DEVICE_UNAVAILABLE;
961
+    return CUBEB_ERROR_DEVICE_UNAVAILABLE;
977
+  }
962
+  }
978
+
963
+
964
+  if ((input_stream_params && input_stream_params->prefs & CUBEB_STREAM_PREF_LOOPBACK) ||
965
+      (output_stream_params && output_stream_params->prefs & CUBEB_STREAM_PREF_LOOPBACK)) {
966
+    return CUBEB_ERROR_NOT_SUPPORTED;
967
+  }
968
+
979
+  if ((stream->fd = open(CUBEB_OSS_DEFAULT_OUTPUT, O_WRONLY)) == -1) {
969
+  if ((stream->fd = open(CUBEB_OSS_DEFAULT_OUTPUT, O_WRONLY)) == -1) {
980
+    free(stream);
970
+    free(stream);
981
+    return CUBEB_ERROR;
971
+    return CUBEB_ERROR;
Lines 1137-1148 index 000000000000..7b0b4f37dbe4 Link Here
1137
+  .get_min_latency = oss_get_min_latency,
1127
+  .get_min_latency = oss_get_min_latency,
1138
+  .get_preferred_sample_rate = oss_get_preferred_sample_rate,
1128
+  .get_preferred_sample_rate = oss_get_preferred_sample_rate,
1139
+  .get_preferred_channel_layout = NULL,
1129
+  .get_preferred_channel_layout = NULL,
1140
+  .destroy = oss_destroy,
1141
+  .enumerate_devices = NULL,
1130
+  .enumerate_devices = NULL,
1131
+  .device_collection_destroy = NULL,
1132
+  .destroy = oss_destroy,
1142
+  .stream_init = oss_stream_init,
1133
+  .stream_init = oss_stream_init,
1143
+  .stream_destroy = oss_stream_destroy,
1134
+  .stream_destroy = oss_stream_destroy,
1144
+  .stream_start = oss_stream_start,
1135
+  .stream_start = oss_stream_start,
1145
+  .stream_stop = oss_stream_stop,
1136
+  .stream_stop = oss_stream_stop,
1137
+  .stream_reset_default_device = NULL,
1146
+  .stream_get_position = oss_stream_get_position,
1138
+  .stream_get_position = oss_stream_get_position,
1147
+  .stream_get_latency = oss_stream_get_latency,
1139
+  .stream_get_latency = oss_stream_get_latency,
1148
+  .stream_set_volume = oss_stream_set_volume,
1140
+  .stream_set_volume = oss_stream_set_volume,
Lines 1153-1162 index 000000000000..7b0b4f37dbe4 Link Here
1153
+  .register_device_collection_changed = NULL
1145
+  .register_device_collection_changed = NULL
1154
+};
1146
+};
1155
diff --git media/libcubeb/src/moz.build media/libcubeb/src/moz.build
1147
diff --git media/libcubeb/src/moz.build media/libcubeb/src/moz.build
1156
index fc9c79198e30..57d039d5a0f2 100644
1148
index e1fea30ca417..a5b1100f1014 100644
1157
--- media/libcubeb/src/moz.build
1149
--- media/libcubeb/src/moz.build
1158
+++ media/libcubeb/src/moz.build
1150
+++ media/libcubeb/src/moz.build
1159
@@ -20,6 +20,12 @@ if CONFIG['MOZ_ALSA']:
1151
@@ -23,6 +23,12 @@ if CONFIG['MOZ_ALSA']:
1160
     ]
1152
     ]
1161
     DEFINES['USE_ALSA'] = True
1153
     DEFINES['USE_ALSA'] = True
1162
 
1154
 
Lines 1169-1196 index fc9c79198e30..57d039d5a0f2 100644 Link Here
1169
 if CONFIG['MOZ_PULSEAUDIO'] or CONFIG['MOZ_JACK']:
1161
 if CONFIG['MOZ_PULSEAUDIO'] or CONFIG['MOZ_JACK']:
1170
     SOURCES += [
1162
     SOURCES += [
1171
         'cubeb_resampler.cpp',
1163
         'cubeb_resampler.cpp',
1172
@@ -92,6 +98,7 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
1164
@@ -88,6 +94,7 @@ if CONFIG['OS_TARGET'] == 'Android':
1173
             '%' + '%s/system/media/wilhelm/include' % CONFIG['ANDROID_SOURCE'],
1165
 FINAL_LIBRARY = 'gkmedias'
1174
         ]
1175
 
1166
 
1176
+CFLAGS += CONFIG['MOZ_OSS_CFLAGS']
1177
 CFLAGS += CONFIG['MOZ_ALSA_CFLAGS']
1167
 CFLAGS += CONFIG['MOZ_ALSA_CFLAGS']
1168
+CFLAGS += CONFIG['MOZ_OSS_CFLAGS']
1178
 CFLAGS += CONFIG['MOZ_PULSEAUDIO_CFLAGS']
1169
 CFLAGS += CONFIG['MOZ_PULSEAUDIO_CFLAGS']
1179
 
1170
 
1180
diff --git media/libcubeb/gtest/moz.build media/libcubeb/gtest/moz.build
1171
 # We allow warnings for third-party code that can be updated from upstream.
1181
index e99968648554..efbbbf779e11 100644
1182
--- media/libcubeb/gtest/moz.build
1183
+++ media/libcubeb/gtest/moz.build
1184
@@ -71,7 +71,6 @@ elif CONFIG['OS_TARGET'] == 'OpenBSD':
1185
         'sndio',
1186
     ]
1187
 else:
1188
-    OS_LIBS += CONFIG['MOZ_ALSA_LIBS']
1189
     OS_LIBS += CONFIG['MOZ_PULSEAUDIO_LIBS']
1190
 
1191
 if CONFIG['GNU_CXX']:
1192
diff --git media/libcubeb/update.sh media/libcubeb/update.sh
1172
diff --git media/libcubeb/update.sh media/libcubeb/update.sh
1193
index b139b8f497fd..d1f8a223c6d8 100755
1173
index 0bb6345c9fa9..78a102dc47cb 100755
1194
--- media/libcubeb/update.sh
1174
--- media/libcubeb/update.sh
1195
+++ media/libcubeb/update.sh
1175
+++ media/libcubeb/update.sh
1196
@@ -20,6 +20,7 @@ cp $1/src/cubeb_log.h src
1176
@@ -20,6 +20,7 @@ cp $1/src/cubeb_log.h src
Lines 1198-1218 index b139b8f497fd..d1f8a223c6d8 100755 Link Here
1198
 cp $1/src/cubeb_mixer.h src
1178
 cp $1/src/cubeb_mixer.h src
1199
 cp $1/src/cubeb_opensl.c src
1179
 cp $1/src/cubeb_opensl.c src
1200
+cp $1/src/cubeb_oss.c src
1180
+cp $1/src/cubeb_oss.c src
1201
 cp $1/src/cubeb_osx_run_loop.h src
1181
 cp $1/src/cubeb-jni.cpp src
1202
 cp $1/src/cubeb_panner.cpp src
1182
 cp $1/src/cubeb-jni.h src
1203
 cp $1/src/cubeb_panner.h src
1183
 cp $1/src/android/cubeb-output-latency.h src/android
1184
diff --git old-configure.in old-configure.in
1185
index 28e1a9e48d61..edacedcf6e5d 100644
1186
--- old-configure.in
1187
+++ old-configure.in
1188
@@ -2598,6 +2598,67 @@ MOZ_WEBM_ENCODER=1
1189
 AC_DEFINE(MOZ_WEBM_ENCODER)
1190
 AC_SUBST(MOZ_WEBM_ENCODER)
1191
 
1192
+dnl ==================================
1193
+dnl = Check OSS availability
1194
+dnl ==================================
1195
+
1196
+dnl If using Linux, Solaris or BSDs, ensure that OSS is available
1197
+case "$OS_TARGET" in
1198
+Linux|SunOS|DragonFly|FreeBSD|NetBSD|GNU/kFreeBSD)
1199
+    MOZ_OSS=1
1200
+    ;;
1201
+esac
1202
+
1203
+MOZ_ARG_WITH_STRING(oss,
1204
+[  --with-oss[=PFX]        Enable OpenSoundSystem support [installed at prefix PFX]],
1205
+   OSSPREFIX=$withval)
1206
+
1207
+if test -n "$OSSPREFIX"; then
1208
+    if test "$OSSPREFIX" != "no"; then
1209
+        MOZ_OSS=1
1210
+    else
1211
+        MOZ_OSS=
1212
+    fi
1213
+fi
1214
+
1215
+_SAVE_CFLAGS=$CFLAGS
1216
+_SAVE_LIBS=$LIBS
1217
+if test -n "$MOZ_OSS"; then
1218
+    dnl Prefer 4Front implementation
1219
+    AC_MSG_CHECKING([MOZ_OSS_CFLAGS])
1220
+    if test "$OSSPREFIX" != "yes"; then
1221
+        oss_conf=${OSSPREFIX%/usr}/etc/oss.conf
1222
+        if test -f "$oss_conf"; then
1223
+            . "$oss_conf"
1224
+        else
1225
+            OSSLIBDIR=$OSSPREFIX/lib/oss
1226
+        fi
1227
+        if test -d "$OSSLIBDIR"; then
1228
+            MOZ_OSS_CFLAGS="$MOZ_OSS_CFLAGS -I$OSSLIBDIR/include"
1229
+        fi
1230
+    fi
1231
+    AC_MSG_RESULT([$MOZ_OSS_CFLAGS])
1232
+
1233
+    CFLAGS="$CFLAGS $MOZ_OSS_CFLAGS"
1234
+    MOZ_CHECK_HEADERS(sys/soundcard.h soundcard.h)
1235
+
1236
+    if test "$ac_cv_header_sys_soundcard_h" != "yes" -a \
1237
+            "$ac_cv_header_soundcard_h" != "yes"; then
1238
+        AC_MSG_ERROR([Need OSS for Ogg, Wave or WebM decoding on $OS_TARGET.  Disable with --without-oss.])
1239
+    fi
1240
+
1241
+    dnl Assume NetBSD implementation over SunAudio
1242
+    AC_CHECK_LIB(ossaudio, _oss_ioctl,
1243
+        [AC_DEFINE_UNQUOTED(CUBEB_OSS_DEFAULT_OUTPUT, "/dev/sound")
1244
+         MOZ_OSS_LIBS="$MOZ_OSS_LIBS -lossaudio"])
1245
+fi
1246
+CFLAGS=$_SAVE_CFLAGS
1247
+LIBS=$_SAVE_LIBS
1248
+
1249
+AC_SUBST(MOZ_OSS)
1250
+AC_SUBST_LIST(MOZ_OSS_CFLAGS)
1251
+AC_SUBST_LIST(MOZ_OSS_LIBS)
1252
+
1253
 dnl ==================================
1254
 dnl = Check alsa availability on Linux
1255
 dnl ==================================
1204
diff --git toolkit/library/moz.build toolkit/library/moz.build
1256
diff --git toolkit/library/moz.build toolkit/library/moz.build
1205
index a61c689c83c3..7764df6f8a6b 100644
1257
index e06592daa265..ce016b96c2bc 100644
1206
--- toolkit/library/moz.build
1258
--- toolkit/library/moz.build
1207
+++ toolkit/library/moz.build
1259
+++ toolkit/library/moz.build
1208
@@ -242,8 +242,8 @@ if CONFIG['MOZ_SYSTEM_LIBVPX']:
1260
@@ -247,6 +247,9 @@ if CONFIG['MOZ_SYSTEM_LIBVPX']:
1209
 if not CONFIG['MOZ_TREE_PIXMAN']:
1261
 if not CONFIG['MOZ_TREE_PIXMAN']:
1210
     OS_LIBS += CONFIG['MOZ_PIXMAN_LIBS']
1262
     OS_LIBS += CONFIG['MOZ_PIXMAN_LIBS']
1211
 
1263
 
1212
-if CONFIG['MOZ_ALSA']:
1213
-    OS_LIBS += CONFIG['MOZ_ALSA_LIBS']
1214
+if CONFIG['MOZ_OSS']:
1264
+if CONFIG['MOZ_OSS']:
1215
+    OS_LIBS += CONFIG['MOZ_OSS_LIBS']
1265
+    OS_LIBS += CONFIG['MOZ_OSS_LIBS']
1216
 
1266
+
1217
 if CONFIG['HAVE_CLOCK_MONOTONIC']:
1267
 if CONFIG['HAVE_CLOCK_MONOTONIC']:
1218
     OS_LIBS += CONFIG['REALTIME_LIBS']
1268
     OS_LIBS += CONFIG['REALTIME_LIBS']
1269
 
(-)b/www/firefox/files/patch-bug1418162 (+58 lines)
Added Link Here
1
commit b2ebb8d82be2
2
Author: Tom Ritter <tom@mozilla.com>
3
Date:   Mon Feb 19 09:43:27 2018 -0600
4
5
    Bug 1418162 Use a build constant to determine update channel, and update ESR equation for 60 r?gijs,Build
6
    
7
    Previously we used Services.appinfo.defaultUpdateChannel to determine if we were on ESR
8
    and if so, we would assert to make sure the ESR equation hadn't changed. But that method
9
    is a footgun.  We could use UpdateUtils.getUpdateChannel, but for our purposes here, the
10
    compile-time constant will work just as well.
11
    
12
    If it's set correctly, for Mozilla, we will perform our assert check. If it's not set to
13
    esr (e.g. for Tor), they'll skip the assert. They probably want to control their user agent
14
    themselves anyway.
15
    
16
    MozReview-Commit-ID: DLnWSEpCVJ6
17
---
18
 .../resistfingerprinting/nsRFPService.cpp           | 21 +++++++--------------
19
 1 file changed, 7 insertions(+), 14 deletions(-)
20
21
diff --git toolkit/components/resistfingerprinting/nsRFPService.cpp toolkit/components/resistfingerprinting/nsRFPService.cpp
22
index aeb3cb6b3539..1fd6a6e8fe8d 100644
23
--- toolkit/components/resistfingerprinting/nsRFPService.cpp
24
+++ toolkit/components/resistfingerprinting/nsRFPService.cpp
25
@@ -606,26 +606,19 @@ nsRFPService::GetSpoofedUserAgent(nsACString &userAgent)
26
   uint32_t firefoxVersion = appVersion.ToInteger(&rv);
27
   NS_ENSURE_SUCCESS(rv, rv);
28
 
29
-  // Starting from Firefox 10, Firefox ESR was released once every seven
30
-  // Firefox releases, e.g. Firefox 10, 17, 24, 31, and so on.
31
-  // We infer the last and closest ESR version based on this rule.
32
-  nsCOMPtr<nsIXULRuntime> runtime =
33
-    do_GetService("@mozilla.org/xre/runtime;1", &rv);
34
-  NS_ENSURE_SUCCESS(rv, rv);
35
-
36
-  nsAutoCString updateChannel;
37
-  rv = runtime->GetDefaultUpdateChannel(updateChannel);
38
-  NS_ENSURE_SUCCESS(rv, rv);
39
-
40
   // If we are running in Firefox ESR, determine whether the formula of ESR
41
   // version has changed.  Once changed, we must update the formula in this
42
   // function.
43
-  if (updateChannel.EqualsLiteral("esr")) {
44
-    MOZ_ASSERT(((firefoxVersion % 7) == 3),
45
+  if (!strcmp(NS_STRINGIFY(MOZ_UPDATE_CHANNEL), "esr")) {
46
+    MOZ_ASSERT(((firefoxVersion % 7) == 4),
47
       "Please udpate ESR version formula in nsRFPService.cpp");
48
   }
49
 
50
-  uint32_t spoofedVersion = firefoxVersion - ((firefoxVersion - 3) % 7);
51
+  // Starting from Firefox 10, Firefox ESR was released once every seven
52
+  // Firefox releases, e.g. Firefox 10, 17, 24, 31, and so on.
53
+  // Except we used 60 as an ESR instead of 59.
54
+  // We infer the last and closest ESR version based on this rule.
55
+  uint32_t spoofedVersion = firefoxVersion - ((firefoxVersion - 4) % 7);
56
   userAgent.Assign(nsPrintfCString(
57
     "Mozilla/5.0 (%s; rv:%d.0) Gecko/%s Firefox/%d.0",
58
     SPOOFED_UA_OS, spoofedVersion, LEGACY_BUILD_ID, spoofedVersion));
(-)a/www/firefox/files/patch-bug1433747 (-24 lines)
Removed Link Here
1
Apply simd@cf87865a998a to unbreak -C target-cpu with Rust >= 1.24
2
3
diff --git third_party/rust/simd/.cargo-checksum.json third_party/rust/simd/.cargo-checksum.json
4
index 65f31b0560e6..f16d0dd4fd61 100644
5
--- third_party/rust/simd/.cargo-checksum.json
6
+++ third_party/rust/simd/.cargo-checksum.json
7
@@ -1 +1 @@
8
-{"files":{".travis.yml":"e2c720c3633b7671efce49147c62b12bcbf630d7c5d6fc65cd97620bfa4ddcea","Cargo.toml":"608aad04f17a524ee21048fa2ce9f656ae344e0473dd0e331dc954f0f9677c63","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"6d3a9431e65e69c73a8923e6517b889d17549b23db406b9ec027710d16af701f","README.md":"249294a9a5f63c64c0f7fe4a607060f43f3507dce2378067aa59d25fb3ae681d","benches/mandelbrot.rs":"051b5199e66bca6cf7774e9024915fd4e1349ab39726a10a14e06b60d65d87a4","benches/matrix.rs":"048a21dacdb62365e0105d00d2c8cd6bd2396ac81134f2bff7eb4f7d095fb735","examples/axpy.rs":"4307626045d64ec08361c97c9c72c5dc8d361bdc88f64453b97ac0212041a1b2","examples/convert.rs":"8e658fde050f8a0d8b84ad7570446b10fcf544afbd551b940ca340474f324840","examples/dot-product.rs":"6fe2e007c147af5353804173a593c5b9d57dbccec156e1da37e9e32537363f91","examples/fannkuch-redux-nosimd.rs":"7b2fbde35e8666929d14d67328471cb0483d038a5325232f8db148b30865312b","examples/fannkuch-redux.rs":"ea21fdbd2274488a62cc984acad6e0b65d52f24fb4ff63b7057a3a667e9c8aae","examples/mandelbrot.rs":"8b8fdca1edac50e5a33e0e0592bd41eb75114f31839ccd40d485c61a9a664380","examples/matrix-inverse.rs":"a378d20ef20c2119bb10a86de27c92fec2c2f77f374e6bfd36707c9825a5fe92","examples/nbody-nosimd.rs":"2c8e0a7feacd202fdd65eeceb6420d6e9f43340b81f20a8e532704a587a2796b","examples/nbody.rs":"a864311affab262024479d6348ff51af43d809e9ad332ec30ea4aacceaa2eae1","examples/ops.rs":"1316f915d0afcfa98fdc4077e965ccccf6b4b21c433cbe487ff0cdc60df3cd39","examples/spectral-norm-nosimd.rs":"ffc8512ecde779078ea467f38f423a0ea623c63da7078193f9dd370200773f79","examples/spectral-norm.rs":"edb09c9d477f83939098cfb77a27cc298bc7a0c8a8e29cece0cccae0d70d890e","src/aarch64/mod.rs":"83f52775364c98de0cecb7e1509530c18972e932469f5f1522aa24a735d0fa37","src/aarch64/neon.rs":"1fe769979e07d8e2bc3c78ce116e05d735860744efe097a894cc9421153257fb","src/arm/mod.rs":"dcdd90bc0b39abaf86a0c8946d442b16313563fbae1ff03248628275c74d8617","src/arm/neon.rs":"51cc509856200e80f8e4cc2c982586e6d1cef593ec4537e153dce0cfe31d3428","src/common.rs":"62f4e7e0fefb52ad190d0f2191bc435ac4deab3f2bc70dc427f2a7f9ccb7856e","src/lib.rs":"25f0b39c038fa85af858318135dfd87865be26c33bb4bd1438aec96a1e68d8b5","src/sixty_four.rs":"510a9e00189a61e4f0a5beb7052d5dee37fc8261f94a2af45ef10327e0f3b7df","src/v256.rs":"2e328e49034876d535e0627c7a62191da2b4fb156a657614bf531a5fc75b1385","src/x86/avx.rs":"c66140abefca634b48eae307c3ec8cf5a40f2279b10e246a7e2ac602a2a2bb28","src/x86/avx2.rs":"efe3006b13a13261a3dec3d37dc1d8cb53950f3803c420069231803374949937","src/x86/mod.rs":"0acc5a5e2672e2a0fddc11065663be8b8fa2da87320ea291fa86ff8c2f33edf5","src/x86/sse2.rs":"5ceda75a401958a135fc9d851b22075314cdeed69fd483b6a7be4f11373f40da","src/x86/sse3.rs":"9bd01a4f08069ca4f445952e744d651efe887e3835b18872e757375f0d053bd2","src/x86/sse4_1.rs":"9ceb80dd70a7e7dfeef508cb935e1a2637175bc87a3b090f5dea691ff6aa0516","src/x86/sse4_2.rs":"c59321aed8decdce4d0d8570cff46aed02e1a8265647ef7702e9b180fc581254","src/x86/ssse3.rs":"2290f0269bae316b8e0491495645ee38a9bd73525c8572759c1328341c3bdb4c"},"package":"7a94d14a2ae1f1f110937de5fb69e494372560181c7e1739a097fcc2cee37ba0"}
9
\ No newline at end of file
10
+{"files":{".travis.yml":"e2c720c3633b7671efce49147c62b12bcbf630d7c5d6fc65cd97620bfa4ddcea","Cargo.toml":"608aad04f17a524ee21048fa2ce9f656ae344e0473dd0e331dc954f0f9677c63","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"6d3a9431e65e69c73a8923e6517b889d17549b23db406b9ec027710d16af701f","README.md":"249294a9a5f63c64c0f7fe4a607060f43f3507dce2378067aa59d25fb3ae681d","benches/mandelbrot.rs":"051b5199e66bca6cf7774e9024915fd4e1349ab39726a10a14e06b60d65d87a4","benches/matrix.rs":"048a21dacdb62365e0105d00d2c8cd6bd2396ac81134f2bff7eb4f7d095fb735","examples/axpy.rs":"4307626045d64ec08361c97c9c72c5dc8d361bdc88f64453b97ac0212041a1b2","examples/convert.rs":"8e658fde050f8a0d8b84ad7570446b10fcf544afbd551b940ca340474f324840","examples/dot-product.rs":"6fe2e007c147af5353804173a593c5b9d57dbccec156e1da37e9e32537363f91","examples/fannkuch-redux-nosimd.rs":"7b2fbde35e8666929d14d67328471cb0483d038a5325232f8db148b30865312b","examples/fannkuch-redux.rs":"ea21fdbd2274488a62cc984acad6e0b65d52f24fb4ff63b7057a3a667e9c8aae","examples/mandelbrot.rs":"8b8fdca1edac50e5a33e0e0592bd41eb75114f31839ccd40d485c61a9a664380","examples/matrix-inverse.rs":"a378d20ef20c2119bb10a86de27c92fec2c2f77f374e6bfd36707c9825a5fe92","examples/nbody-nosimd.rs":"2c8e0a7feacd202fdd65eeceb6420d6e9f43340b81f20a8e532704a587a2796b","examples/nbody.rs":"a864311affab262024479d6348ff51af43d809e9ad332ec30ea4aacceaa2eae1","examples/ops.rs":"1316f915d0afcfa98fdc4077e965ccccf6b4b21c433cbe487ff0cdc60df3cd39","examples/spectral-norm-nosimd.rs":"ffc8512ecde779078ea467f38f423a0ea623c63da7078193f9dd370200773f79","examples/spectral-norm.rs":"edb09c9d477f83939098cfb77a27cc298bc7a0c8a8e29cece0cccae0d70d890e","src/aarch64/mod.rs":"83f52775364c98de0cecb7e1509530c18972e932469f5f1522aa24a735d0fa37","src/aarch64/neon.rs":"1fe769979e07d8e2bc3c78ce116e05d735860744efe097a894cc9421153257fb","src/arm/mod.rs":"dcdd90bc0b39abaf86a0c8946d442b16313563fbae1ff03248628275c74d8617","src/arm/neon.rs":"51cc509856200e80f8e4cc2c982586e6d1cef593ec4537e153dce0cfe31d3428","src/common.rs":"62f4e7e0fefb52ad190d0f2191bc435ac4deab3f2bc70dc427f2a7f9ccb7856e","src/lib.rs":"25f0b39c038fa85af858318135dfd87865be26c33bb4bd1438aec96a1e68d8b5","src/sixty_four.rs":"510a9e00189a61e4f0a5beb7052d5dee37fc8261f94a2af45ef10327e0f3b7df","src/v256.rs":"2e328e49034876d535e0627c7a62191da2b4fb156a657614bf531a5fc75b1385","src/x86/avx.rs":"c66140abefca634b48eae307c3ec8cf5a40f2279b10e246a7e2ac602a2a2bb28","src/x86/avx2.rs":"3bcb3f391ad5f16f0a6da0bc1301329beb478ad6265bd3b2c9c124fc2e6198e5","src/x86/mod.rs":"0acc5a5e2672e2a0fddc11065663be8b8fa2da87320ea291fa86ff8c2f33edf5","src/x86/sse2.rs":"5ceda75a401958a135fc9d851b22075314cdeed69fd483b6a7be4f11373f40da","src/x86/sse3.rs":"9bd01a4f08069ca4f445952e744d651efe887e3835b18872e757375f0d053bd2","src/x86/sse4_1.rs":"9ceb80dd70a7e7dfeef508cb935e1a2637175bc87a3b090f5dea691ff6aa0516","src/x86/sse4_2.rs":"c59321aed8decdce4d0d8570cff46aed02e1a8265647ef7702e9b180fc581254","src/x86/ssse3.rs":"2290f0269bae316b8e0491495645ee38a9bd73525c8572759c1328341c3bdb4c"},"package":"7a94d14a2ae1f1f110937de5fb69e494372560181c7e1739a097fcc2cee37ba0"}
11
\ No newline at end of file
12
diff --git third_party/rust/simd/src/x86/avx2.rs third_party/rust/simd/src/x86/avx2.rs
13
index fa92e3b60786..e86a33d3b5bb 100644
14
--- third_party/rust/simd/src/x86/avx2.rs
15
+++ third_party/rust/simd/src/x86/avx2.rs
16
@@ -42,7 +42,7 @@ extern "platform-intrinsic" {
17
     fn x86_mm256_packus_epi32(x: i32x8, y: i32x8) -> u16x16;
18
     fn x86_mm256_permutevar8x32_epi32(x: i32x8, y: i32x8) -> i32x8;
19
     fn x86_mm256_permutevar8x32_ps(x: f32x8, y: i32x8) -> f32x8;
20
-    fn x86_mm256_sad_epu8(x: u8x32, y: u8x32) -> u8x32;
21
+    fn x86_mm256_sad_epu8(x: u8x32, y: u8x32) -> u64x4;
22
     fn x86_mm256_shuffle_epi8(x: i8x32, y: i8x32) -> i8x32;
23
     fn x86_mm256_sign_epi8(x: i8x32, y: i8x32) -> i8x32;
24
     fn x86_mm256_sign_epi16(x: i16x16, y: i16x16) -> i16x16;
(-)b/www/firefox/files/patch-bug1438678 (+1000 lines)
Added Link Here
1
commit 68124009fc5a
2
Author: Nicholas Nethercote <nnethercote@mozilla.com>
3
Date:   Fri Feb 16 17:54:16 2018 +1100
4
5
    Bug 1438678 - Pass early prefs via shared memory instead of the command line. r=bobowen,jld,glandium.
6
    
7
    This patch replaces the large -intPrefs/-boolPrefs/-stringPrefs flags with
8
    a short-lived, anonymous, shared memory segment that is used to pass the early
9
    prefs.
10
    
11
    Removing the bloat from the command line is nice, but more important is the
12
    fact that this will let us pass more prefs at content process start-up, which
13
    will allow us to remove the early/late prefs split (bug 1436911).
14
    
15
    Although this mechanism is only used for prefs, it's conceivable that it could
16
    be used for other data that must be received very early by children, and for
17
    which the command line isn't ideal.
18
    
19
    Notable details:
20
    
21
    - Much of the patch deals with the various platform-specific ways of passing
22
      handles/fds to children.
23
    
24
      - Linux and Mac: we use a fixed fd (8) in combination with the new
25
        GeckoChildProcessHost::AddFdToRemap() function (which ensures the child
26
        won't close the fd).
27
    
28
      - Android: like Linux and Mac, but the handles get passed via "parcels" and
29
        we use the new SetPrefsFd() function instead of the fixed fd.
30
    
31
      - Windows: there is no need to duplicate the handle because Windows handles
32
        are system-wide. But we do use the new
33
        GeckoChildProcessHost::AddHandleToShare() function to add it to the list of
34
        inheritable handles. We also ensure that list is processed on all paths
35
        (MOZ_SANDBOX with sandbox, MOZ_SANDBOX without sandbox, non-MOZ_SANDBOX) so
36
        that the handles are marked as inheritable. The handle is passed via the
37
        -prefsHandle flag.
38
    
39
      The -prefsLen flag is used on all platforms to indicate the size of the
40
      shared memory segment.
41
    
42
    - The patch also moves the serialization/deserialization of the prefs in/out of
43
      the shared memory into libpref, which is a better spot for it. (This means
44
      Preferences::MustSendToContentProcesses() can be removed.)
45
    
46
    MozReview-Commit-ID: 8fREEBiYFvc
47
    
48
    --HG--
49
    extra : rebase_source : 7e4c8ebdbcd7d74d6bd2ab3c9e75a6a17dbd8dfe
50
---
51
 dom/ipc/ContentParent.cpp                          |  91 +++++++-------
52
 dom/ipc/ContentProcess.cpp                         | 121 ++++++++++---------
53
 dom/ipc/ContentProcess.h                           |   5 +
54
 ipc/chromium/src/base/process_util_win.cc          |   4 +
55
 ipc/glue/GeckoChildProcessHost.cpp                 |  36 +++---
56
 ipc/glue/GeckoChildProcessHost.h                   |  10 ++
57
 .../org/mozilla/gecko/process/IChildProcess.aidl   |   3 +-
58
 .../main/java/org/mozilla/gecko/GeckoThread.java   |  13 +-
59
 .../org/mozilla/gecko/mozglue/GeckoLoader.java     |   2 +-
60
 .../mozilla/gecko/process/GeckoProcessManager.java |  19 +--
61
 .../gecko/process/GeckoServiceChildProcess.java    |   4 +-
62
 modules/libpref/Preferences.cpp                    | 134 +++++++++++++++++++--
63
 modules/libpref/Preferences.h                      |  17 +--
64
 mozglue/android/APKOpen.cpp                        |   4 +-
65
 toolkit/xre/Bootstrap.cpp                          |   4 +-
66
 toolkit/xre/Bootstrap.h                            |   2 +-
67
 toolkit/xre/nsEmbedFunctions.cpp                   |   3 +-
68
 widget/android/GeneratedJNIWrappers.cpp            |   4 +-
69
 widget/android/GeneratedJNIWrappers.h              |   5 +-
70
 xpcom/build/nsXULAppAPI.h                          |   2 +-
71
 20 files changed, 318 insertions(+), 165 deletions(-)
72
73
diff --git dom/ipc/ContentParent.cpp dom/ipc/ContentParent.cpp
74
index e27f3eedc1b1..60be7005354b 100644
75
--- dom/ipc/ContentParent.cpp
76
+++ dom/ipc/ContentParent.cpp
77
@@ -7,6 +7,7 @@
78
 #include "mozilla/DebugOnly.h"
79
 
80
 #include "base/basictypes.h"
81
+#include "base/shared_memory.h"
82
 
83
 #include "ContentParent.h"
84
 #include "TabParent.h"
85
@@ -1998,61 +1999,56 @@ ContentParent::LaunchSubprocess(ProcessPriority aInitialPriority /* = PROCESS_PR
86
   extraArgs.push_back(idStr);
87
   extraArgs.push_back(IsForBrowser() ? "-isForBrowser" : "-notForBrowser");
88
 
89
-  nsAutoCStringN<1024> boolPrefs;
90
-  nsAutoCStringN<1024> intPrefs;
91
-  nsAutoCStringN<1024> stringPrefs;
92
+  // Prefs information is passed via anonymous shared memory to avoid bloating
93
+  // the command line.
94
 
95
-  size_t prefsLen;
96
-  ContentPrefs::GetEarlyPrefs(&prefsLen);
97
+  // Serialize the early prefs.
98
+  nsAutoCStringN<1024> prefs;
99
+  Preferences::SerializeEarlyPreferences(prefs);
100
 
101
-  for (unsigned int i = 0; i < prefsLen; i++) {
102
-    const char* prefName = ContentPrefs::GetEarlyPref(i);
103
-    MOZ_ASSERT(i == 0 || strcmp(prefName, ContentPrefs::GetEarlyPref(i - 1)) > 0,
104
-               "Content process preferences should be sorted alphabetically.");
105
-
106
-    if (!Preferences::MustSendToContentProcesses(prefName)) {
107
-      continue;
108
-    }
109
-
110
-    switch (Preferences::GetType(prefName)) {
111
-    case nsIPrefBranch::PREF_INT:
112
-      intPrefs.Append(nsPrintfCString("%u:%d|", i, Preferences::GetInt(prefName)));
113
-      break;
114
-    case nsIPrefBranch::PREF_BOOL:
115
-      boolPrefs.Append(nsPrintfCString("%u:%d|", i, Preferences::GetBool(prefName)));
116
-      break;
117
-    case nsIPrefBranch::PREF_STRING: {
118
-      nsAutoCString value;
119
-      Preferences::GetCString(prefName, value);
120
-      stringPrefs.Append(nsPrintfCString("%u:%d;%s|", i, value.Length(), value.get()));
121
-      }
122
-      break;
123
-    case nsIPrefBranch::PREF_INVALID:
124
-      break;
125
-    default:
126
-      printf("preference type: %x\n", Preferences::GetType(prefName));
127
-      MOZ_CRASH();
128
-    }
129
+  // Set up the shared memory.
130
+  base::SharedMemory shm;
131
+  if (!shm.Create("", /* read_only */ false, /* open_existing */ false,
132
+                  prefs.Length())) {
133
+    NS_ERROR("failed to create shared memory in the parent");
134
+    MarkAsDead();
135
+    return false;
136
+  }
137
+  if (!shm.Map(prefs.Length())) {
138
+    NS_ERROR("failed to map shared memory in the parent");
139
+    MarkAsDead();
140
+    return false;
141
   }
142
 
143
-  nsCString schedulerPrefs = Scheduler::GetPrefs();
144
+  // Copy the serialized prefs into the shared memory.
145
+  memcpy(static_cast<char*>(shm.memory()), prefs.get(), prefs.Length());
146
 
147
-  // Only do these ones if they're non-empty.
148
-  if (!intPrefs.IsEmpty()) {
149
-    extraArgs.push_back("-intPrefs");
150
-    extraArgs.push_back(intPrefs.get());
151
-  }
152
-  if (!boolPrefs.IsEmpty()) {
153
-    extraArgs.push_back("-boolPrefs");
154
-    extraArgs.push_back(boolPrefs.get());
155
-  }
156
-  if (!stringPrefs.IsEmpty()) {
157
-    extraArgs.push_back("-stringPrefs");
158
-    extraArgs.push_back(stringPrefs.get());
159
-  }
160
+#if defined(XP_WIN)
161
+  // Record the handle as to-be-shared, and pass it via a command flag. This
162
+  // works because Windows handles are system-wide.
163
+  HANDLE prefsHandle = shm.handle();
164
+  mSubprocess->AddHandleToShare(prefsHandle);
165
+  extraArgs.push_back("-prefsHandle");
166
+  extraArgs.push_back(
167
+    nsPrintfCString("%zu", reinterpret_cast<uintptr_t>(prefsHandle)).get());
168
+#else
169
+  // In contrast, Unix fds are per-process. So remap the fd to a fixed one that
170
+  // will be used in the child.
171
+  // XXX: bug 1440207 is about improving how fixed fds are used.
172
+  //
173
+  // Note: on Android, AddFdToRemap() sets up the fd to be passed via a Parcel,
174
+  // and the fixed fd isn't used. However, we still need to mark it for
175
+  // remapping so it doesn't get closed in the child.
176
+  mSubprocess->AddFdToRemap(shm.handle().fd, kPrefsFileDescriptor);
177
+#endif
178
+
179
+  // Pass the length via a command flag.
180
+  extraArgs.push_back("-prefsLen");
181
+  extraArgs.push_back(nsPrintfCString("%zu", uintptr_t(prefs.Length())).get());
182
 
183
   // Scheduler prefs need to be handled differently because the scheduler needs
184
   // to start up in the content process before the normal preferences service.
185
+  nsCString schedulerPrefs = Scheduler::GetPrefs();
186
   extraArgs.push_back("-schedulerPrefs");
187
   extraArgs.push_back(schedulerPrefs.get());
188
 
189
@@ -2061,6 +2057,7 @@ ContentParent::LaunchSubprocess(ProcessPriority aInitialPriority /* = PROCESS_PR
190
   }
191
 
192
   if (!mSubprocess->LaunchAndWaitForProcessHandle(extraArgs)) {
193
+    NS_ERROR("failed to launch child in the parent");
194
     MarkAsDead();
195
     return false;
196
   }
197
diff --git dom/ipc/ContentProcess.cpp dom/ipc/ContentProcess.cpp
198
index e3c1f16910c6..2441c8cb9224 100644
199
--- dom/ipc/ContentProcess.cpp
200
+++ dom/ipc/ContentProcess.cpp
201
@@ -8,6 +8,8 @@
202
 
203
 #include "ContentProcess.h"
204
 #include "ContentPrefs.h"
205
+#include "base/shared_memory.h"
206
+#include "mozilla/Preferences.h"
207
 #include "mozilla/Scheduler.h"
208
 
209
 #if defined(XP_MACOSX) && defined(MOZ_CONTENT_SANDBOX)
210
@@ -15,7 +17,6 @@
211
 #endif
212
 
213
 #if (defined(XP_WIN) || defined(XP_MACOSX)) && defined(MOZ_CONTENT_SANDBOX)
214
-#include "mozilla/Preferences.h"
215
 #include "mozilla/SandboxSettings.h"
216
 #include "nsAppDirectoryServiceDefs.h"
217
 #include "nsDirectoryService.h"
218
@@ -81,6 +82,16 @@ SetUpSandboxEnvironment()
219
 }
220
 #endif
221
 
222
+#ifdef ANDROID
223
+static int gPrefsFd = -1;
224
+
225
+void
226
+SetPrefsFd(int aFd)
227
+{
228
+  gPrefsFd = aFd;
229
+}
230
+#endif
231
+
232
 bool
233
 ContentProcess::Init(int aArgc, char* aArgv[])
234
 {
235
@@ -88,9 +99,10 @@ ContentProcess::Init(int aArgc, char* aArgv[])
236
   bool foundAppdir = false;
237
   bool foundChildID = false;
238
   bool foundIsForBrowser = false;
239
-  bool foundIntPrefs = false;
240
-  bool foundBoolPrefs = false;
241
-  bool foundStringPrefs = false;
242
+#ifdef XP_WIN
243
+  bool foundPrefsHandle = false;
244
+#endif
245
+  bool foundPrefsLen = false;
246
   bool foundSchedulerPrefs = false;
247
 
248
   uint64_t childID;
249
@@ -103,7 +115,8 @@ ContentProcess::Init(int aArgc, char* aArgv[])
250
 #endif
251
 
252
   char* schedulerPrefs = nullptr;
253
-  InfallibleTArray<Pref> prefsArray;
254
+  base::SharedMemoryHandle prefsHandle = base::SharedMemory::NULLHandle();
255
+  size_t prefsLen = 0;
256
   for (int idx = aArgc; idx > 0; idx--) {
257
     if (!aArgv[idx]) {
258
       continue;
259
@@ -134,54 +147,24 @@ ContentProcess::Init(int aArgc, char* aArgv[])
260
       }
261
       isForBrowser = strcmp(aArgv[idx], "-notForBrowser");
262
       foundIsForBrowser = true;
263
-    } else if (!strcmp(aArgv[idx], "-intPrefs")) {
264
-      char* str = aArgv[idx + 1];
265
-      while (*str) {
266
-        int32_t index = strtol(str, &str, 10);
267
-        MOZ_ASSERT(str[0] == ':');
268
-        str++;
269
-        MaybePrefValue value(PrefValue(static_cast<int32_t>(strtol(str, &str, 10))));
270
-        MOZ_ASSERT(str[0] == '|');
271
-        str++;
272
-        // XXX: we assume these values as default values, which may not be
273
-        // true. We also assume they are unlocked. Fortunately, these prefs
274
-        // get reset properly by the first IPC message.
275
-        Pref pref(nsCString(ContentPrefs::GetEarlyPref(index)),
276
-                  /* isLocked */ false, value, MaybePrefValue());
277
-        prefsArray.AppendElement(pref);
278
-      }
279
-      foundIntPrefs = true;
280
-    } else if (!strcmp(aArgv[idx], "-boolPrefs")) {
281
+#ifdef XP_WIN
282
+    } else if (!strcmp(aArgv[idx], "-prefsHandle")) {
283
       char* str = aArgv[idx + 1];
284
-      while (*str) {
285
-        int32_t index = strtol(str, &str, 10);
286
-        MOZ_ASSERT(str[0] == ':');
287
-        str++;
288
-        MaybePrefValue value(PrefValue(!!strtol(str, &str, 10)));
289
-        MOZ_ASSERT(str[0] == '|');
290
-        str++;
291
-        Pref pref(nsCString(ContentPrefs::GetEarlyPref(index)),
292
-                  /* isLocked */ false, value, MaybePrefValue());
293
-        prefsArray.AppendElement(pref);
294
-      }
295
-      foundBoolPrefs = true;
296
-    } else if (!strcmp(aArgv[idx], "-stringPrefs")) {
297
+      MOZ_ASSERT(str[0] != '\0');
298
+      // ContentParent uses %zu to print a word-sized unsigned integer. So even
299
+      // though strtoull() returns a long long int, it will fit in a uintptr_t.
300
+      prefsHandle = reinterpret_cast<HANDLE>(strtoull(str, &str, 10));
301
+      MOZ_ASSERT(str[0] == '\0');
302
+      foundPrefsHandle = true;
303
+#endif
304
+    } else if (!strcmp(aArgv[idx], "-prefsLen")) {
305
       char* str = aArgv[idx + 1];
306
-      while (*str) {
307
-        int32_t index = strtol(str, &str, 10);
308
-        MOZ_ASSERT(str[0] == ':');
309
-        str++;
310
-        int32_t length = strtol(str, &str, 10);
311
-        MOZ_ASSERT(str[0] == ';');
312
-        str++;
313
-        MaybePrefValue value(PrefValue(nsCString(str, length)));
314
-        Pref pref(nsCString(ContentPrefs::GetEarlyPref(index)),
315
-                  /* isLocked */ false, value, MaybePrefValue());
316
-        prefsArray.AppendElement(pref);
317
-        str += length + 1;
318
-        MOZ_ASSERT(*(str - 1) == '|');
319
-      }
320
-      foundStringPrefs = true;
321
+      MOZ_ASSERT(str[0] != '\0');
322
+      // ContentParent uses %zu to print a word-sized unsigned integer. So even
323
+      // though strtoull() returns a long long int, it will fit in a uintptr_t.
324
+      prefsLen = strtoull(str, &str, 10);
325
+      MOZ_ASSERT(str[0] == '\0');
326
+      foundPrefsLen = true;
327
     } else if (!strcmp(aArgv[idx], "-schedulerPrefs")) {
328
       schedulerPrefs = aArgv[idx + 1];
329
       foundSchedulerPrefs = true;
330
@@ -209,21 +192,43 @@ ContentProcess::Init(int aArgc, char* aArgv[])
331
     bool allFound = foundAppdir
332
                  && foundChildID
333
                  && foundIsForBrowser
334
-                 && foundIntPrefs
335
-                 && foundBoolPrefs
336
-                 && foundStringPrefs
337
-                 && foundSchedulerPrefs;
338
-
339
+                 && foundPrefsLen
340
+                 && foundSchedulerPrefs
341
+#ifdef XP_WIN
342
+                 && foundPrefsHandle
343
+#endif
344
 #if defined(XP_MACOSX) && defined(MOZ_CONTENT_SANDBOX)
345
-    allFound &= foundProfile;
346
+                 && foundProfile
347
 #endif
348
+                 && true;
349
 
350
     if (allFound) {
351
       break;
352
     }
353
   }
354
 
355
-  Preferences::SetEarlyPreferences(&prefsArray);
356
+#ifdef ANDROID
357
+  // Android is different; get the FD via gPrefsFd instead of a fixed fd.
358
+  MOZ_RELEASE_ASSERT(gPrefsFd != -1);
359
+  prefsHandle = base::FileDescriptor(gPrefsFd, /* auto_close */ true);
360
+#elif XP_UNIX
361
+  prefsHandle = base::FileDescriptor(kPrefsFileDescriptor,
362
+                                     /* auto_close */ true);
363
+#endif
364
+
365
+  // Set up early prefs from the shared memory.
366
+  base::SharedMemory shm;
367
+  if (!shm.SetHandle(prefsHandle, /* read_only */ true)) {
368
+    NS_ERROR("failed to open shared memory in the child");
369
+    return false;
370
+  }
371
+  if (!shm.Map(prefsLen)) {
372
+    NS_ERROR("failed to map shared memory in the child");
373
+    return false;
374
+  }
375
+  Preferences::DeserializeEarlyPreferences(static_cast<char*>(shm.memory()),
376
+                                           prefsLen);
377
+
378
   Scheduler::SetPrefs(schedulerPrefs);
379
   mContent.Init(IOThreadChild::message_loop(),
380
                 ParentPid(),
381
diff --git dom/ipc/ContentProcess.h dom/ipc/ContentProcess.h
382
index a3854c761e10..6582c94da496 100644
383
--- dom/ipc/ContentProcess.h
384
+++ dom/ipc/ContentProcess.h
385
@@ -49,6 +49,11 @@ private:
386
   DISALLOW_EVIL_CONSTRUCTORS(ContentProcess);
387
 };
388
 
389
+#ifdef ANDROID
390
+// Android doesn't use -prefsHandle, it gets that FD another way.
391
+void SetPrefsFd(int aFd);
392
+#endif
393
+
394
 } // namespace dom
395
 } // namespace mozilla
396
 
397
diff --git ipc/chromium/src/base/process_util_win.cc ipc/chromium/src/base/process_util_win.cc
398
index 3ed54cd744ac..46667985cd71 100644
399
--- ipc/chromium/src/base/process_util_win.cc
400
+++ ipc/chromium/src/base/process_util_win.cc
401
@@ -354,6 +354,10 @@ bool LaunchApp(const std::wstring& cmdline,
402
   LPPROC_THREAD_ATTRIBUTE_LIST lpAttributeList = NULL;
403
   std::vector<HANDLE> handlesToInherit;
404
   for (HANDLE h : options.handles_to_inherit) {
405
+    if (SetHandleInformation(h, HANDLE_FLAG_INHERIT, HANDLE_FLAG_INHERIT) == 0) {
406
+      MOZ_DIAGNOSTIC_ASSERT(false, "SetHandleInformation failed");
407
+      return false;
408
+    }
409
     handlesToInherit.push_back(h);
410
   }
411
 
412
diff --git ipc/glue/GeckoChildProcessHost.cpp ipc/glue/GeckoChildProcessHost.cpp
413
index d18ed9edd4ca..3be1c51d10bb 100644
414
--- ipc/glue/GeckoChildProcessHost.cpp
415
+++ ipc/glue/GeckoChildProcessHost.cpp
416
@@ -1030,9 +1030,6 @@ GeckoChildProcessHost::PerformAsyncLaunchInternal(std::vector<std::string>& aExt
417
 
418
   if (!CrashReporter::IsDummy()) {
419
     PROsfd h = PR_FileDesc2NativeHandle(crashAnnotationWritePipe);
420
-# if defined(MOZ_SANDBOX)
421
-    mSandboxBroker.AddHandleToShare(reinterpret_cast<HANDLE>(h));
422
-# endif // defined(MOZ_SANDBOX)
423
     mLaunchOptions->handles_to_inherit.push_back(reinterpret_cast<HANDLE>(h));
424
     std::string hStr = std::to_string(h);
425
     cmdLine.AppendLooseValue(UTF8ToWide(hStr));
426
@@ -1043,6 +1040,11 @@ GeckoChildProcessHost::PerformAsyncLaunchInternal(std::vector<std::string>& aExt
427
 
428
 # if defined(MOZ_SANDBOX)
429
   if (shouldSandboxCurrentProcess) {
430
+    // Mark the handles to inherit as inheritable.
431
+    for (HANDLE h : mLaunchOptions->handles_to_inherit) {
432
+      mSandboxBroker.AddHandleToShare(h);
433
+    }
434
+
435
     if (mSandboxBroker.LaunchApp(cmdLine.program().c_str(),
436
                                  cmdLine.command_line_string().c_str(),
437
                                  mLaunchOptions->env_map,
438
@@ -1180,7 +1182,7 @@ GeckoChildProcessHost::LaunchAndroidService(const char* type,
439
                                             const base::file_handle_mapping_vector& fds_to_remap,
440
                                             ProcessHandle* process_handle)
441
 {
442
-  MOZ_ASSERT((fds_to_remap.size() > 0) && (fds_to_remap.size() <= 3));
443
+  MOZ_RELEASE_ASSERT((2 <= fds_to_remap.size()) && (fds_to_remap.size() <= 4));
444
   JNIEnv* const env = mozilla::jni::GetEnvForThread();
445
   MOZ_ASSERT(env);
446
 
447
@@ -1189,21 +1191,25 @@ GeckoChildProcessHost::LaunchAndroidService(const char* type,
448
   for (int ix = 0; ix < argvSize; ix++) {
449
     jargs->SetElement(ix, jni::StringParam(argv[ix].c_str(), env));
450
   }
451
-  base::file_handle_mapping_vector::const_iterator it = fds_to_remap.begin();
452
-  int32_t ipcFd = it->first;
453
-  it++;
454
-  // If the Crash Reporter is disabled, there will not be a second file descriptor.
455
+
456
+  // XXX: this processing depends entirely on the internals of
457
+  // ContentParent::LaunchSubprocess()
458
+  // GeckoChildProcessHost::PerformAsyncLaunchInternal(), and the order in
459
+  // which they append to fds_to_remap. There must be a better way to do it.
460
+  // See bug 1440207.
461
+  int32_t prefsFd = fds_to_remap[0].first;
462
+  int32_t ipcFd = fds_to_remap[1].first;
463
   int32_t crashFd = -1;
464
   int32_t crashAnnotationFd = -1;
465
-  if (it != fds_to_remap.end() && !CrashReporter::IsDummy()) {
466
-    crashFd = it->first;
467
-    it++;
468
+  if (fds_to_remap.size() == 3) {
469
+    crashAnnotationFd = fds_to_remap[2].first;
470
   }
471
-  if (it != fds_to_remap.end()) {
472
-    crashAnnotationFd = it->first;
473
-    it++;
474
+  if (fds_to_remap.size() == 4) {
475
+    crashFd = fds_to_remap[2].first;
476
+    crashAnnotationFd = fds_to_remap[3].first;
477
   }
478
-  int32_t handle = java::GeckoProcessManager::Start(type, jargs, ipcFd, crashFd, crashAnnotationFd);
479
+
480
+  int32_t handle = java::GeckoProcessManager::Start(type, jargs, prefsFd, ipcFd, crashFd, crashAnnotationFd);
481
 
482
   if (process_handle) {
483
     *process_handle = handle;
484
diff --git ipc/glue/GeckoChildProcessHost.h ipc/glue/GeckoChildProcessHost.h
485
index 631c42066bc7..0345e221abcc 100644
486
--- ipc/glue/GeckoChildProcessHost.h
487
+++ ipc/glue/GeckoChildProcessHost.h
488
@@ -103,6 +103,16 @@ public:
489
   }
490
 #endif
491
 
492
+#ifdef XP_WIN
493
+  void AddHandleToShare(HANDLE aHandle) {
494
+    mLaunchOptions->handles_to_inherit.push_back(aHandle);
495
+  }
496
+#else
497
+  void AddFdToRemap(int aSrcFd, int aDstFd) {
498
+    mLaunchOptions->fds_to_remap.push_back(std::make_pair(aSrcFd, aDstFd));
499
+  }
500
+#endif
501
+
502
   /**
503
    * Must run on the IO thread.  Cause the OS process to exit and
504
    * ensure its OS resources are cleaned up.
505
diff --git mobile/android/geckoview/src/main/aidl/org/mozilla/gecko/process/IChildProcess.aidl mobile/android/geckoview/src/main/aidl/org/mozilla/gecko/process/IChildProcess.aidl
506
index ba26ae1ba06b..a2535f44c72b 100644
507
--- mobile/android/geckoview/src/main/aidl/org/mozilla/gecko/process/IChildProcess.aidl
508
+++ mobile/android/geckoview/src/main/aidl/org/mozilla/gecko/process/IChildProcess.aidl
509
@@ -12,6 +12,7 @@ import android.os.ParcelFileDescriptor;
510
 interface IChildProcess {
511
     int getPid();
512
     boolean start(in IProcessManager procMan, in String[] args, in Bundle extras,
513
-                  in ParcelFileDescriptor ipcPfd, in ParcelFileDescriptor crashReporterPfd,
514
+                  in ParcelFileDescriptor prefsPfd, in ParcelFileDescriptor ipcPfd,
515
+                  in ParcelFileDescriptor crashReporterPfd,
516
                   in ParcelFileDescriptor crashAnnotationPfd);
517
 }
518
diff --git mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoThread.java mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoThread.java
519
index dfabfd05daf0..8311920afeec 100644
520
--- mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoThread.java
521
+++ mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoThread.java
522
@@ -128,6 +128,7 @@ public class GeckoThread extends Thread {
523
     public static final int FLAG_PRELOAD_CHILD = 2; // Preload child during main thread start.
524
 
525
     private static final String EXTRA_ARGS = "args";
526
+    private static final String EXTRA_PREFS_FD = "prefsFd";
527
     private static final String EXTRA_IPC_FD = "ipcFd";
528
     private static final String EXTRA_CRASH_FD = "crashFd";
529
     private static final String EXTRA_CRASH_ANNOTATION_FD = "crashAnnotationFd";
530
@@ -149,7 +150,8 @@ public class GeckoThread extends Thread {
531
 
532
     private synchronized boolean init(final GeckoProfile profile, final String[] args,
533
                                       final Bundle extras, final int flags,
534
-                                      final int ipcFd, final int crashFd,
535
+                                      final int prefsFd, final int ipcFd,
536
+                                      final int crashFd,
537
                                       final int crashAnnotationFd) {
538
         ThreadUtils.assertOnUiThread();
539
         uiThreadId = android.os.Process.myTid();
540
@@ -163,6 +165,7 @@ public class GeckoThread extends Thread {
541
         mFlags = flags;
542
 
543
         mExtras = (extras != null) ? new Bundle(extras) : new Bundle(3);
544
+        mExtras.putInt(EXTRA_PREFS_FD, prefsFd);
545
         mExtras.putInt(EXTRA_IPC_FD, ipcFd);
546
         mExtras.putInt(EXTRA_CRASH_FD, crashFd);
547
         mExtras.putInt(EXTRA_CRASH_ANNOTATION_FD, crashAnnotationFd);
548
@@ -174,15 +177,16 @@ public class GeckoThread extends Thread {
549
 
550
     public static boolean initMainProcess(final GeckoProfile profile, final String[] args,
551
                                           final Bundle extras, final int flags) {
552
-        return INSTANCE.init(profile, args, extras, flags,
553
+        return INSTANCE.init(profile, args, extras, flags, /* fd */ -1,
554
                              /* fd */ -1, /* fd */ -1, /* fd */ -1);
555
     }
556
 
557
     public static boolean initChildProcess(final String[] args, final Bundle extras,
558
-                                           final int ipcFd, final int crashFd,
559
+                                           final int prefsFd, final int ipcFd,
560
+                                           final int crashFd,
561
                                            final int crashAnnotationFd) {
562
         return INSTANCE.init(/* profile */ null, args, extras, /* flags */ 0,
563
-                             ipcFd, crashFd, crashAnnotationFd);
564
+                             prefsFd, ipcFd, crashFd, crashAnnotationFd);
565
     }
566
 
567
     private static boolean canUseProfile(final Context context, final GeckoProfile profile,
568
@@ -442,6 +446,7 @@ public class GeckoThread extends Thread {
569
 
570
         // And go.
571
         GeckoLoader.nativeRun(args,
572
+                              mExtras.getInt(EXTRA_PREFS_FD, -1),
573
                               mExtras.getInt(EXTRA_IPC_FD, -1),
574
                               mExtras.getInt(EXTRA_CRASH_FD, -1),
575
                               mExtras.getInt(EXTRA_CRASH_ANNOTATION_FD, -1));
576
diff --git mobile/android/geckoview/src/main/java/org/mozilla/gecko/mozglue/GeckoLoader.java mobile/android/geckoview/src/main/java/org/mozilla/gecko/mozglue/GeckoLoader.java
577
index b1830fd86945..ac128b651e7b 100644
578
--- mobile/android/geckoview/src/main/java/org/mozilla/gecko/mozglue/GeckoLoader.java
579
+++ mobile/android/geckoview/src/main/java/org/mozilla/gecko/mozglue/GeckoLoader.java
580
@@ -463,7 +463,7 @@ public final class GeckoLoader {
581
     public static native boolean verifyCRCs(String apkName);
582
 
583
     // These methods are implemented in mozglue/android/APKOpen.cpp
584
-    public static native void nativeRun(String[] args, int ipcFd, int crashFd, int crashAnnotationFd);
585
+    public static native void nativeRun(String[] args, int prefsFd, int ipcFd, int crashFd, int crashAnnotationFd);
586
     private static native void loadGeckoLibsNative(String apkName);
587
     private static native void loadSQLiteLibsNative(String apkName);
588
     private static native void loadNSSLibsNative(String apkName);
589
diff --git mobile/android/geckoview/src/main/java/org/mozilla/gecko/process/GeckoProcessManager.java mobile/android/geckoview/src/main/java/org/mozilla/gecko/process/GeckoProcessManager.java
590
index b762e1c9a3eb..dba329ba8f92 100644
591
--- mobile/android/geckoview/src/main/java/org/mozilla/gecko/process/GeckoProcessManager.java
592
+++ mobile/android/geckoview/src/main/java/org/mozilla/gecko/process/GeckoProcessManager.java
593
@@ -169,14 +169,14 @@ public final class GeckoProcessManager extends IProcessManager.Stub {
594
 
595
     @WrapForJNI
596
     private static int start(final String type, final String[] args,
597
-                             final int ipcFd, final int crashFd,
598
-                             final int crashAnnotationFd) {
599
-        return INSTANCE.start(type, args, ipcFd, crashFd, crashAnnotationFd, /* retry */ false);
600
+                             final int prefsFd, final int ipcFd,
601
+                             final int crashFd, final int crashAnnotationFd) {
602
+        return INSTANCE.start(type, args, prefsFd, ipcFd, crashFd, crashAnnotationFd, /* retry */ false);
603
     }
604
 
605
-    private int start(final String type, final String[] args, final int ipcFd,
606
-                      final int crashFd, final int crashAnnotationFd,
607
-                      final boolean retry) {
608
+    private int start(final String type, final String[] args, final int prefsFd,
609
+                      final int ipcFd, final int crashFd,
610
+                      final int crashAnnotationFd, final boolean retry) {
611
         final ChildConnection connection = getConnection(type);
612
         final IChildProcess child = connection.bind();
613
         if (child == null) {
614
@@ -184,10 +184,12 @@ public final class GeckoProcessManager extends IProcessManager.Stub {
615
         }
616
 
617
         final Bundle extras = GeckoThread.getActiveExtras();
618
+        final ParcelFileDescriptor prefsPfd;
619
         final ParcelFileDescriptor ipcPfd;
620
         final ParcelFileDescriptor crashPfd;
621
         final ParcelFileDescriptor crashAnnotationPfd;
622
         try {
623
+            prefsPfd = ParcelFileDescriptor.fromFd(prefsFd);
624
             ipcPfd = ParcelFileDescriptor.fromFd(ipcFd);
625
             crashPfd = (crashFd >= 0) ? ParcelFileDescriptor.fromFd(crashFd) : null;
626
             crashAnnotationPfd = (crashAnnotationFd >= 0) ? ParcelFileDescriptor.fromFd(crashAnnotationFd) : null;
627
@@ -198,7 +200,8 @@ public final class GeckoProcessManager extends IProcessManager.Stub {
628
 
629
         boolean started = false;
630
         try {
631
-            started = child.start(this, args, extras, ipcPfd, crashPfd, crashAnnotationPfd);
632
+            started = child.start(this, args, extras, prefsPfd, ipcPfd, crashPfd,
633
+                                  crashAnnotationPfd);
634
         } catch (final RemoteException e) {
635
         }
636
 
637
@@ -209,7 +212,7 @@ public final class GeckoProcessManager extends IProcessManager.Stub {
638
             }
639
             Log.w(LOGTAG, "Attempting to kill running child " + type);
640
             connection.unbind();
641
-            return start(type, args, ipcFd, crashFd, crashAnnotationFd, /* retry */ true);
642
+            return start(type, args, prefsFd, ipcFd, crashFd, crashAnnotationFd, /* retry */ true);
643
         }
644
 
645
         try {
646
diff --git mobile/android/geckoview/src/main/java/org/mozilla/gecko/process/GeckoServiceChildProcess.java mobile/android/geckoview/src/main/java/org/mozilla/gecko/process/GeckoServiceChildProcess.java
647
index f1f6ce109fda..6dc19813fc10 100644
648
--- mobile/android/geckoview/src/main/java/org/mozilla/gecko/process/GeckoServiceChildProcess.java
649
+++ mobile/android/geckoview/src/main/java/org/mozilla/gecko/process/GeckoServiceChildProcess.java
650
@@ -63,6 +63,7 @@ public class GeckoServiceChildProcess extends Service {
651
         public boolean start(final IProcessManager procMan,
652
                              final String[] args,
653
                              final Bundle extras,
654
+                             final ParcelFileDescriptor prefsPfd,
655
                              final ParcelFileDescriptor ipcPfd,
656
                              final ParcelFileDescriptor crashReporterPfd,
657
                              final ParcelFileDescriptor crashAnnotationPfd) {
658
@@ -74,6 +75,7 @@ public class GeckoServiceChildProcess extends Service {
659
                 sProcessManager = procMan;
660
             }
661
 
662
+            final int prefsFd = prefsPfd.detachFd();
663
             final int ipcFd = ipcPfd.detachFd();
664
             final int crashReporterFd = crashReporterPfd != null ?
665
                                         crashReporterPfd.detachFd() : -1;
666
@@ -83,7 +85,7 @@ public class GeckoServiceChildProcess extends Service {
667
             ThreadUtils.postToUiThread(new Runnable() {
668
                 @Override
669
                 public void run() {
670
-                    if (GeckoThread.initChildProcess(args, extras, ipcFd, crashReporterFd,
671
+                    if (GeckoThread.initChildProcess(args, extras, prefsFd, ipcFd, crashReporterFd,
672
                                                      crashAnnotationFd)) {
673
                         GeckoThread.launch();
674
                     }
675
diff --git modules/libpref/Preferences.cpp modules/libpref/Preferences.cpp
676
index 330ed4a09b54..b884591c9271 100644
677
--- modules/libpref/Preferences.cpp
678
+++ modules/libpref/Preferences.cpp
679
@@ -2920,7 +2920,7 @@ public:
680
 
681
 } // namespace
682
 
683
-// A list of prefs sent early from the parent, via the command line.
684
+// A list of prefs sent early from the parent, via shared memory.
685
 static InfallibleTArray<dom::Pref>* gEarlyDomPrefs;
686
 
687
 /* static */ already_AddRefed<Preferences>
688
@@ -3081,11 +3081,130 @@ NS_IMPL_ISUPPORTS(Preferences,
689
                   nsISupportsWeakReference)
690
 
691
 /* static */ void
692
-Preferences::SetEarlyPreferences(const nsTArray<dom::Pref>* aDomPrefs)
693
+Preferences::SerializeEarlyPreferences(nsCString& aStr)
694
+{
695
+  MOZ_RELEASE_ASSERT(InitStaticMembers());
696
+
697
+  nsAutoCStringN<256> boolPrefs, intPrefs, stringPrefs;
698
+  size_t numEarlyPrefs;
699
+  dom::ContentPrefs::GetEarlyPrefs(&numEarlyPrefs);
700
+
701
+  for (unsigned int i = 0; i < numEarlyPrefs; i++) {
702
+    const char* prefName = dom::ContentPrefs::GetEarlyPref(i);
703
+    MOZ_ASSERT_IF(i > 0,
704
+                  strcmp(prefName, dom::ContentPrefs::GetEarlyPref(i - 1)) > 0);
705
+
706
+    Pref* pref = pref_HashTableLookup(prefName);
707
+    if (!pref || !pref->MustSendToContentProcesses()) {
708
+      continue;
709
+    }
710
+
711
+    switch (pref->Type()) {
712
+      case PrefType::Bool:
713
+        boolPrefs.Append(
714
+          nsPrintfCString("%u:%d|", i, Preferences::GetBool(prefName)));
715
+        break;
716
+      case PrefType::Int:
717
+        intPrefs.Append(
718
+          nsPrintfCString("%u:%d|", i, Preferences::GetInt(prefName)));
719
+        break;
720
+      case PrefType::String: {
721
+        nsAutoCString value;
722
+        Preferences::GetCString(prefName, value);
723
+        stringPrefs.Append(
724
+          nsPrintfCString("%u:%d;%s|", i, value.Length(), value.get()));
725
+      } break;
726
+      case PrefType::None:
727
+        break;
728
+      default:
729
+        printf_stderr("preference type: %d\n", int(pref->Type()));
730
+        MOZ_CRASH();
731
+    }
732
+  }
733
+
734
+  aStr.Truncate();
735
+  aStr.Append(boolPrefs);
736
+  aStr.Append('\n');
737
+  aStr.Append(intPrefs);
738
+  aStr.Append('\n');
739
+  aStr.Append(stringPrefs);
740
+  aStr.Append('\n');
741
+  aStr.Append('\0');
742
+}
743
+
744
+/* static */ void
745
+Preferences::DeserializeEarlyPreferences(char* aStr, size_t aStrLen)
746
 {
747
   MOZ_ASSERT(!XRE_IsParentProcess());
748
 
749
-  gEarlyDomPrefs = new InfallibleTArray<dom::Pref>(mozilla::Move(*aDomPrefs));
750
+  MOZ_ASSERT(!gEarlyDomPrefs);
751
+  gEarlyDomPrefs = new InfallibleTArray<dom::Pref>();
752
+
753
+  char* p = aStr;
754
+
755
+  // XXX: we assume these pref values are default values, which may not be
756
+  // true. We also assume they are unlocked. Fortunately, these prefs get reset
757
+  // properly by the first IPC message.
758
+
759
+  // Get the bool prefs.
760
+  while (*p != '\n') {
761
+    int32_t index = strtol(p, &p, 10);
762
+    MOZ_ASSERT(p[0] == ':');
763
+    p++;
764
+    int v = strtol(p, &p, 10);
765
+    MOZ_ASSERT(v == 0 || v == 1);
766
+    dom::MaybePrefValue value(dom::PrefValue(!!v));
767
+    MOZ_ASSERT(p[0] == '|');
768
+    p++;
769
+    dom::Pref pref(nsCString(dom::ContentPrefs::GetEarlyPref(index)),
770
+                   /* isLocked */ false,
771
+                   value,
772
+                   dom::MaybePrefValue());
773
+    gEarlyDomPrefs->AppendElement(pref);
774
+  }
775
+  p++;
776
+
777
+  // Get the int prefs.
778
+  while (*p != '\n') {
779
+    int32_t index = strtol(p, &p, 10);
780
+    MOZ_ASSERT(p[0] == ':');
781
+    p++;
782
+    dom::MaybePrefValue value(
783
+      dom::PrefValue(static_cast<int32_t>(strtol(p, &p, 10))));
784
+    MOZ_ASSERT(p[0] == '|');
785
+    p++;
786
+    dom::Pref pref(nsCString(dom::ContentPrefs::GetEarlyPref(index)),
787
+                   /* isLocked */ false,
788
+                   value,
789
+                   dom::MaybePrefValue());
790
+    gEarlyDomPrefs->AppendElement(pref);
791
+  }
792
+  p++;
793
+
794
+  // Get the string prefs.
795
+  while (*p != '\n') {
796
+    int32_t index = strtol(p, &p, 10);
797
+    MOZ_ASSERT(p[0] == ':');
798
+    p++;
799
+    int32_t length = strtol(p, &p, 10);
800
+    MOZ_ASSERT(p[0] == ';');
801
+    p++;
802
+    dom::MaybePrefValue value(dom::PrefValue(nsCString(p, length)));
803
+    dom::Pref pref(nsCString(dom::ContentPrefs::GetEarlyPref(index)),
804
+                   /* isLocked */ false,
805
+                   value,
806
+                   dom::MaybePrefValue());
807
+    gEarlyDomPrefs->AppendElement(pref);
808
+    p += length + 1;
809
+    MOZ_ASSERT(*(p - 1) == '|');
810
+  }
811
+  p++;
812
+
813
+  MOZ_ASSERT(*p == '\0');
814
+
815
+  // We finished parsing on a '\0'. That should be the last char in the shared
816
+  // memory.
817
+  MOZ_ASSERT(aStr + aStrLen - 1 == p);
818
 
819
 #ifdef DEBUG
820
   MOZ_ASSERT(gPhase == ContentProcessPhase::eNoPrefsSet);
821
@@ -4298,15 +4417,6 @@ Preferences::HasUserValue(const char* aPrefName)
822
   return pref && pref->HasUserValue();
823
 }
824
 
825
-/* static */ bool
826
-Preferences::MustSendToContentProcesses(const char* aPrefName)
827
-{
828
-  NS_ENSURE_TRUE(InitStaticMembers(), false);
829
-
830
-  Pref* pref = pref_HashTableLookup(aPrefName);
831
-  return pref && pref->MustSendToContentProcesses();
832
-}
833
-
834
 /* static */ int32_t
835
 Preferences::GetType(const char* aPrefName)
836
 {
837
diff --git modules/libpref/Preferences.h modules/libpref/Preferences.h
838
index 1cb825ecbfe5..c149db62b525 100644
839
--- modules/libpref/Preferences.h
840
+++ modules/libpref/Preferences.h
841
@@ -41,6 +41,11 @@ class PrefValue;
842
 
843
 struct PrefsSizes;
844
 
845
+#ifdef XP_UNIX
846
+// XXX: bug 1440207 is about improving how fixed fds such as this are used.
847
+static const int kPrefsFileDescriptor = 8;
848
+#endif
849
+
850
 // Keep this in sync with PrefType in parser/src/lib.rs.
851
 enum class PrefValueKind : uint8_t
852
 {
853
@@ -230,9 +235,6 @@ public:
854
   // Whether the pref has a user value or not.
855
   static bool HasUserValue(const char* aPref);
856
 
857
-  // Must the pref be sent to content processes when they start?
858
-  static bool MustSendToContentProcesses(const char* aPref);
859
-
860
   // Adds/Removes the observer for the root pref branch. See nsIPrefBranch.idl
861
   // for details.
862
   static nsresult AddStrongObserver(nsIObserver* aObserver, const char* aPref);
863
@@ -328,11 +330,12 @@ public:
864
 
865
   // When a content process is created these methods are used to pass prefs in
866
   // bulk from the parent process. "Early" preferences are ones that are needed
867
-  // very early on in the content process's lifetime; they are passed via the
868
-  // command line. "Late" preferences are the remainder, which are passed via
869
-  // IPC message.
870
+  // very early on in the content process's lifetime; they are passed via a
871
+  // special shared memory segment. "Late" preferences are the remainder, which
872
+  // are passed via a standard IPC message.
873
+  static void SerializeEarlyPreferences(nsCString& aStr);
874
+  static void DeserializeEarlyPreferences(char* aStr, size_t aStrLen);
875
   static void GetPreferences(InfallibleTArray<dom::Pref>* aSettings);
876
-  static void SetEarlyPreferences(const nsTArray<dom::Pref>* aSettings);
877
   static void SetLatePreferences(const nsTArray<dom::Pref>* aSettings);
878
 
879
   // When a single pref is changed in the parent process, these methods are
880
diff --git mozglue/android/APKOpen.cpp mozglue/android/APKOpen.cpp
881
index 5f1ef55b605e..b57192488725 100644
882
--- mozglue/android/APKOpen.cpp
883
+++ mozglue/android/APKOpen.cpp
884
@@ -392,7 +392,7 @@ FreeArgv(char** argv, int argc)
885
 }
886
 
887
 extern "C" APKOPEN_EXPORT void MOZ_JNICALL
888
-Java_org_mozilla_gecko_mozglue_GeckoLoader_nativeRun(JNIEnv *jenv, jclass jc, jobjectArray jargs, int ipcFd, int crashFd, int crashAnnotationFd)
889
+Java_org_mozilla_gecko_mozglue_GeckoLoader_nativeRun(JNIEnv *jenv, jclass jc, jobjectArray jargs, int prefsFd, int ipcFd, int crashFd, int crashAnnotationFd)
890
 {
891
   int argc = 0;
892
   char** argv = CreateArgvFromObjectArray(jenv, jargs, &argc);
893
@@ -407,7 +407,7 @@ Java_org_mozilla_gecko_mozglue_GeckoLoader_nativeRun(JNIEnv *jenv, jclass jc, jo
894
     gBootstrap->GeckoStart(jenv, argv, argc, sAppData);
895
     ElfLoader::Singleton.ExpectShutdown(true);
896
   } else {
897
-    gBootstrap->XRE_SetAndroidChildFds(jenv, ipcFd, crashFd, crashAnnotationFd);
898
+    gBootstrap->XRE_SetAndroidChildFds(jenv, prefsFd, ipcFd, crashFd, crashAnnotationFd);
899
     gBootstrap->XRE_SetProcessType(argv[argc - 1]);
900
 
901
     XREChildData childData;
902
diff --git toolkit/xre/Bootstrap.cpp toolkit/xre/Bootstrap.cpp
903
index 5688519822a9..7e857969a4fb 100644
904
--- toolkit/xre/Bootstrap.cpp
905
+++ toolkit/xre/Bootstrap.cpp
906
@@ -78,8 +78,8 @@ public:
907
     ::GeckoStart(aEnv, argv, argc, aAppData);
908
   }
909
 
910
-  virtual void XRE_SetAndroidChildFds(JNIEnv* aEnv, int aIPCFd, int aCrashFd, int aCrashAnnotationFd) override {
911
-    ::XRE_SetAndroidChildFds(aEnv, aIPCFd, aCrashFd, aCrashAnnotationFd);
912
+  virtual void XRE_SetAndroidChildFds(JNIEnv* aEnv, int aPrefsFd, int aIPCFd, int aCrashFd, int aCrashAnnotationFd) override {
913
+    ::XRE_SetAndroidChildFds(aEnv, aPrefsFd, aIPCFd, aCrashFd, aCrashAnnotationFd);
914
   }
915
 #endif
916
 
917
diff --git toolkit/xre/Bootstrap.h toolkit/xre/Bootstrap.h
918
index 686d0a38e324..77adcef80e1f 100644
919
--- toolkit/xre/Bootstrap.h
920
+++ toolkit/xre/Bootstrap.h
921
@@ -113,7 +113,7 @@ public:
922
 #ifdef MOZ_WIDGET_ANDROID
923
   virtual void GeckoStart(JNIEnv* aEnv, char** argv, int argc, const StaticXREAppData& aAppData) = 0;
924
 
925
-  virtual void XRE_SetAndroidChildFds(JNIEnv* aEnv, int aIPCFd, int aCrashFd, int aCrashAnnotationFd) = 0;
926
+  virtual void XRE_SetAndroidChildFds(JNIEnv* aEnv, int aPrefsFd, int aIPCFd, int aCrashFd, int aCrashAnnotationFd) = 0;
927
 #endif
928
 
929
 #ifdef LIBFUZZER
930
diff --git toolkit/xre/nsEmbedFunctions.cpp toolkit/xre/nsEmbedFunctions.cpp
931
index 53bd2bc2eb47..83184e97ba92 100644
932
--- toolkit/xre/nsEmbedFunctions.cpp
933
+++ toolkit/xre/nsEmbedFunctions.cpp
934
@@ -243,9 +243,10 @@ GeckoProcessType sChildProcessType = GeckoProcessType_Default;
935
 
936
 #if defined(MOZ_WIDGET_ANDROID)
937
 void
938
-XRE_SetAndroidChildFds (JNIEnv* env, int ipcFd, int crashFd, int crashAnnotationFd)
939
+XRE_SetAndroidChildFds (JNIEnv* env, int prefsFd, int ipcFd, int crashFd, int crashAnnotationFd)
940
 {
941
   mozilla::jni::SetGeckoThreadEnv(env);
942
+  mozilla::dom::SetPrefsFd(prefsFd);
943
   IPC::Channel::SetClientChannelFd(ipcFd);
944
   CrashReporter::SetNotificationPipeForChild(crashFd);
945
   CrashReporter::SetCrashAnnotationPipeForChild(crashAnnotationFd);
946
diff --git widget/android/GeneratedJNIWrappers.cpp widget/android/GeneratedJNIWrappers.cpp
947
index e3f6af0cc575..4165df59f0e8 100644
948
--- widget/android/GeneratedJNIWrappers.cpp
949
+++ widget/android/GeneratedJNIWrappers.cpp
950
@@ -2355,9 +2355,9 @@ constexpr char GeckoProcessManager::GetEditableParent_t::signature[];
951
 constexpr char GeckoProcessManager::Start_t::name[];
952
 constexpr char GeckoProcessManager::Start_t::signature[];
953
 
954
-auto GeckoProcessManager::Start(mozilla::jni::String::Param a0, mozilla::jni::ObjectArray::Param a1, int32_t a2, int32_t a3, int32_t a4) -> int32_t
955
+auto GeckoProcessManager::Start(mozilla::jni::String::Param a0, mozilla::jni::ObjectArray::Param a1, int32_t a2, int32_t a3, int32_t a4, int32_t a5) -> int32_t
956
 {
957
-    return mozilla::jni::Method<Start_t>::Call(GeckoProcessManager::Context(), nullptr, a0, a1, a2, a3, a4);
958
+    return mozilla::jni::Method<Start_t>::Call(GeckoProcessManager::Context(), nullptr, a0, a1, a2, a3, a4, a5);
959
 }
960
 
961
 const char GeckoServiceChildProcess::name[] =
962
diff --git widget/android/GeneratedJNIWrappers.h widget/android/GeneratedJNIWrappers.h
963
index ece79ac94a71..228affa1e550 100644
964
--- widget/android/GeneratedJNIWrappers.h
965
+++ widget/android/GeneratedJNIWrappers.h
966
@@ -6696,10 +6696,11 @@ public:
967
                 mozilla::jni::ObjectArray::Param,
968
                 int32_t,
969
                 int32_t,
970
+                int32_t,
971
                 int32_t> Args;
972
         static constexpr char name[] = "start";
973
         static constexpr char signature[] =
974
-                "(Ljava/lang/String;[Ljava/lang/String;III)I";
975
+                "(Ljava/lang/String;[Ljava/lang/String;IIII)I";
976
         static const bool isStatic = true;
977
         static const mozilla::jni::ExceptionMode exceptionMode =
978
                 mozilla::jni::ExceptionMode::ABORT;
979
@@ -6709,7 +6710,7 @@ public:
980
                 mozilla::jni::DispatchTarget::CURRENT;
981
     };
982
 
983
-    static auto Start(mozilla::jni::String::Param, mozilla::jni::ObjectArray::Param, int32_t, int32_t, int32_t) -> int32_t;
984
+    static auto Start(mozilla::jni::String::Param, mozilla::jni::ObjectArray::Param, int32_t, int32_t, int32_t, int32_t) -> int32_t;
985
 
986
     static const mozilla::jni::CallingThread callingThread =
987
             mozilla::jni::CallingThread::ANY;
988
diff --git xpcom/build/nsXULAppAPI.h xpcom/build/nsXULAppAPI.h
989
index 94f6daf864c9..d6ac10d51d76 100644
990
--- xpcom/build/nsXULAppAPI.h
991
+++ xpcom/build/nsXULAppAPI.h
992
@@ -398,7 +398,7 @@ XRE_API(const char*,
993
 
994
 #if defined(MOZ_WIDGET_ANDROID)
995
 XRE_API(void,
996
-        XRE_SetAndroidChildFds, (JNIEnv* env, int ipcFd, int crashFd, int crashAnnotationFd))
997
+        XRE_SetAndroidChildFds, (JNIEnv* env, int prefsFd, int ipcFd, int crashFd, int crashAnnotationFd))
998
 #endif // defined(MOZ_WIDGET_ANDROID)
999
 
1000
 XRE_API(void,
(-)a/www/firefox/files/patch-bug1444083 (-17 lines)
Removed Link Here
1
Disable custom styling for <select> and <option> on Tier3 as well
2
3
diff --git modules/libpref/init/all.js modules/libpref/init/all.js
4
index 322d009da739..06e2fd7f664a 100644
5
--- modules/libpref/init/all.js
6
+++ modules/libpref/init/all.js
7
@@ -1359,8 +1359,8 @@ pref("dom.forms.autocomplete.formautofill", false);
8
 // Enable search in <select> dropdowns (more than 40 options)
9
 pref("dom.forms.selectSearch", false);
10
 // Allow for webpages to provide custom styling for <select>
11
-// popups. Disabled on Linux due to bug 1338283.
12
-#ifdef XP_LINUX
13
+// popups. Disabled on GTK due to bug 1338283.
14
+#ifdef MOZ_WIDGET_GTK
15
 pref("dom.forms.select.customstyling", false);
16
 #else
17
 pref("dom.forms.select.customstyling", true);
(-)b/www/firefox/files/patch-bug1444798 (-7 / +7 lines)
Lines 11-17 diff --git gfx/webrender_bindings/src/bindings.rs gfx/webrender_bindings/src/bin Link Here
11
index 8517d7dd33e5..cf885ee713f3 100644
11
index 8517d7dd33e5..cf885ee713f3 100644
12
--- gfx/webrender_bindings/src/bindings.rs
12
--- gfx/webrender_bindings/src/bindings.rs
13
+++ gfx/webrender_bindings/src/bindings.rs
13
+++ gfx/webrender_bindings/src/bindings.rs
14
@@ -290,8 +290,8 @@ struct WrExternalImage {
14
@@ -312,8 +312,8 @@ struct WrExternalImage {
15
     size: usize,
15
     size: usize,
16
 }
16
 }
17
 
17
 
Lines 22-38 index 8517d7dd33e5..cf885ee713f3 100644 Link Here
22
 
22
 
23
 #[repr(C)]
23
 #[repr(C)]
24
 pub struct WrExternalImageHandler {
24
 pub struct WrExternalImageHandler {
25
@@ -305,8 +305,8 @@ impl ExternalImageHandler for WrExternalImageHandler {
25
@@ -327,7 +327,8 @@ impl ExternalImageHandler for WrExternalImageHandler {
26
             id: ExternalImageId,
26
             id: ExternalImageId,
27
             channel_index: u8)
27
             channel_index: u8)
28
             -> ExternalImage {
28
             -> ExternalImage {
29
-        let image = (self.lock_func)(self.external_image_obj, id.into(), channel_index);
29
-        let image = (self.lock_func)(self.external_image_obj, id.into(), channel_index);
30
 
30
+
31
+        let image = unsafe { (self.lock_func)(self.external_image_obj, id.into(), channel_index) };
31
+        let image = unsafe { (self.lock_func)(self.external_image_obj, id.into(), channel_index) };
32
         match image.image_type {
32
         ExternalImage {
33
             WrExternalImageType::NativeTexture => {
33
             uv: TexelRect::new(image.u0, image.v0, image.u1, image.v1),
34
                 ExternalImage {
34
             source: match image.image_type {
35
@@ -341,7 +341,9 @@ impl ExternalImageHandler for WrExternalImageHandler {
35
@@ -341,7 +342,9 @@ impl ExternalImageHandler for WrExternalImageHandler {
36
     fn unlock(&mut self,
36
     fn unlock(&mut self,
37
               id: ExternalImageId,
37
               id: ExternalImageId,
38
               channel_index: u8) {
38
               channel_index: u8) {
(-)a/www/firefox/files/patch-bug826985 (-171 lines)
Removed Link Here
1
commit 8024d93
2
Author: Henrik Gulbrandsen <henrik@gulbra.net>
3
Date:   Fri Jan 4 13:49:22 2013 +0100
4
5
    Bug 826985 - Support more video formats for WebRTC via libv4l2 on Linux.
6
---
7
 config/system-headers                                   |  1 +
8
 old-configure.in                                        |  7 +++++++
9
 media/webrtc/signaling/test/Makefile.in                 |  1 +
10
 .../modules/video_capture/linux/device_info_linux.cc    | 17 +++++++++++++++++
11
 .../modules/video_capture/linux/video_capture_linux.cc  | 16 +++++++++++++++-
12
 .../webrtc/modules/video_capture/video_capture.gypi     | 11 +++++++++++
13
 toolkit/library/Makefile.in                             |  1 +
14
 6 files changed, 52 insertions(+), 1 deletion(-)
15
16
diff --git config/system-headers.mozbuild config/system-headers.mozbuild
17
index e02d381a12e9..7620b4d00623 100644
18
--- config/system-headers.mozbuild
19
+++ config/system-headers.mozbuild
20
@@ -428,6 +428,7 @@ system_headers = [
21
     'libgnomeui/gnome-icon-theme.h',
22
     'libgnomeui/gnome-ui-init.h',
23
     'libutil.h',
24
+    'libv4l2.h',
25
     'limits.h',
26
     'link.h',
27
     'linux/ioprio.h',
28
diff --git old-configure.in configure.in
29
index 55e4cd1..76567b3 100644
30
--- old-configure.in
31
+++ old-configure.in
32
@@ -2558,6 +2558,9 @@ if test -n "$MOZ_WEBRTC"; then
33
     if test -n "$MOZ_X11"; then
34
       MOZ_WEBRTC_X11_LIBS="-lXext -lXdamage -lXfixes -lXcomposite"
35
     fi
36
+
37
+    dnl with libv4l2 we can support more cameras
38
+    PKG_CHECK_MODULES(MOZ_LIBV4L2, libv4l2)
39
 else
40
     MOZ_SYNTH_PICO=
41
 fi
42
diff --git build/gyp.mozbuild build/gyp.mozbuild
43
index b483cd1..f1dd1f0 100644
44
--- build/gyp.mozbuild
45
+++ build/gyp.mozbuild
46
@@ -11,6 +11,7 @@ gyp_vars = {
47
     'have_ethtool_cmd_speed_hi': 1 if CONFIG['MOZ_WEBRTC_HAVE_ETHTOOL_SPEED_HI'] else 0,
48
     'include_alsa_audio': 1 if CONFIG['MOZ_ALSA'] else 0,
49
     'include_pulse_audio': 1 if CONFIG['MOZ_PULSEAUDIO'] else 0,
50
+    'use_libv4l2': 1 if CONFIG['MOZ_LIBV4L2_LIBS'] else 0,
51
     # basic stuff for everything
52
     'include_internal_video_render': 0,
53
     'clang_use_chrome_plugins': 0,
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
55
index 239a292..bab496c 100644
56
--- media/webrtc/trunk/webrtc/modules/video_capture/linux/device_info_linux.cc
57
+++ media/webrtc/trunk/webrtc/modules/video_capture/linux/device_info_linux.cc
58
@@ -25,6 +25,9 @@
59
 #else
60
 #include <linux/videodev2.h>
61
 #endif
62
+#ifdef HAVE_LIBV4L2
63
+#include <libv4l2.h>
64
+#endif
65
 
66
 #include "webrtc/system_wrappers/interface/ref_count.h"
67
 #include "webrtc/system_wrappers/interface/trace.h"
68
@@ -34,6 +37,15 @@
69
 #define BUF_LEN     ( 1024 * ( EVENT_SIZE + 16 ) )
70
 #endif
71
 
72
+#ifdef HAVE_LIBV4L2
73
+#define open	v4l2_open
74
+#define close	v4l2_close
75
+#define dup	v4l2_dup
76
+#define ioctl	v4l2_ioctl
77
+#define mmap	v4l2_mmap
78
+#define munmap	v4l2_munmap
79
+#endif
80
+
81
 namespace webrtc
82
 {
83
 namespace videocapturemodule
84
@@ -274,6 +286,11 @@ int32_t DeviceInfoLinux::GetDeviceName(
85
     memset(deviceNameUTF8, 0, deviceNameLength);
86
     memcpy(cameraName, cap.card, sizeof(cap.card));
87
 
88
+    if (cameraName[0] == '\0')
89
+    {
90
+        sprintf(cameraName, "Camera at /dev/video%d", deviceNumber);
91
+    }
92
+
93
     if (deviceNameLength >= strlen(cameraName))
94
     {
95
         memcpy(deviceNameUTF8, cameraName, strlen(cameraName));
96
diff --git media/webrtc/trunk/webrtc/modules/video_capture/linux/video_capture_linux.cc media/webrtc/trunk/webrtc/modules/video_capture/linux/video_capture_linux.cc
97
index 12df1b3..e9863ba 100644
98
--- media/webrtc/trunk/webrtc/modules/video_capture/linux/video_capture_linux.cc
99
+++ media/webrtc/trunk/webrtc/modules/video_capture/linux/video_capture_linux.cc
100
@@ -25,6 +25,9 @@
101
 #else
102
 #include <linux/videodev2.h>
103
 #endif
104
+#ifdef HAVE_LIBV4L2
105
+#include <libv4l2.h>
106
+#endif
107
 
108
 #include <new>
109
 
110
@@ -32,6 +35,15 @@
111
 #include "webrtc/modules/video_capture/linux/video_capture_linux.h"
112
 #include "webrtc/system_wrappers/include/critical_section_wrapper.h"
113
 #include "webrtc/system_wrappers/include/trace.h"
114
+
115
+#ifdef HAVE_LIBV4L2
116
+#define open	v4l2_open
117
+#define close	v4l2_close
118
+#define dup	v4l2_dup
119
+#define ioctl	v4l2_ioctl
120
+#define mmap	v4l2_mmap
121
+#define munmap	v4l2_munmap
122
+#endif
123
 
124
 namespace webrtc {
125
 namespace videocapturemodule {
126
diff --git media/webrtc/trunk/webrtc/modules/video_capture/video_capture.gypi media/webrtc/trunk/webrtc/modules/video_capture/video_capture.gypi
127
index d46b5aa..e452223 100644
128
--- media/webrtc/trunk/webrtc/modules/video_capture/video_capture.gypi
129
+++ media/webrtc/trunk/webrtc/modules/video_capture/video_capture.gypi
130
@@ -7,6 +7,9 @@
131
 # be found in the AUTHORS file in the root of the source tree.
132
 
133
 {
134
+  'variables': {
135
+     'use_libv4l2%': 0,
136
+  },
137
   'targets': [
138
     {
139
       'target_name': 'video_capture_module',
140
@@ -76,6 +76,19 @@
141
                 'linux/video_capture_linux.cc',
142
                 'linux/video_capture_linux.h',
143
               ],
144
+              'conditions': [
145
+                ['use_libv4l2==1', {
146
+                  'defines': [
147
+                    'HAVE_LIBV4L2',
148
+                  ],
149
+                  'cflags_mozilla': [
150
+                    '$(MOZ_LIBV4L2_CFLAGS)',
151
+                  ],
152
+                  'libraries': [
153
+                    '-lv4l2',
154
+                  ],
155
+                }],
156
+              ],
157
             }],
158
             ['OS=="mac"', {
159
               'sources': [
160
diff --git toolkit/library/moz.build toolkit/library/moz.build
161
index 9c16ffa..1db3794 100644
162
--- toolkit/library/moz.build
163
+++ toolkit/library/moz.build
164
@@ -163,6 +163,7 @@ if CONFIG['OS_ARCH'] == 'Linux' and CONF
165
     ]
166
 
167
 OS_LIBS += CONFIG['MOZ_CAIRO_OSLIBS']
168
+OS_LIBS += CONFIG['MOZ_LIBV4L2_LIBS']
169
 OS_LIBS += CONFIG['MOZ_WEBRTC_X11_LIBS']
170
 OS_LIBS += CONFIG['MOZ_APP_EXTRA_LIBS']
171
 
(-)b/www/firefox/files/patch-z-bug1436911 (+1162 lines)
Added Link Here
1
commit 6b81d0b99f20
2
Author: Nicholas Nethercote <nnethercote@mozilla.com>
3
Date:   Thu Mar 8 15:47:24 2018 +1100
4
5
    Bug 1436911 - Avoid the early/late prefs split. r=glandium
6
    
7
    All prefs that need to be sent to a new content process are now put into the
8
    shared memory segment, and they are identified by the pref name instead of an
9
    index into a list. The old IPC used at process startup (in XPCOMInitData) is
10
    removed.
11
    
12
    Benefits:
13
    
14
    - It removes the need for the early prefs list
15
      (dom/ipc/ContentProcesses.{h,cpp}) and the associated checking, which is ugly
16
      and often trips people up (e.g. bug 1432979, bug 1439406).
17
    
18
    - Using prefnames instead of indices fixes some fragility (fixing bug 1419432).
19
    
20
    - It fixes the problem of early prefs being installed as unlocked default
21
      values even if they are locked and/or have user values.
22
    
23
    MozReview-Commit-ID: FRIzHF8Tjd
24
---
25
 dom/ipc/ContentChild.cpp        |   2 -
26
 dom/ipc/ContentParent.cpp       |   4 +-
27
 dom/ipc/ContentPrefs.cpp        | 357 ------------------------------
28
 dom/ipc/ContentPrefs.h          |  27 ---
29
 dom/ipc/ContentProcess.cpp      |   5 +-
30
 dom/ipc/PContent.ipdl           |   7 +-
31
 dom/ipc/moz.build               |   2 -
32
 layout/style/nsCSSProps.h       |   2 +-
33
 modules/libpref/Preferences.cpp | 470 ++++++++++++++++++++++------------------
34
 modules/libpref/Preferences.h   |  15 +-
35
 10 files changed, 278 insertions(+), 613 deletions(-)
36
37
diff --git dom/ipc/ContentChild.cpp dom/ipc/ContentChild.cpp
38
index f61ab07b81e2..af1ef9cf4c7e 100644
39
--- dom/ipc/ContentChild.cpp
40
+++ dom/ipc/ContentChild.cpp
41
@@ -1185,8 +1185,6 @@ void
42
 ContentChild::InitXPCOM(const XPCOMInitData& aXPCOMInit,
43
                         const mozilla::dom::ipc::StructuredCloneData& aInitialData)
44
 {
45
-  Preferences::SetLatePreferences(&aXPCOMInit.prefs());
46
-
47
   // Do this as early as possible to get the parent process to initialize the
48
   // background thread since we'll likely need database information very soon.
49
   BackgroundChild::Startup();
50
diff --git dom/ipc/ContentParent.cpp dom/ipc/ContentParent.cpp
51
index 208bb47a970b..4ce5c6bf23d5 100644
52
--- dom/ipc/ContentParent.cpp
53
+++ dom/ipc/ContentParent.cpp
54
@@ -197,7 +197,6 @@
55
 
56
 #include "nsLayoutStylesheetCache.h"
57
 
58
-#include "ContentPrefs.h"
59
 #include "mozilla/Sprintf.h"
60
 
61
 #ifdef MOZ_WEBRTC
62
@@ -2009,7 +2008,7 @@ ContentParent::LaunchSubprocess(ProcessPriority aInitialPriority /* = PROCESS_PR
63
 
64
   // Serialize the early prefs.
65
   nsAutoCStringN<1024> prefs;
66
-  Preferences::SerializeEarlyPreferences(prefs);
67
+  Preferences::SerializePreferences(prefs);
68
 
69
   // Set up the shared memory.
70
   base::SharedMemory shm;
71
@@ -2228,7 +2227,6 @@ ContentParent::InitInternal(ProcessPriority aInitialPriority)
72
 
73
   XPCOMInitData xpcomInit;
74
 
75
-  Preferences::GetPreferences(&xpcomInit.prefs());
76
   nsCOMPtr<nsIIOService> io(do_GetIOService());
77
   MOZ_ASSERT(io, "No IO service?");
78
   DebugOnly<nsresult> rv = io->GetOffline(&xpcomInit.isOffline());
79
diff --git dom/ipc/ContentPrefs.cpp dom/ipc/ContentPrefs.cpp
80
deleted file mode 100644
81
index 808b797d9bee..000000000000
82
--- dom/ipc/ContentPrefs.cpp
83
+++ /dev/null
84
@@ -1,360 +0,0 @@
85
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
86
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
87
-/* This Source Code Form is subject to the terms of the Mozilla Public
88
- * License, v. 2.0. If a copy of the MPL was not distributed with this
89
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
90
-
91
-#include "ContentPrefs.h"
92
-
93
-/******************************************************************************
94
- *
95
- *           DO NOT ADD PREFS TO THIS LIST WITHOUT DOM PEER REVIEW
96
- *
97
- * This is the list of preferences that are sent to the content process on
98
- * startup. Only prefs that are required immediately upon startup should be
99
- * listed here. The first IPC message received in the content process will
100
- * contain all the other prefs. Prefs should only be listed here if they must be
101
- * read before the first IPC message is received.
102
- *
103
- ******************************************************************************/
104
-
105
-const char* mozilla::dom::ContentPrefs::gEarlyPrefs[] = {
106
-  "accessibility.monoaudio.enable",
107
-  "accessibility.mouse_focuses_formcontrol",
108
-  "accessibility.tabfocus_applies_to_xul",
109
-  "app.update.channel",
110
-  "browser.autofocus",
111
-  "browser.dom.window.dump.enabled",
112
-  "browser.sessionhistory.max_entries",
113
-  "browser.sessionhistory.max_total_viewers",
114
-#if defined(NIGHTLY_BUILD) || defined(DEBUG)
115
-  "browser.startup.record",
116
-#endif
117
-#if defined(ANDROID)
118
-  "consoleservice.logcat",
119
-#endif
120
-  "content.cors.disable",
121
-  "content.cors.no_private_data",
122
-  "content.notify.backoffcount",
123
-  "content.notify.interval",
124
-  "content.notify.ontimer",
125
-  "content.sink.enable_perf_mode",
126
-  "content.sink.event_probe_rate",
127
-  "content.sink.initial_perf_time",
128
-  "content.sink.interactive_deflect_count",
129
-  "content.sink.interactive_parse_time",
130
-  "content.sink.interactive_time",
131
-  "content.sink.pending_event_mode",
132
-  "content.sink.perf_deflect_count",
133
-  "content.sink.perf_parse_time",
134
-  "device.storage.prompt.testing",
135
-  "device.storage.writable.name",
136
-  "devtools.enabled",
137
-  "dom.allow_XUL_XBL_for_file",
138
-  "dom.allow_cut_copy",
139
-  "dom.animations-api.core.enabled",
140
-  "dom.animations-api.element-animate.enabled",
141
-  "dom.animations-api.pending-member.enabled",
142
-  "dom.enable_frame_timing",
143
-  "dom.enable_performance",
144
-  "dom.enable_performance_navigation_timing",
145
-  "dom.enable_resource_timing",
146
-  "dom.event.handling-user-input-time-limit",
147
-  "dom.event.touch.coalescing.enabled",
148
-  "dom.forms.autocomplete.formautofill",
149
-  "dom.forms.inputmode",
150
-  "dom.input.skip_cursor_move_for_same_value_set",
151
-  "dom.ipc.processPriorityManager.backgroundGracePeriodMS",
152
-  "dom.ipc.processPriorityManager.backgroundPerceivableGracePeriodMS",
153
-  "dom.ipc.useNativeEventProcessing.content",
154
-  "dom.max_chrome_script_run_time",
155
-  "dom.max_ext_content_script_run_time",
156
-  "dom.max_script_run_time",
157
-  "dom.mozBrowserFramesEnabled",
158
-  "dom.performance.enable_notify_performance_timing",
159
-  "dom.performance.enable_user_timing_logging",
160
-  "dom.placeholder.show_on_focus",
161
-  "dom.requestIdleCallback.enabled",
162
-  "dom.script_loader.bytecode_cache.enabled",
163
-  "dom.script_loader.bytecode_cache.strategy",
164
-  "dom.storage.testing",
165
-  "dom.url.encode_decode_hash",
166
-  "dom.url.getters_decode_hash",
167
-  "dom.use_watchdog",
168
-  "dom.vibrator.enabled",
169
-  "dom.vibrator.max_vibrate_list_len",
170
-  "dom.vibrator.max_vibrate_ms",
171
-  "dom.webcomponents.customelements.enabled",
172
-  "dom.webcomponents.shadowdom.enabled",
173
-  "focusmanager.testmode",
174
-  "font.size.inflation.disabledInMasterProcess",
175
-  "font.size.inflation.emPerLine",
176
-  "font.size.inflation.forceEnabled",
177
-  "font.size.inflation.lineThreshold",
178
-  "font.size.inflation.mappingIntercept",
179
-  "font.size.inflation.maxRatio",
180
-  "font.size.inflation.minTwips",
181
-  "font.size.systemFontScale",
182
-  "full-screen-api.allow-trusted-requests-only",
183
-  "full-screen-api.enabled",
184
-  "full-screen-api.unprefix.enabled",
185
-#ifdef FUZZING
186
-  "fuzzing.enabled",
187
-#endif
188
-  "gfx.font_rendering.opentype_svg.enabled",
189
-  "hangmonitor.timeout",
190
-  "html5.flushtimer.initialdelay",
191
-  "html5.flushtimer.subsequentdelay",
192
-  "html5.offmainthread",
193
-  "intl.charset.fallback.tld",
194
-  "intl.charset.fallback.utf8_for_file",
195
-  "intl.ime.hack.on_ime_unaware_apps.fire_key_events_for_composition",
196
-  "javascript.enabled",
197
-  "javascript.options.array_prototype_values",
198
-  "javascript.options.asmjs",
199
-  "javascript.options.asyncstack",
200
-  "javascript.options.baselinejit",
201
-  "javascript.options.baselinejit.threshold",
202
-  "javascript.options.baselinejit.unsafe_eager_compilation",
203
-  "javascript.options.discardSystemSource",
204
-  "javascript.options.dump_stack_on_debuggee_would_run",
205
-  "javascript.options.gczeal",
206
-  "javascript.options.gczeal.frequency",
207
-  "javascript.options.ion",
208
-  "javascript.options.ion.offthread_compilation",
209
-  "javascript.options.ion.threshold",
210
-  "javascript.options.ion.unsafe_eager_compilation",
211
-  "javascript.options.jit.full_debug_checks",
212
-  "javascript.options.native_regexp",
213
-  "javascript.options.parallel_parsing",
214
-  "javascript.options.shared_memory",
215
-  "javascript.options.spectre.index_masking",
216
-  "javascript.options.spectre.jit_to_C++_calls",
217
-  "javascript.options.spectre.object_mitigations.barriers",
218
-  "javascript.options.spectre.object_mitigations.misc",
219
-  "javascript.options.spectre.string_mitigations",
220
-  "javascript.options.spectre.value_masking",
221
-  "javascript.options.streams",
222
-  "javascript.options.strict",
223
-  "javascript.options.strict.debug",
224
-  "javascript.options.throw_on_asmjs_validation_failure",
225
-  "javascript.options.throw_on_debuggee_would_run",
226
-  "javascript.options.wasm",
227
-  "javascript.options.wasm_baselinejit",
228
-  "javascript.options.wasm_ionjit",
229
-  "javascript.options.werror",
230
-  "javascript.use_us_english_locale",
231
-  "jsloader.shareGlobal",
232
-  "layout.css.all-shorthand.enabled",
233
-  "layout.css.background-blend-mode.enabled",
234
-  "layout.css.box-decoration-break.enabled",
235
-  "layout.css.color-adjust.enabled",
236
-  "layout.css.column-span.enabled",
237
-  "layout.css.contain.enabled",
238
-  "layout.css.control-characters.visible",
239
-  "layout.css.emulate-moz-box-with-flex",
240
-  "layout.css.expensive-style-struct-assertions.enabled",
241
-  "layout.css.float-logical-values.enabled",
242
-  "layout.css.font-display.enabled",
243
-  "layout.css.font-variations.enabled",
244
-  "layout.css.frames-timing.enabled",
245
-  "layout.css.getBoxQuads.enabled",
246
-  "layout.css.grid-template-subgrid-value.enabled",
247
-  "layout.css.grid.enabled",
248
-  "layout.css.image-orientation.enabled",
249
-  "layout.css.individual-transform.enabled",
250
-  "layout.css.initial-letter.enabled",
251
-  "layout.css.isolation.enabled",
252
-  "layout.css.mix-blend-mode.enabled",
253
-  "layout.css.moz-document.content.enabled",
254
-  "layout.css.osx-font-smoothing.enabled",
255
-  "layout.css.overflow-clip-box.enabled",
256
-  "layout.css.overscroll-behavior.enabled",
257
-  "layout.css.prefixes.animations",
258
-  "layout.css.prefixes.border-image",
259
-  "layout.css.prefixes.box-sizing",
260
-  "layout.css.prefixes.device-pixel-ratio-webkit",
261
-  "layout.css.prefixes.font-features",
262
-  "layout.css.prefixes.gradients",
263
-  "layout.css.prefixes.transforms",
264
-  "layout.css.prefixes.transitions",
265
-  "layout.css.prefixes.webkit",
266
-  "layout.css.scope-pseudo.enabled",
267
-  "layout.css.scoped-style.enabled",
268
-  "layout.css.scroll-behavior.property-enabled",
269
-  "layout.css.scroll-snap.enabled",
270
-#ifdef MOZ_STYLO
271
-  "layout.css.servo.chrome.enabled",
272
-  "layout.css.servo.enabled",
273
-#endif
274
-  "layout.css.shape-outside.enabled",
275
-  "layout.css.text-align-unsafe-value.enabled",
276
-  "layout.css.text-combine-upright-digits.enabled",
277
-  "layout.css.text-combine-upright.enabled",
278
-  "layout.css.text-justify.enabled",
279
-  "layout.css.touch_action.enabled",
280
-  "layout.css.visited_links_enabled",
281
-  "layout.idle_period.required_quiescent_frames",
282
-  "layout.idle_period.time_limit",
283
-  "layout.interruptible-reflow.enabled",
284
-  "mathml.disabled",
285
-  "media.audio-max-decode-error",
286
-  "media.cache_readahead_limit",
287
-  "media.cache_resume_threshold",
288
-  "media.cache_size",
289
-  "media.clearkey.persistent-license.enabled",
290
-  "media.cubeb.backend",
291
-  "media.cubeb.sandbox",
292
-  "media.cubeb_latency_msg_frames",
293
-  "media.cubeb_latency_playback_ms",
294
-  "media.decoder-doctor.wmf-disabled-is-failure",
295
-  "media.decoder.recycle.enabled",
296
-  "media.decoder.skip-to-next-key-frame.enabled",
297
-  "media.dormant-on-pause-timeout-ms",
298
-  "media.eme.audio.blank",
299
-  "media.eme.chromium-api.video-shmems",
300
-  "media.eme.enabled",
301
-  "media.eme.video.blank",
302
-  "media.ffmpeg.enabled",
303
-  "media.ffmpeg.low-latency.enabled",
304
-  "media.ffvpx.enabled",
305
-  "media.ffvpx.low-latency.enabled",
306
-  "media.flac.enabled",
307
-  "media.forcestereo.enabled",
308
-  "media.gmp.decoder.enabled",
309
-  "media.gmp.insecure.allow",
310
-  "media.gpu-process-decoder",
311
-  "media.hls.enabled",
312
-  "media.libavcodec.allow-obsolete",
313
-  "media.memory_cache_max_size",
314
-  "media.memory_caches_combined_limit_kb",
315
-  "media.memory_caches_combined_limit_pc_sysmem",
316
-  "media.mp4.enabled",
317
-  "media.navigator.mediadatadecoder_enabled",
318
-  "media.ogg.enabled",
319
-  "media.ogg.flac.enabled",
320
-  "media.playback.warnings-as-errors",
321
-  "media.playback.warnings-as-errors.stagefright-vs-rust",
322
-  "media.resampling.enabled",
323
-  "media.resume-bkgnd-video-on-tabhover",
324
-  "media.ruin-av-sync.enabled",
325
-  "media.rust.mp4parser",
326
-  "media.rust.test_mode",
327
-  "media.seamless-looping",
328
-  "media.suspend-bkgnd-video.delay-ms",
329
-  "media.suspend-bkgnd-video.enabled",
330
-  "media.use-blank-decoder",
331
-  "media.video-max-decode-error",
332
-  "media.video_stats.enabled",
333
-  "media.videocontrols.lock-video-orientation",
334
-  "media.volume_scale",
335
-  "media.webspeech.recognition.enable",
336
-  "media.webspeech.recognition.force_enable",
337
-  "media.webspeech.synth.force_global_queue",
338
-  "media.webspeech.test.enable",
339
-  "media.webspeech.test.fake_fsm_events",
340
-  "media.webspeech.test.fake_recognition_service",
341
-  "media.wmf.allow-unsupported-resolutions",
342
-  "media.wmf.enabled",
343
-  "media.wmf.skip-blacklist",
344
-  "media.wmf.vp9.enabled",
345
-  "network.IDN.blacklist_chars",
346
-  "network.IDN.restriction_profile",
347
-  "network.IDN.use_whitelist",
348
-  "network.IDN_show_punycode",
349
-  "network.buffer.cache.count",
350
-  "network.buffer.cache.size",
351
-  "network.captive-portal-service.enabled",
352
-  "network.cookie.cookieBehavior",
353
-  "network.cookie.lifetimePolicy",
354
-  "network.dns.disablePrefetch",
355
-  "network.dns.disablePrefetchFromHTTPS",
356
-  "network.http.tailing.enabled",
357
-  "network.jar.block-remote-files",
358
-  "network.loadinfo.skip_type_assertion",
359
-  "network.notify.changed",
360
-  "network.offline-mirrors-connectivity",
361
-  "network.protocol-handler.external.jar",
362
-  "network.proxy.type",
363
-  "network.security.ports.banned",
364
-  "network.security.ports.banned.override",
365
-  "network.standard-url.enable-rust",
366
-  "network.standard-url.max-length",
367
-  "network.standard-url.punycode-host",
368
-  "network.sts.max_time_for_events_between_two_polls",
369
-  "network.sts.max_time_for_pr_close_during_shutdown",
370
-  "network.tcp.keepalive.enabled",
371
-  "network.tcp.keepalive.idle_time",
372
-  "network.tcp.keepalive.probe_count",
373
-  "network.tcp.keepalive.retry_interval",
374
-  "network.tcp.sendbuffer",
375
-  "nglayout.debug.invalidation",
376
-  "privacy.donottrackheader.enabled",
377
-  "privacy.firstparty.isolate",
378
-  "privacy.firstparty.isolate.restrict_opener_access",
379
-  "privacy.reduceTimerPrecision",
380
-  "privacy.resistFingerprinting",
381
-  "privacy.resistFingerprinting.autoDeclineNoUserInputCanvasPrompts",
382
-  "privacy.resistFingerprinting.reduceTimerPrecision.jitter",
383
-  "privacy.resistFingerprinting.reduceTimerPrecision.microseconds",
384
-  "privacy.resistFingerprinting.target_video_res",
385
-  "privacy.resistFingerprinting.video_dropped_ratio",
386
-  "privacy.resistFingerprinting.video_frames_per_sec",
387
-  "privacy.trackingprotection.lower_network_priority",
388
-  "privacy.window.maxInnerHeight",
389
-  "privacy.window.maxInnerWidth",
390
-  "security.csp.enable",
391
-  "security.data_uri.block_toplevel_data_uri_navigations",
392
-  "security.data_uri.unique_opaque_origin",
393
-  "security.fileuri.strict_origin_policy",
394
-  "security.mixed_content.block_active_content",
395
-  "security.mixed_content.block_display_content",
396
-  "security.mixed_content.block_object_subrequest",
397
-  "security.mixed_content.hsts_priming_cache_timeout",
398
-  "security.mixed_content.send_hsts_priming",
399
-  "security.mixed_content.upgrade_display_content",
400
-  "security.mixed_content.use_hsts",
401
-  "security.sandbox.content.level",
402
-  "security.sandbox.content.tempDirSuffix",
403
-  "security.sandbox.logging.enabled",
404
-  "security.sandbox.mac.track.violations",
405
-  "security.sandbox.windows.log.stackTraceDepth",
406
-  "svg.disabled",
407
-  "svg.display-lists.hit-testing.enabled",
408
-  "svg.display-lists.painting.enabled",
409
-  "svg.new-getBBox.enabled",
410
-  "svg.path-caching.enabled",
411
-  "svg.transform-box.enabled",
412
-  "toolkit.asyncshutdown.crash_timeout",
413
-  "toolkit.asyncshutdown.log",
414
-  "toolkit.osfile.log",
415
-  "toolkit.osfile.log.redirect",
416
-  "toolkit.telemetry.enabled",
417
-  "toolkit.telemetry.idleTimeout",
418
-  "toolkit.telemetry.initDelay",
419
-  "toolkit.telemetry.log.dump",
420
-  "toolkit.telemetry.log.level",
421
-  "toolkit.telemetry.minSubsessionLength",
422
-  "toolkit.telemetry.scheduler.idleTickInterval",
423
-  "toolkit.telemetry.scheduler.tickInterval",
424
-  "toolkit.telemetry.testing.overridePreRelease",
425
-  "toolkit.telemetry.unified",
426
-  "ui.key.menuAccessKeyFocuses",
427
-  "ui.popup.disable_autohide",
428
-  "ui.use_activity_cursor",
429
-  "view_source.editor.external",
430
-  "zoom.maxPercent",
431
-  "zoom.minPercent"
432
-};
433
-
434
-const char** mozilla::dom::ContentPrefs::GetEarlyPrefs(size_t* aCount)
435
-{
436
-  *aCount = ArrayLength(ContentPrefs::gEarlyPrefs);
437
-  return gEarlyPrefs;
438
-}
439
-
440
-const char* mozilla::dom::ContentPrefs::GetEarlyPref(size_t aIndex)
441
-{
442
-  MOZ_ASSERT(aIndex < ArrayLength(ContentPrefs::gEarlyPrefs));
443
-  return gEarlyPrefs[aIndex];
444
-}
445
diff --git dom/ipc/ContentPrefs.h dom/ipc/ContentPrefs.h
446
deleted file mode 100644
447
index 72ce8d236c11..000000000000
448
--- dom/ipc/ContentPrefs.h
449
+++ /dev/null
450
@@ -1,27 +0,0 @@
451
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
452
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
453
-/* This Source Code Form is subject to the terms of the Mozilla Public
454
- * License, v. 2.0. If a copy of the MPL was not distributed with this
455
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
456
-
457
-#ifndef mozilla_dom_ContentPrefs_h
458
-#define mozilla_dom_ContentPrefs_h
459
-
460
-// See the comment in ContentPrefs.cpp for more information.
461
-
462
-namespace mozilla {
463
-namespace dom {
464
-
465
-class ContentPrefs {
466
-public:
467
-  static const char** GetEarlyPrefs(size_t* aCount);
468
-  static const char* GetEarlyPref(size_t aIndex);
469
-
470
-private:
471
-  static const char* gEarlyPrefs[];
472
-};
473
-
474
-}
475
-}
476
-
477
-#endif
478
diff --git dom/ipc/ContentProcess.cpp dom/ipc/ContentProcess.cpp
479
index 2441c8cb9224..c00283dc5084 100644
480
--- dom/ipc/ContentProcess.cpp
481
+++ dom/ipc/ContentProcess.cpp
482
@@ -7,7 +7,6 @@
483
 #include "mozilla/ipc/IOThreadChild.h"
484
 
485
 #include "ContentProcess.h"
486
-#include "ContentPrefs.h"
487
 #include "base/shared_memory.h"
488
 #include "mozilla/Preferences.h"
489
 #include "mozilla/Scheduler.h"
490
@@ -226,8 +225,8 @@ ContentProcess::Init(int aArgc, char* aArgv[])
491
     NS_ERROR("failed to map shared memory in the child");
492
     return false;
493
   }
494
-  Preferences::DeserializeEarlyPreferences(static_cast<char*>(shm.memory()),
495
-                                           prefsLen);
496
+  Preferences::DeserializePreferences(static_cast<char*>(shm.memory()),
497
+                                      prefsLen);
498
 
499
   Scheduler::SetPrefs(schedulerPrefs);
500
   mContent.Init(IOThreadChild::message_loop(),
501
diff --git dom/ipc/PContent.ipdl dom/ipc/PContent.ipdl
502
index 5d077976569a..fb967ffc53a9 100644
503
--- dom/ipc/PContent.ipdl
504
+++ dom/ipc/PContent.ipdl
505
@@ -155,6 +155,12 @@ union MaybePrefValue {
506
   null_t;
507
 };
508
 
509
+// This serialization form mirrors that used in mozilla::Pref in
510
+// Preferences.cpp. The two should be kept in sync, e.g. if something is added
511
+// to one it should also be added to the other.
512
+//
513
+// Note: there is no need to pass the isSticky attribute because that's an
514
+// immutable attribute obtained from file at startup.
515
 struct Pref {
516
   nsCString name;
517
   bool isLocked;
518
@@ -273,7 +279,6 @@ struct XPCOMInitData
519
     ClipboardCapabilities clipboardCaps;
520
     DomainPolicyClone domainPolicy;
521
     OptionalURIParams userContentSheetURL;
522
-    Pref[] prefs;
523
     GfxVarUpdate[] gfxNonDefaultVarUpdates;
524
     ContentDeviceData contentDeviceData;
525
     GfxInfoFeatureStatus[] gfxFeatureStatus;
526
diff --git dom/ipc/moz.build dom/ipc/moz.build
527
index 3c5541c7791b..5e92a0d52b5d 100644
528
--- dom/ipc/moz.build
529
+++ dom/ipc/moz.build
530
@@ -26,7 +26,6 @@ EXPORTS.mozilla.dom += [
531
     'ContentBridgeParent.h',
532
     'ContentChild.h',
533
     'ContentParent.h',
534
-    'ContentPrefs.h',
535
     'ContentProcess.h',
536
     'ContentProcessHost.h',
537
     'ContentProcessManager.h',
538
@@ -59,7 +58,6 @@ UNIFIED_SOURCES += [
539
     'ContentBridgeChild.cpp',
540
     'ContentBridgeParent.cpp',
541
     'ContentParent.cpp',
542
-    'ContentPrefs.cpp',
543
     'ContentProcess.cpp',
544
     'ContentProcessHost.cpp',
545
     'ContentProcessManager.cpp',
546
diff --git layout/style/nsCSSProps.h layout/style/nsCSSProps.h
547
index dce44bf61b35..80288336a08b 100644
548
--- layout/style/nsCSSProps.h
549
+++ layout/style/nsCSSProps.h
550
@@ -645,7 +645,7 @@ public:
551
     // In the child process, assert that we're not trying to parse stylesheets
552
     // before we've gotten all our prefs.
553
     MOZ_ASSERT_IF(!XRE_IsParentProcess(),
554
-                  mozilla::Preferences::AreAllPrefsSetInContentProcess());
555
+                  mozilla::Preferences::ArePrefsInitedInContentProcess());
556
     return gPropertyEnabled[aProperty];
557
   }
558
 
559
diff --git modules/libpref/Preferences.cpp modules/libpref/Preferences.cpp
560
index fe780686f2eb..488095f49236 100644
561
--- modules/libpref/Preferences.cpp
562
+++ modules/libpref/Preferences.cpp
563
@@ -15,7 +15,6 @@
564
 #include "mozilla/ArenaAllocator.h"
565
 #include "mozilla/ArrayUtils.h"
566
 #include "mozilla/Attributes.h"
567
-#include "mozilla/dom/ContentPrefs.h"
568
 #include "mozilla/dom/PContent.h"
569
 #include "mozilla/HashFunctions.h"
570
 #include "mozilla/Logging.h"
571
@@ -131,6 +130,29 @@ enum class PrefType : uint8_t
572
   Bool = 3,
573
 };
574
 
575
+// This is used for pref names and string pref values. We encode the string
576
+// length, then a '/', then the string chars. This encoding means there are no
577
+// special chars that are forbidden or require escaping.
578
+static void
579
+SerializeAndAppendString(const char* aChars, nsCString& aStr)
580
+{
581
+  aStr.AppendInt(uint32_t(strlen(aChars)));
582
+  aStr.Append('/');
583
+  aStr.Append(aChars);
584
+}
585
+
586
+static char*
587
+DeserializeString(char* aChars, nsCString& aStr)
588
+{
589
+  char* p = aChars;
590
+  uint32_t length = strtol(p, &p, 10);
591
+  MOZ_ASSERT(p[0] == '/');
592
+  p++; // move past the '/'
593
+  aStr.Assign(p, length);
594
+  p += length; // move past the string itself
595
+  return p;
596
+}
597
+
598
 // Keep this in sync with PrefValue in prefs_parser/src/lib.rs.
599
 union PrefValue {
600
   const char* mStringVal;
601
@@ -223,6 +245,64 @@ union PrefValue {
602
         MOZ_CRASH();
603
     }
604
   }
605
+
606
+  void SerializeAndAppend(PrefType aType, nsCString& aStr)
607
+  {
608
+    switch (aType) {
609
+      case PrefType::Bool:
610
+        aStr.Append(mBoolVal ? 'T' : 'F');
611
+        break;
612
+
613
+      case PrefType::Int:
614
+        aStr.AppendInt(mIntVal);
615
+        break;
616
+
617
+      case PrefType::String: {
618
+        SerializeAndAppendString(mStringVal, aStr);
619
+        break;
620
+      }
621
+
622
+      case PrefType::None:
623
+      default:
624
+        MOZ_CRASH();
625
+    }
626
+  }
627
+
628
+  static char* Deserialize(PrefType aType,
629
+                           char* aStr,
630
+                           dom::MaybePrefValue* aDomValue)
631
+  {
632
+    char* p = aStr;
633
+
634
+    switch (aType) {
635
+      case PrefType::Bool:
636
+        if (*p == 'T') {
637
+          *aDomValue = true;
638
+        } else if (*p == 'F') {
639
+          *aDomValue = false;
640
+        } else {
641
+          *aDomValue = false;
642
+          NS_ERROR("bad bool pref value");
643
+        }
644
+        p++;
645
+        return p;
646
+
647
+      case PrefType::Int: {
648
+        *aDomValue = int32_t(strtol(p, &p, 10));
649
+        return p;
650
+      }
651
+
652
+      case PrefType::String: {
653
+        nsCString str;
654
+        p = DeserializeString(p, str);
655
+        *aDomValue = str;
656
+        return p;
657
+      }
658
+
659
+      default:
660
+        MOZ_CRASH();
661
+    }
662
+  }
663
 };
664
 
665
 #ifdef DEBUG
666
@@ -694,6 +774,159 @@ public:
667
     return false;
668
   }
669
 
670
+  // Prefs are serialized in a manner that mirrors dom::Pref. The two should be
671
+  // kept in sync. E.g. if something is added to one it should also be added to
672
+  // the other. (It would be nice to be able to use the code generated from
673
+  // IPDL for serializing dom::Pref here instead of writing by hand this
674
+  // serialization/deserialization. Unfortunately, that generated code is
675
+  // difficult to use directly, outside of the IPDL IPC code.)
676
+  //
677
+  // The grammar for the serialized prefs has the following form.
678
+  //
679
+  // <pref>         = <type> <locked> ':' <name> ':' <value>? ':' <value>? '\n'
680
+  // <type>         = 'B' | 'I' | 'S'
681
+  // <locked>       = 'L' | '-'
682
+  // <name>         = <string-value>
683
+  // <value>        = <bool-value> | <int-value> | <string-value>
684
+  // <bool-value>   = 'T' | 'F'
685
+  // <int-value>    = an integer literal accepted by strtol()
686
+  // <string-value> = <int-value> '/' <chars>
687
+  // <chars>        = any char sequence of length dictated by the preceding
688
+  //                  <int-value>.
689
+  //
690
+  // No whitespace is tolerated between tokens. <type> must match the types of
691
+  // the values.
692
+  //
693
+  // The serialization is text-based, rather than binary, for the following
694
+  // reasons.
695
+  //
696
+  // - The size difference wouldn't be much different between text-based and
697
+  //   binary. Most of the space is for strings (pref names and string pref
698
+  //   values), which would be the same in both styles. And other differences
699
+  //   would be minimal, e.g. small integers are shorter in text but long
700
+  //   integers are longer in text.
701
+  //
702
+  // - Likewise, speed differences should be negligible.
703
+  //
704
+  // - It's much easier to debug a text-based serialization. E.g. you can
705
+  //   print it and inspect it easily in a debugger.
706
+  //
707
+  // Examples of unlocked boolean prefs:
708
+  // - "B-:8/my.bool1:F:T\n"
709
+  // - "B-:8/my.bool2:F:\n"
710
+  // - "B-:8/my.bool3::T\n"
711
+  //
712
+  // Examples of locked integer prefs:
713
+  // - "IL:7/my.int1:0:1\n"
714
+  // - "IL:7/my.int2:123:\n"
715
+  // - "IL:7/my.int3::-99\n"
716
+  //
717
+  // Examples of unlocked string prefs:
718
+  // - "S-:10/my.string1:3/abc:4/wxyz\n"
719
+  // - "S-:10/my.string2:5/1.234:\n"
720
+  // - "S-:10/my.string3::7/string!\n"
721
+
722
+  void SerializeAndAppend(nsCString& aStr)
723
+  {
724
+    switch (Type()) {
725
+      case PrefType::Bool:
726
+        aStr.Append('B');
727
+        break;
728
+
729
+      case PrefType::Int:
730
+        aStr.Append('I');
731
+        break;
732
+
733
+      case PrefType::String: {
734
+        aStr.Append('S');
735
+        break;
736
+      }
737
+
738
+      case PrefType::None:
739
+      default:
740
+        MOZ_CRASH();
741
+    }
742
+
743
+    aStr.Append(mIsLocked ? 'L' : '-');
744
+    aStr.Append(':');
745
+
746
+    SerializeAndAppendString(mName, aStr);
747
+    aStr.Append(':');
748
+
749
+    if (mHasDefaultValue) {
750
+      mDefaultValue.SerializeAndAppend(Type(), aStr);
751
+    }
752
+    aStr.Append(':');
753
+
754
+    if (mHasUserValue) {
755
+      mUserValue.SerializeAndAppend(Type(), aStr);
756
+    }
757
+    aStr.Append('\n');
758
+  }
759
+
760
+  static char* Deserialize(char* aStr, dom::Pref* aDomPref)
761
+  {
762
+    char* p = aStr;
763
+
764
+    // The type.
765
+    PrefType type;
766
+    if (*p == 'B') {
767
+      type = PrefType::Bool;
768
+    } else if (*p == 'I') {
769
+      type = PrefType::Int;
770
+    } else if (*p == 'S') {
771
+      type = PrefType::String;
772
+    } else {
773
+      NS_ERROR("bad pref type");
774
+      type = PrefType::None;
775
+    }
776
+    p++; // move past the type char
777
+
778
+    // Locked?
779
+    bool isLocked;
780
+    if (*p == 'L') {
781
+      isLocked = true;
782
+    } else if (*p == '-') {
783
+      isLocked = false;
784
+    } else {
785
+      NS_ERROR("bad pref locked status");
786
+      isLocked = false;
787
+    }
788
+    p++; // move past the isLocked char
789
+
790
+    MOZ_ASSERT(*p == ':');
791
+    p++; // move past the ':'
792
+
793
+    // The pref name.
794
+    nsCString name;
795
+    p = DeserializeString(p, name);
796
+
797
+    MOZ_ASSERT(*p == ':');
798
+    p++; // move past the ':' preceding the default value
799
+
800
+    dom::MaybePrefValue maybeDefaultValue;
801
+    if (*p != ':') {
802
+      dom::PrefValue defaultValue;
803
+      p = PrefValue::Deserialize(type, p, &maybeDefaultValue);
804
+    }
805
+
806
+    MOZ_ASSERT(*p == ':');
807
+    p++; // move past the ':' between the default and user values
808
+
809
+    dom::MaybePrefValue maybeUserValue;
810
+    if (*p != '\n') {
811
+      dom::PrefValue userValue;
812
+      p = PrefValue::Deserialize(type, p, &maybeUserValue);
813
+    }
814
+
815
+    MOZ_ASSERT(*p == '\n');
816
+    p++; // move past the '\n' following the user value
817
+
818
+    *aDomPref = dom::Pref(name, isLocked, maybeDefaultValue, maybeUserValue);
819
+
820
+    return p;
821
+  }
822
+
823
   void AddSizeOfIncludingThis(MallocSizeOf aMallocSizeOf, PrefsSizes& aSizes)
824
   {
825
     // Note: mName is allocated in gPrefNameArena, measured elsewhere.
826
@@ -880,41 +1113,9 @@ pref_savePrefs()
827
 
828
 #ifdef DEBUG
829
 
830
-// For content processes, what prefs have been initialized?
831
-enum class ContentProcessPhase
832
-{
833
-  eNoPrefsSet,
834
-  eEarlyPrefsSet,
835
-  eEarlyAndLatePrefsSet,
836
-};
837
-
838
 // Note that this never changes in the parent process, and is only read in
839
 // content processes.
840
-static ContentProcessPhase gPhase = ContentProcessPhase::eNoPrefsSet;
841
-
842
-struct StringComparator
843
-{
844
-  const char* mPrefName;
845
-
846
-  explicit StringComparator(const char* aPrefName)
847
-    : mPrefName(aPrefName)
848
-  {
849
-  }
850
-
851
-  int operator()(const char* aPrefName) const
852
-  {
853
-    return strcmp(mPrefName, aPrefName);
854
-  }
855
-};
856
-
857
-static bool
858
-IsEarlyPref(const char* aPrefName)
859
-{
860
-  size_t prefsLen;
861
-  size_t found;
862
-  const char** list = mozilla::dom::ContentPrefs::GetEarlyPrefs(&prefsLen);
863
-  return BinarySearchIf(list, 0, prefsLen, StringComparator(aPrefName), &found);
864
-}
865
+static bool gContentProcessPrefsAreInited = false;
866
 
867
 #endif // DEBUG
868
 
869
@@ -923,23 +1124,7 @@ pref_HashTableLookupInner(const char* aPrefName)
870
 {
871
   MOZ_ASSERT(NS_IsMainThread() || mozilla::ServoStyleSet::IsInServoTraversal());
872
 
873
-#ifdef DEBUG
874
-  if (!XRE_IsParentProcess()) {
875
-    if (gPhase == ContentProcessPhase::eNoPrefsSet) {
876
-      MOZ_CRASH_UNSAFE_PRINTF("accessing pref %s before early prefs are set",
877
-                              aPrefName);
878
-    }
879
-
880
-    if (gPhase == ContentProcessPhase::eEarlyPrefsSet &&
881
-        !IsEarlyPref(aPrefName)) {
882
-      // If you hit this crash, you have an early access of a non-early pref.
883
-      // Consider moving the access later or add the pref to the whitelist of
884
-      // early prefs in ContentPrefs.cpp and get review from a DOM peer.
885
-      MOZ_CRASH_UNSAFE_PRINTF(
886
-        "accessing non-early pref %s before late prefs are set", aPrefName);
887
-    }
888
-  }
889
-#endif
890
+  MOZ_ASSERT_IF(!XRE_IsParentProcess(), gContentProcessPrefsAreInited);
891
 
892
   return static_cast<PrefEntry*>(gHashTable->Search(aPrefName));
893
 }
894
@@ -2932,8 +3117,8 @@ public:
895
 
896
 } // namespace
897
 
898
-// A list of prefs sent early from the parent, via shared memory.
899
-static InfallibleTArray<dom::Pref>* gEarlyDomPrefs;
900
+// A list of changed prefs sent from the parent via shared memory.
901
+static InfallibleTArray<dom::Pref>* gChangedDomPrefs;
902
 
903
 static const char kTelemetryPref[] = "toolkit.telemetry.enabled";
904
 static const char kChannelPref[] = "app.update.channel";
905
@@ -3050,12 +3235,12 @@ Preferences::GetInstanceForService()
906
   }
907
 
908
   if (!XRE_IsParentProcess()) {
909
-    MOZ_ASSERT(gEarlyDomPrefs);
910
-    for (unsigned int i = 0; i < gEarlyDomPrefs->Length(); i++) {
911
-      Preferences::SetPreference(gEarlyDomPrefs->ElementAt(i));
912
+    MOZ_ASSERT(gChangedDomPrefs);
913
+    for (unsigned int i = 0; i < gChangedDomPrefs->Length(); i++) {
914
+      Preferences::SetPreference(gChangedDomPrefs->ElementAt(i));
915
     }
916
-    delete gEarlyDomPrefs;
917
-    gEarlyDomPrefs = nullptr;
918
+    delete gChangedDomPrefs;
919
+    gChangedDomPrefs = nullptr;
920
 
921
   } else {
922
     // Check if there is a deployment configuration file. If so, set up the
923
@@ -3179,149 +3364,44 @@ NS_IMPL_ISUPPORTS(Preferences,
924
                   nsISupportsWeakReference)
925
 
926
 /* static */ void
927
-Preferences::SerializeEarlyPreferences(nsCString& aStr)
928
+Preferences::SerializePreferences(nsCString& aStr)
929
 {
930
   MOZ_RELEASE_ASSERT(InitStaticMembers());
931
 
932
-  nsAutoCStringN<256> boolPrefs, intPrefs, stringPrefs;
933
-  size_t numEarlyPrefs;
934
-  dom::ContentPrefs::GetEarlyPrefs(&numEarlyPrefs);
935
-
936
-  for (unsigned int i = 0; i < numEarlyPrefs; i++) {
937
-    const char* prefName = dom::ContentPrefs::GetEarlyPref(i);
938
-    MOZ_ASSERT_IF(i > 0,
939
-                  strcmp(prefName, dom::ContentPrefs::GetEarlyPref(i - 1)) > 0);
940
-
941
-    Pref* pref = pref_HashTableLookup(prefName);
942
-    if (!pref || !pref->MustSendToContentProcesses()) {
943
-      continue;
944
-    }
945
+  aStr.Truncate();
946
 
947
-    switch (pref->Type()) {
948
-      case PrefType::Bool:
949
-        boolPrefs.Append(
950
-          nsPrintfCString("%u:%d|", i, Preferences::GetBool(prefName)));
951
-        break;
952
-      case PrefType::Int:
953
-        intPrefs.Append(
954
-          nsPrintfCString("%u:%d|", i, Preferences::GetInt(prefName)));
955
-        break;
956
-      case PrefType::String: {
957
-        nsAutoCString value;
958
-        Preferences::GetCString(prefName, value);
959
-        stringPrefs.Append(
960
-          nsPrintfCString("%u:%d;%s|", i, value.Length(), value.get()));
961
-      } break;
962
-      case PrefType::None:
963
-        break;
964
-      default:
965
-        printf_stderr("preference type: %d\n", int(pref->Type()));
966
-        MOZ_CRASH();
967
+  for (auto iter = gHashTable->Iter(); !iter.Done(); iter.Next()) {
968
+    Pref* pref = static_cast<PrefEntry*>(iter.Get())->mPref;
969
+    if (pref->MustSendToContentProcesses() && pref->HasAdvisablySizedValues()) {
970
+      pref->SerializeAndAppend(aStr);
971
     }
972
   }
973
 
974
-  aStr.Truncate();
975
-  aStr.Append(boolPrefs);
976
-  aStr.Append('\n');
977
-  aStr.Append(intPrefs);
978
-  aStr.Append('\n');
979
-  aStr.Append(stringPrefs);
980
-  aStr.Append('\n');
981
   aStr.Append('\0');
982
 }
983
 
984
 /* static */ void
985
-Preferences::DeserializeEarlyPreferences(char* aStr, size_t aStrLen)
986
+Preferences::DeserializePreferences(char* aStr, size_t aPrefsLen)
987
 {
988
   MOZ_ASSERT(!XRE_IsParentProcess());
989
 
990
-  MOZ_ASSERT(!gEarlyDomPrefs);
991
-  gEarlyDomPrefs = new InfallibleTArray<dom::Pref>();
992
+  MOZ_ASSERT(!gChangedDomPrefs);
993
+  gChangedDomPrefs = new InfallibleTArray<dom::Pref>();
994
 
995
   char* p = aStr;
996
-
997
-  // XXX: we assume these pref values are default values, which may not be
998
-  // true. We also assume they are unlocked. Fortunately, these prefs get reset
999
-  // properly by the first IPC message.
1000
-
1001
-  // Get the bool prefs.
1002
-  while (*p != '\n') {
1003
-    int32_t index = strtol(p, &p, 10);
1004
-    MOZ_ASSERT(p[0] == ':');
1005
-    p++;
1006
-    int v = strtol(p, &p, 10);
1007
-    MOZ_ASSERT(v == 0 || v == 1);
1008
-    dom::MaybePrefValue value(dom::PrefValue(!!v));
1009
-    MOZ_ASSERT(p[0] == '|');
1010
-    p++;
1011
-    dom::Pref pref(nsCString(dom::ContentPrefs::GetEarlyPref(index)),
1012
-                   /* isLocked */ false,
1013
-                   value,
1014
-                   dom::MaybePrefValue());
1015
-    gEarlyDomPrefs->AppendElement(pref);
1016
-  }
1017
-  p++;
1018
-
1019
-  // Get the int prefs.
1020
-  while (*p != '\n') {
1021
-    int32_t index = strtol(p, &p, 10);
1022
-    MOZ_ASSERT(p[0] == ':');
1023
-    p++;
1024
-    dom::MaybePrefValue value(
1025
-      dom::PrefValue(static_cast<int32_t>(strtol(p, &p, 10))));
1026
-    MOZ_ASSERT(p[0] == '|');
1027
-    p++;
1028
-    dom::Pref pref(nsCString(dom::ContentPrefs::GetEarlyPref(index)),
1029
-                   /* isLocked */ false,
1030
-                   value,
1031
-                   dom::MaybePrefValue());
1032
-    gEarlyDomPrefs->AppendElement(pref);
1033
-  }
1034
-  p++;
1035
-
1036
-  // Get the string prefs.
1037
-  while (*p != '\n') {
1038
-    int32_t index = strtol(p, &p, 10);
1039
-    MOZ_ASSERT(p[0] == ':');
1040
-    p++;
1041
-    int32_t length = strtol(p, &p, 10);
1042
-    MOZ_ASSERT(p[0] == ';');
1043
-    p++;
1044
-    dom::MaybePrefValue value(dom::PrefValue(nsCString(p, length)));
1045
-    dom::Pref pref(nsCString(dom::ContentPrefs::GetEarlyPref(index)),
1046
-                   /* isLocked */ false,
1047
-                   value,
1048
-                   dom::MaybePrefValue());
1049
-    gEarlyDomPrefs->AppendElement(pref);
1050
-    p += length + 1;
1051
-    MOZ_ASSERT(*(p - 1) == '|');
1052
-  }
1053
-  p++;
1054
-
1055
-  MOZ_ASSERT(*p == '\0');
1056
+  while (*p != '\0') {
1057
+    dom::Pref pref;
1058
+    p = Pref::Deserialize(p, &pref);
1059
+    gChangedDomPrefs->AppendElement(pref);
1060
+  }
1061
 
1062
   // We finished parsing on a '\0'. That should be the last char in the shared
1063
-  // memory.
1064
-  MOZ_ASSERT(aStr + aStrLen - 1 == p);
1065
-
1066
-#ifdef DEBUG
1067
-  MOZ_ASSERT(gPhase == ContentProcessPhase::eNoPrefsSet);
1068
-  gPhase = ContentProcessPhase::eEarlyPrefsSet;
1069
-#endif
1070
-}
1071
-
1072
-/* static */ void
1073
-Preferences::SetLatePreferences(const nsTArray<dom::Pref>* aDomPrefs)
1074
-{
1075
-  MOZ_ASSERT(!XRE_IsParentProcess());
1076
-
1077
-  for (unsigned int i = 0; i < aDomPrefs->Length(); i++) {
1078
-    Preferences::SetPreference(aDomPrefs->ElementAt(i));
1079
-  }
1080
+  // memory. (aPrefsLen includes the '\0'.)
1081
+  MOZ_ASSERT(p == aStr + aPrefsLen - 1);
1082
 
1083
 #ifdef DEBUG
1084
-  MOZ_ASSERT(gPhase == ContentProcessPhase::eEarlyPrefsSet);
1085
-  gPhase = ContentProcessPhase::eEarlyAndLatePrefsSet;
1086
+  MOZ_ASSERT(!gContentProcessPrefsAreInited);
1087
+  gContentProcessPrefsAreInited = true;
1088
 #endif
1089
 }
1090
 
1091
@@ -3558,36 +3638,12 @@ Preferences::GetPreference(dom::Pref* aDomPref)
1092
   }
1093
 }
1094
 
1095
-void
1096
-Preferences::GetPreferences(InfallibleTArray<dom::Pref>* aDomPrefs)
1097
-{
1098
-  MOZ_ASSERT(XRE_IsParentProcess());
1099
-  MOZ_ASSERT(NS_IsMainThread());
1100
-
1101
-  aDomPrefs->SetCapacity(gHashTable->EntryCount());
1102
-  for (auto iter = gHashTable->Iter(); !iter.Done(); iter.Next()) {
1103
-    Pref* pref = static_cast<PrefEntry*>(iter.Get())->mPref;
1104
-
1105
-    if (!pref->MustSendToContentProcesses()) {
1106
-      // The pref value hasn't changed since it was initialized at startup.
1107
-      // Don't bother sending it, because the content process will initialize
1108
-      // it the same way.
1109
-      continue;
1110
-    }
1111
-
1112
-    if (pref->HasAdvisablySizedValues()) {
1113
-      dom::Pref* setting = aDomPrefs->AppendElement();
1114
-      pref->ToDomPref(setting);
1115
-    }
1116
-  }
1117
-}
1118
-
1119
 #ifdef DEBUG
1120
 bool
1121
-Preferences::AreAllPrefsSetInContentProcess()
1122
+Preferences::ArePrefsInitedInContentProcess()
1123
 {
1124
   MOZ_ASSERT(!XRE_IsParentProcess());
1125
-  return gPhase == ContentProcessPhase::eEarlyAndLatePrefsSet;
1126
+  return gContentProcessPrefsAreInited;
1127
 }
1128
 #endif
1129
 
1130
diff --git modules/libpref/Preferences.h modules/libpref/Preferences.h
1131
index 0d976483daae..901425b5b663 100644
1132
--- modules/libpref/Preferences.h
1133
+++ modules/libpref/Preferences.h
1134
@@ -328,15 +328,10 @@ public:
1135
                                    const char* aPref,
1136
                                    float aDefault = 0.0f);
1137
 
1138
-  // When a content process is created these methods are used to pass prefs in
1139
-  // bulk from the parent process. "Early" preferences are ones that are needed
1140
-  // very early on in the content process's lifetime; they are passed via a
1141
-  // special shared memory segment. "Late" preferences are the remainder, which
1142
-  // are passed via a standard IPC message.
1143
-  static void SerializeEarlyPreferences(nsCString& aStr);
1144
-  static void DeserializeEarlyPreferences(char* aStr, size_t aStrLen);
1145
-  static void GetPreferences(InfallibleTArray<dom::Pref>* aSettings);
1146
-  static void SetLatePreferences(const nsTArray<dom::Pref>* aSettings);
1147
+  // When a content process is created these methods are used to pass changed
1148
+  // prefs in bulk from the parent process, via shared memory.
1149
+  static void SerializePreferences(nsCString& aStr);
1150
+  static void DeserializePreferences(char* aStr, size_t aPrefsLen);
1151
 
1152
   // When a single pref is changed in the parent process, these methods are
1153
   // used to pass the update to content processes.
1154
@@ -344,7 +339,7 @@ public:
1155
   static void SetPreference(const dom::Pref& aPref);
1156
 
1157
 #ifdef DEBUG
1158
-  static bool AreAllPrefsSetInContentProcess();
1159
+  static bool ArePrefsInitedInContentProcess();
1160
 #endif
1161
 
1162
   static void AddSizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf,
(-)b/www/firefox/files/patch-z-bug517422 (-14 / +14 lines)
Lines 160-166 diff --git dom/media/moz.build dom/media/moz.build Link Here
160
index 86b051c58d33..fb6186dce78b 100644
160
index 86b051c58d33..fb6186dce78b 100644
161
--- dom/media/moz.build
161
--- dom/media/moz.build
162
+++ dom/media/moz.build
162
+++ dom/media/moz.build
163
@@ -318,6 +318,21 @@ if CONFIG['MOZ_WEBRTC']:
163
@@ -326,6 +326,21 @@ if CONFIG['MOZ_WEBRTC']:
164
 
164
 
165
 DEFINES['MOZILLA_INTERNAL_API'] = True
165
 DEFINES['MOZILLA_INTERNAL_API'] = True
166
 
166
 
Lines 179-194 index 86b051c58d33..fb6186dce78b 100644 Link Here
179
+if CONFIG['MOZ_SYSTEM_SOUNDTOUCH']:
179
+if CONFIG['MOZ_SYSTEM_SOUNDTOUCH']:
180
+    CXXFLAGS += CONFIG['MOZ_SOUNDTOUCH_CFLAGS']
180
+    CXXFLAGS += CONFIG['MOZ_SOUNDTOUCH_CFLAGS']
181
+
181
+
182
 if CONFIG['MOZ_ANDROID_HLS_SUPPORT'] and CONFIG['MOZ_BUILD_MOBILE_ANDROID_WITH_GRADLE']:
182
 if CONFIG['MOZ_ANDROID_HLS_SUPPORT']:
183
     DEFINES['MOZ_ANDROID_HLS_SUPPORT'] = True
183
     DEFINES['MOZ_ANDROID_HLS_SUPPORT'] = True
184
 
184
 
185
diff --git dom/media/platforms/ffmpeg/ffvpx/FFVPXRuntimeLinker.cpp dom/media/platforms/ffmpeg/ffvpx/FFVPXRuntimeLinker.cpp
185
diff --git dom/media/platforms/ffmpeg/ffvpx/FFVPXRuntimeLinker.cpp dom/media/platforms/ffmpeg/ffvpx/FFVPXRuntimeLinker.cpp
186
index 078f6ea5ef60..c600db067539 100644
186
index 078f6ea5ef60..c600db067539 100644
187
--- dom/media/platforms/ffmpeg/ffvpx/FFVPXRuntimeLinker.cpp
187
--- dom/media/platforms/ffmpeg/ffvpx/FFVPXRuntimeLinker.cpp
188
+++ dom/media/platforms/ffmpeg/ffvpx/FFVPXRuntimeLinker.cpp
188
+++ dom/media/platforms/ffmpeg/ffvpx/FFVPXRuntimeLinker.cpp
189
@@ -11,9 +11,13 @@
189
@@ -15,9 +15,13 @@
190
 #include "prmem.h"
190
 #include <windows.h>
191
 #include "prlink.h"
191
 #endif
192
 
192
 
193
+#ifdef MOZ_SYSTEM_SOUNDTOUCH
193
+#ifdef MOZ_SYSTEM_SOUNDTOUCH
194
+#include "nsXPCOMPrivate.h" // for XUL_DLL
194
+#include "nsXPCOMPrivate.h" // for XUL_DLL
Lines 200-206 index 078f6ea5ef60..c600db067539 100644 Link Here
200
 
200
 
201
 namespace mozilla {
201
 namespace mozilla {
202
 
202
 
203
@@ -54,6 +58,12 @@ FFVPXRuntimeLinker::Init()
203
@@ -64,6 +68,12 @@ FFVPXRuntimeLinker::Init()
204
 
204
 
205
   sLinkStatus = LinkStatus_FAILED;
205
   sLinkStatus = LinkStatus_FAILED;
206
 
206
 
Lines 212-224 index 078f6ea5ef60..c600db067539 100644 Link Here
212
+#else
212
+#else
213
   // We retrieve the path of the lgpllibs library as this is where mozavcodec
213
   // We retrieve the path of the lgpllibs library as this is where mozavcodec
214
   // and mozavutil libs are located.
214
   // and mozavutil libs are located.
215
   char* lgpllibsname = PR_GetLibraryName(nullptr, "lgpllibs");
215
   PathString lgpllibsname = GetLibraryName(nullptr, "lgpllibs");
216
@@ -64,6 +74,7 @@ FFVPXRuntimeLinker::Init()
216
@@ -73,6 +83,7 @@ FFVPXRuntimeLinker::Init()
217
     PR_GetLibraryFilePathname(lgpllibsname,
217
   PathString path =
218
                               (PRFuncPtr)&soundtouch::SoundTouch::getVersionId);
218
     GetLibraryFilePathname(lgpllibsname.get(),
219
   PR_FreeLibraryName(lgpllibsname);
219
                            (PRFuncPtr)&soundtouch::SoundTouch::getVersionId);
220
+#endif
220
+#endif
221
   if (!path) {
221
   if (path.IsEmpty()) {
222
     return false;
222
     return false;
223
   }
223
   }
224
diff --git media/libogg/README_MOZILLA media/libogg/README_MOZILLA
224
diff --git media/libogg/README_MOZILLA media/libogg/README_MOZILLA
Lines 342-348 index b614eef85c89..85f9099dba4d 100644 Link Here
342
+MOZ_SYSTEM_OGG=)
342
+MOZ_SYSTEM_OGG=)
343
+
343
+
344
+if test -n "$MOZ_SYSTEM_OGG"; then
344
+if test -n "$MOZ_SYSTEM_OGG"; then
345
+    PKG_CHECK_MODULES(MOZ_OGG, ogg >= 1.3.0)
345
+    PKG_CHECK_MODULES(MOZ_OGG, ogg >= 1.3.3)
346
+
346
+
347
+    _SAVE_LIBS=$LIBS
347
+    _SAVE_LIBS=$LIBS
348
+    LIBS="$LIBS $MOZ_OGG_LIBS"
348
+    LIBS="$LIBS $MOZ_OGG_LIBS"
Lines 363-369 index b614eef85c89..85f9099dba4d 100644 Link Here
363
+MOZ_SYSTEM_VORBIS=)
363
+MOZ_SYSTEM_VORBIS=)
364
+
364
+
365
+if test -n "$MOZ_SYSTEM_VORBIS"; then
365
+if test -n "$MOZ_SYSTEM_VORBIS"; then
366
+    PKG_CHECK_MODULES(MOZ_VORBIS, vorbis vorbisenc >= 1.3.5)
366
+    PKG_CHECK_MODULES(MOZ_VORBIS, vorbis vorbisenc >= 1.3.6)
367
+fi
367
+fi
368
+
368
+
369
+AC_SUBST(MOZ_SYSTEM_VORBIS)
369
+AC_SUBST(MOZ_SYSTEM_VORBIS)

Return to bug 226476