Gentoo Archives: gentoo-commits

From: Mike Gilbert <floppym@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: www-client/chromium/, www-client/chromium/files/
Date: Tue, 28 May 2019 04:01:39
Message-Id: 1559016088.f142549e0ec9bb068bbf9160fbeb116eff93770f.floppym@gentoo
1 commit: f142549e0ec9bb068bbf9160fbeb116eff93770f
2 Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
3 AuthorDate: Tue May 28 03:59:55 2019 +0000
4 Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
5 CommitDate: Tue May 28 04:01:28 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f142549e
7
8 www-client/chromium: bump to 74.0.3729.169
9
10 Package-Manager: Portage-2.3.66_p2, Repoman-2.3.12_p111
11 Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
12
13 www-client/chromium/Manifest | 1 +
14 www-client/chromium/chromium-74.0.3729.169.ebuild | 706 +++++++++++++++++++++
15 .../chromium/files/chromium-74-2f28731.patch | 483 ++++++++++++++
16 .../chromium/files/chromium-74-7685422.patch | 42 ++
17 .../chromium/files/chromium-74-c2c467f.patch | 75 +++
18 .../chromium/files/chromium-74-e1b1f3a.patch | 587 +++++++++++++++++
19 .../chromium/files/chromium-compiler-r8.patch | 169 +++++
20 www-client/chromium/files/quiche-00f47df.patch | 38 ++
21 8 files changed, 2101 insertions(+)
22
23 diff --git a/www-client/chromium/Manifest b/www-client/chromium/Manifest
24 index 8788374049e..891c6691a42 100644
25 --- a/www-client/chromium/Manifest
26 +++ b/www-client/chromium/Manifest
27 @@ -1,2 +1,3 @@
28 DIST chromium-73.0.3683.75.tar.xz 710439908 BLAKE2B 23ed7facf2f67e9bbfc2f1baf434892773d9d63dab10cebab350c3b0b2c75a07f84a4f677e01563a441cc3bae0d42212b3eb28b6d7c573b0137d25e478064a3b SHA512 52bd1dac782a2f7960eba48446d4dfc4c6c13c8e9de21bbee250fad2802beb222cff7bea9878c7338926030aa3aa7ffd2dd1238d35e261a0d766b2d9974fdaf6
29 DIST chromium-73.0.3683.86.tar.xz 710449412 BLAKE2B 87b4d15440e88be506920813a52e7a503ac81458aa3f2818490c28f6bb5cfc0ca24b316072e5a0664a8bfe6444be23e565579bc232cdfcef42acf8eeca9f216f SHA512 5dd450640c1ea30f7941231e8c459aec0312c18e089b2c8b9104c4ee835a8fa389f5fb9b301b46d87ce260956eaf3e3bd6aff6ae54c279a303aa757537cace15
30 +DIST chromium-74.0.3729.169.tar.xz 749495820 BLAKE2B bfe485220239aad146eab0cd7bf158a20bccf03abe74457ea3933094c9fb200ff7a2e9db4a62fa1a736341ce8ee987520e20bd32e13e213435fd6724d15a7d85 SHA512 783558bbae43a928b7d9fe18717b63be432409c81aba0a38ccb14f38398d8681122bdd763db6d22b01363108253432ed203a86f8c9ba627247219bf1519f839b
31
32 diff --git a/www-client/chromium/chromium-74.0.3729.169.ebuild b/www-client/chromium/chromium-74.0.3729.169.ebuild
33 new file mode 100644
34 index 00000000000..a280c02724c
35 --- /dev/null
36 +++ b/www-client/chromium/chromium-74.0.3729.169.ebuild
37 @@ -0,0 +1,706 @@
38 +# Copyright 1999-2019 Gentoo Authors
39 +# Distributed under the terms of the GNU General Public License v2
40 +
41 +EAPI=7
42 +PYTHON_COMPAT=( python2_7 )
43 +
44 +CHROMIUM_LANGS="am ar bg bn ca cs da de el en-GB es es-419 et fa fi fil fr gu he
45 + hi hr hu id it ja kn ko lt lv ml mr ms nb nl pl pt-BR pt-PT ro ru sk sl sr
46 + sv sw ta te th tr uk vi zh-CN zh-TW"
47 +
48 +inherit check-reqs chromium-2 desktop flag-o-matic multilib ninja-utils pax-utils portability python-any-r1 readme.gentoo-r1 toolchain-funcs xdg-utils
49 +
50 +DESCRIPTION="Open-source version of Google Chrome web browser"
51 +HOMEPAGE="http://chromium.org/"
52 +SRC_URI="https://commondatastorage.googleapis.com/chromium-browser-official/${P}.tar.xz"
53 +
54 +LICENSE="BSD"
55 +SLOT="0"
56 +KEYWORDS="~amd64 ~x86"
57 +IUSE="+closure-compile component-build cups gnome-keyring +hangouts jumbo-build kerberos neon pic +proprietary-codecs pulseaudio selinux +suid +system-ffmpeg +system-icu +system-libvpx +tcmalloc widevine"
58 +RESTRICT="!system-ffmpeg? ( proprietary-codecs? ( bindist ) )"
59 +REQUIRED_USE="component-build? ( !suid )"
60 +
61 +COMMON_DEPEND="
62 + >=app-accessibility/at-spi2-atk-2.26:2
63 + app-arch/bzip2:=
64 + cups? ( >=net-print/cups-1.3.11:= )
65 + >=dev-libs/atk-2.26
66 + dev-libs/expat:=
67 + dev-libs/glib:2
68 + system-icu? ( >=dev-libs/icu-59:= )
69 + >=dev-libs/libxml2-2.9.4-r3:=[icu]
70 + dev-libs/libxslt:=
71 + dev-libs/nspr:=
72 + >=dev-libs/nss-3.26:=
73 + >=dev-libs/re2-0.2016.11.01:=
74 + gnome-keyring? ( >=gnome-base/libgnome-keyring-3.12:= )
75 + >=media-libs/alsa-lib-1.0.19:=
76 + media-libs/fontconfig:=
77 + media-libs/freetype:=
78 + >=media-libs/harfbuzz-2.2.0:0=[icu(-)]
79 + media-libs/libjpeg-turbo:=
80 + media-libs/libpng:=
81 + system-libvpx? ( media-libs/libvpx:=[postproc,svc] )
82 + >=media-libs/openh264-1.6.0:=
83 + pulseaudio? ( media-sound/pulseaudio:= )
84 + system-ffmpeg? (
85 + >=media-video/ffmpeg-4:=
86 + || (
87 + media-video/ffmpeg[-samba]
88 + >=net-fs/samba-4.5.10-r1[-debug(-)]
89 + )
90 + !=net-fs/samba-4.5.12-r0
91 + media-libs/opus:=
92 + )
93 + sys-apps/dbus:=
94 + sys-apps/pciutils:=
95 + virtual/udev
96 + x11-libs/cairo:=
97 + x11-libs/gdk-pixbuf:2
98 + x11-libs/gtk+:3[X]
99 + x11-libs/libX11:=
100 + x11-libs/libXcomposite:=
101 + x11-libs/libXcursor:=
102 + x11-libs/libXdamage:=
103 + x11-libs/libXext:=
104 + x11-libs/libXfixes:=
105 + >=x11-libs/libXi-1.6.0:=
106 + x11-libs/libXrandr:=
107 + x11-libs/libXrender:=
108 + x11-libs/libXScrnSaver:=
109 + x11-libs/libXtst:=
110 + x11-libs/pango:=
111 + app-arch/snappy:=
112 + media-libs/flac:=
113 + >=media-libs/libwebp-0.4.0:=
114 + sys-libs/zlib:=[minizip]
115 + kerberos? ( virtual/krb5 )
116 +"
117 +# For nvidia-drivers blocker, see bug #413637 .
118 +RDEPEND="${COMMON_DEPEND}
119 + !<www-plugins/chrome-binary-plugins-57
120 + x11-misc/xdg-utils
121 + virtual/opengl
122 + virtual/ttf-fonts
123 + selinux? ( sec-policy/selinux-chromium )
124 + tcmalloc? ( !<x11-drivers/nvidia-drivers-331.20 )
125 + widevine? ( www-plugins/chrome-binary-plugins[widevine(-)] )
126 +"
127 +# dev-vcs/git - https://bugs.gentoo.org/593476
128 +# sys-apps/sandbox - https://crbug.com/586444
129 +DEPEND="${COMMON_DEPEND}
130 +"
131 +BDEPEND="
132 + >=app-arch/gzip-1.7
133 + !arm? (
134 + dev-lang/yasm
135 + )
136 + dev-lang/perl
137 + dev-util/gn
138 + dev-vcs/git
139 + >=dev-util/gperf-3.0.3
140 + >=dev-util/ninja-1.7.2
141 + >=net-libs/nodejs-7.6.0[inspector]
142 + sys-apps/hwids[usb(+)]
143 + >=sys-devel/bison-2.4.3
144 + sys-devel/flex
145 + closure-compile? ( virtual/jre )
146 + virtual/pkgconfig
147 +"
148 +
149 +: ${CHROMIUM_FORCE_CLANG=no}
150 +
151 +if [[ ${CHROMIUM_FORCE_CLANG} == yes ]]; then
152 + BDEPEND+=" >=sys-devel/clang-5"
153 +fi
154 +
155 +if ! has chromium_pkg_die ${EBUILD_DEATH_HOOKS}; then
156 + EBUILD_DEATH_HOOKS+=" chromium_pkg_die";
157 +fi
158 +
159 +DISABLE_AUTOFORMATTING="yes"
160 +DOC_CONTENTS="
161 +Some web pages may require additional fonts to display properly.
162 +Try installing some of the following packages if some characters
163 +are not displayed properly:
164 +- media-fonts/arphicfonts
165 +- media-fonts/droid
166 +- media-fonts/ipamonafont
167 +- media-fonts/noto
168 +- media-fonts/ja-ipafonts
169 +- media-fonts/takao-fonts
170 +- media-fonts/wqy-microhei
171 +- media-fonts/wqy-zenhei
172 +
173 +To fix broken icons on the Downloads page, you should install an icon
174 +theme that covers the appropriate MIME types, and configure this as your
175 +GTK+ icon theme.
176 +"
177 +
178 +PATCHES=(
179 + "${FILESDIR}"/chromium-compiler-r8.patch
180 + "${FILESDIR}"/chromium-widevine-r4.patch
181 + "${FILESDIR}"/chromium-fix-char_traits.patch
182 + "${FILESDIR}"/chromium-74-e1b1f3a.patch
183 + "${FILESDIR}"/chromium-74-c2c467f.patch
184 + "${FILESDIR}"/chromium-74-2f28731.patch
185 + "${FILESDIR}"/chromium-74-7685422.patch
186 + "${FILESDIR}"/quiche-00f47df.patch
187 +)
188 +
189 +pre_build_checks() {
190 + if [[ ${MERGE_TYPE} != binary ]]; then
191 + local -x CPP="$(tc-getCXX) -E"
192 + if tc-is-gcc && ! ver_test "$(gcc-version)" -ge 8.0; then
193 + die "At least gcc 8.0 is required"
194 + fi
195 + fi
196 +
197 + # Check build requirements, bug #541816 and bug #471810 .
198 + CHECKREQS_MEMORY="3G"
199 + CHECKREQS_DISK_BUILD="5G"
200 + if ( shopt -s extglob; is-flagq '-g?(gdb)?([1-9])' ); then
201 + CHECKREQS_DISK_BUILD="25G"
202 + if ! use component-build; then
203 + CHECKREQS_MEMORY="16G"
204 + fi
205 + fi
206 + check-reqs_pkg_setup
207 +}
208 +
209 +pkg_pretend() {
210 + pre_build_checks
211 +}
212 +
213 +pkg_setup() {
214 + pre_build_checks
215 +
216 + chromium_suid_sandbox_check_kernel_config
217 +}
218 +
219 +src_prepare() {
220 + # Calling this here supports resumption via FEATURES=keepwork
221 + python_setup
222 +
223 + default
224 +
225 + mkdir -p third_party/node/linux/node-linux-x64/bin || die
226 + ln -s "${EPREFIX}"/usr/bin/node third_party/node/linux/node-linux-x64/bin/node || die
227 +
228 + local keeplibs=(
229 + base/third_party/dmg_fp
230 + base/third_party/dynamic_annotations
231 + base/third_party/icu
232 + base/third_party/nspr
233 + base/third_party/superfasthash
234 + base/third_party/symbolize
235 + base/third_party/valgrind
236 + base/third_party/xdg_mime
237 + base/third_party/xdg_user_dirs
238 + buildtools/third_party/libc++
239 + buildtools/third_party/libc++abi
240 + chrome/third_party/mozilla_security_manager
241 + courgette/third_party
242 + net/third_party/mozilla_security_manager
243 + net/third_party/nss
244 + net/third_party/quic
245 + net/third_party/uri_template
246 + third_party/abseil-cpp
247 + third_party/angle
248 + third_party/angle/src/common/third_party/base
249 + third_party/angle/src/common/third_party/smhasher
250 + third_party/angle/src/common/third_party/xxhash
251 + third_party/angle/src/third_party/compiler
252 + third_party/angle/src/third_party/libXNVCtrl
253 + third_party/angle/src/third_party/trace_event
254 + third_party/angle/third_party/glslang
255 + third_party/angle/third_party/spirv-headers
256 + third_party/angle/third_party/spirv-tools
257 + third_party/angle/third_party/vulkan-headers
258 + third_party/angle/third_party/vulkan-loader
259 + third_party/angle/third_party/vulkan-tools
260 + third_party/angle/third_party/vulkan-validation-layers
261 + third_party/apple_apsl
262 + third_party/blink
263 + third_party/boringssl
264 + third_party/boringssl/src/third_party/fiat
265 + third_party/breakpad
266 + third_party/breakpad/breakpad/src/third_party/curl
267 + third_party/brotli
268 + third_party/cacheinvalidation
269 + third_party/catapult
270 + third_party/catapult/common/py_vulcanize/third_party/rcssmin
271 + third_party/catapult/common/py_vulcanize/third_party/rjsmin
272 + third_party/catapult/third_party/beautifulsoup4
273 + third_party/catapult/third_party/html5lib-python
274 + third_party/catapult/third_party/polymer
275 + third_party/catapult/third_party/six
276 + third_party/catapult/tracing/third_party/d3
277 + third_party/catapult/tracing/third_party/gl-matrix
278 + third_party/catapult/tracing/third_party/jszip
279 + third_party/catapult/tracing/third_party/mannwhitneyu
280 + third_party/catapult/tracing/third_party/oboe
281 + third_party/catapult/tracing/third_party/pako
282 + third_party/ced
283 + third_party/cld_3
284 + third_party/closure_compiler
285 + third_party/crashpad
286 + third_party/crashpad/crashpad/third_party/zlib
287 + third_party/crc32c
288 + third_party/cros_system_api
289 + third_party/dav1d
290 + third_party/devscripts
291 + third_party/dom_distiller_js
292 + third_party/emoji-segmenter
293 + third_party/fips181
294 + third_party/flatbuffers
295 + third_party/flot
296 + third_party/freetype
297 + third_party/glslang
298 + third_party/google_input_tools
299 + third_party/google_input_tools/third_party/closure_library
300 + third_party/google_input_tools/third_party/closure_library/third_party/closure
301 + third_party/googletest
302 + third_party/hunspell
303 + third_party/iccjpeg
304 + third_party/inspector_protocol
305 + third_party/jinja2
306 + third_party/jsoncpp
307 + third_party/jstemplate
308 + third_party/khronos
309 + third_party/leveldatabase
310 + third_party/libXNVCtrl
311 + third_party/libaddressinput
312 + third_party/libaom
313 + third_party/libaom/source/libaom/third_party/vector
314 + third_party/libaom/source/libaom/third_party/x86inc
315 + third_party/libjingle
316 + third_party/libphonenumber
317 + third_party/libsecret
318 + third_party/libsrtp
319 + third_party/libsync
320 + third_party/libudev
321 + third_party/libwebm
322 + third_party/libxml/chromium
323 + third_party/libyuv
324 + third_party/llvm
325 + third_party/lss
326 + third_party/lzma_sdk
327 + third_party/markupsafe
328 + third_party/mesa
329 + third_party/metrics_proto
330 + third_party/modp_b64
331 + third_party/nasm
332 + third_party/node
333 + third_party/node/node_modules/polymer-bundler/lib/third_party/UglifyJS2
334 + third_party/openmax_dl
335 + third_party/ots
336 + third_party/pdfium
337 + third_party/pdfium/third_party/agg23
338 + third_party/pdfium/third_party/base
339 + third_party/pdfium/third_party/bigint
340 + third_party/pdfium/third_party/freetype
341 + third_party/pdfium/third_party/lcms
342 + third_party/pdfium/third_party/libopenjpeg20
343 + third_party/pdfium/third_party/libpng16
344 + third_party/pdfium/third_party/libtiff
345 + third_party/pdfium/third_party/skia_shared
346 + third_party/perfetto
347 + third_party/ply
348 + third_party/polymer
349 + third_party/protobuf
350 + third_party/protobuf/third_party/six
351 + third_party/pyjson5
352 + third_party/qcms
353 + third_party/rnnoise
354 + third_party/s2cellid
355 + third_party/sfntly
356 + third_party/simplejson
357 + third_party/skia
358 + third_party/skia/include/third_party/vulkan
359 + third_party/skia/third_party/gif
360 + third_party/skia/third_party/skcms
361 + third_party/skia/third_party/vulkan
362 + third_party/smhasher
363 + third_party/spirv-headers
364 + third_party/SPIRV-Tools
365 + third_party/sqlite
366 + third_party/swiftshader
367 + third_party/swiftshader/third_party/llvm-7.0
368 + third_party/swiftshader/third_party/llvm-subzero
369 + third_party/swiftshader/third_party/subzero
370 + third_party/unrar
371 + third_party/usrsctp
372 + third_party/vulkan
373 + third_party/web-animations-js
374 + third_party/webdriver
375 + third_party/webrtc
376 + third_party/webrtc/common_audio/third_party/fft4g
377 + third_party/webrtc/common_audio/third_party/spl_sqrt_floor
378 + third_party/webrtc/modules/third_party/fft
379 + third_party/webrtc/modules/third_party/g711
380 + third_party/webrtc/modules/third_party/g722
381 + third_party/webrtc/rtc_base/third_party/base64
382 + third_party/webrtc/rtc_base/third_party/sigslot
383 + third_party/widevine
384 + third_party/woff2
385 + third_party/zlib/google
386 + url/third_party/mozilla
387 + v8/src/third_party/siphash
388 + v8/src/third_party/valgrind
389 + v8/src/third_party/utf8-decoder
390 + v8/third_party/inspector_protocol
391 + v8/third_party/v8
392 +
393 + # gyp -> gn leftovers
394 + base/third_party/libevent
395 + third_party/adobe
396 + third_party/speech-dispatcher
397 + third_party/usb_ids
398 + third_party/yasm/run_yasm.py
399 + third_party/xdg-utils
400 + )
401 + if ! use system-ffmpeg; then
402 + keeplibs+=( third_party/ffmpeg third_party/opus )
403 + fi
404 + if ! use system-icu; then
405 + keeplibs+=( third_party/icu )
406 + fi
407 + if ! use system-libvpx; then
408 + keeplibs+=( third_party/libvpx )
409 + keeplibs+=( third_party/libvpx/source/libvpx/third_party/x86inc )
410 + fi
411 + if use tcmalloc; then
412 + keeplibs+=( third_party/tcmalloc )
413 + fi
414 +
415 + # Remove most bundled libraries. Some are still needed.
416 + build/linux/unbundle/remove_bundled_libraries.py "${keeplibs[@]}" --do-remove || die
417 +}
418 +
419 +src_configure() {
420 + # Calling this here supports resumption via FEATURES=keepwork
421 + python_setup
422 +
423 + local myconf_gn=""
424 +
425 + # Make sure the build system will use the right tools, bug #340795.
426 + tc-export AR CC CXX NM
427 +
428 + if [[ ${CHROMIUM_FORCE_CLANG} == yes ]] && ! tc-is-clang; then
429 + # Force clang since gcc is pretty broken at the moment.
430 + CC=${CHOST}-clang
431 + CXX=${CHOST}-clang++
432 + strip-unsupported-flags
433 + fi
434 +
435 + if tc-is-clang; then
436 + myconf_gn+=" is_clang=true clang_use_chrome_plugins=false"
437 + else
438 + myconf_gn+=" is_clang=false"
439 + fi
440 +
441 + # Define a custom toolchain for GN
442 + myconf_gn+=" custom_toolchain=\"//build/toolchain/linux/unbundle:default\""
443 +
444 + if tc-is-cross-compiler; then
445 + tc-export BUILD_{AR,CC,CXX,NM}
446 + myconf_gn+=" host_toolchain=\"//build/toolchain/linux/unbundle:host\""
447 + myconf_gn+=" v8_snapshot_toolchain=\"//build/toolchain/linux/unbundle:host\""
448 + else
449 + myconf_gn+=" host_toolchain=\"//build/toolchain/linux/unbundle:default\""
450 + fi
451 +
452 + # GN needs explicit config for Debug/Release as opposed to inferring it from build directory.
453 + myconf_gn+=" is_debug=false"
454 +
455 + # Component build isn't generally intended for use by end users. It's mostly useful
456 + # for development and debugging.
457 + myconf_gn+=" is_component_build=$(usex component-build true false)"
458 +
459 + # https://chromium.googlesource.com/chromium/src/+/lkcr/docs/jumbo.md
460 + myconf_gn+=" use_jumbo_build=$(usex jumbo-build true false)"
461 +
462 + myconf_gn+=" use_allocator=$(usex tcmalloc \"tcmalloc\" \"none\")"
463 +
464 + # Disable nacl, we can't build without pnacl (http://crbug.com/269560).
465 + myconf_gn+=" enable_nacl=false"
466 +
467 + # Use system-provided libraries.
468 + # TODO: freetype -- remove sources (https://bugs.chromium.org/p/pdfium/issues/detail?id=733).
469 + # TODO: use_system_hunspell (upstream changes needed).
470 + # TODO: use_system_libsrtp (bug #459932).
471 + # TODO: use_system_protobuf (bug #525560).
472 + # TODO: use_system_ssl (http://crbug.com/58087).
473 + # TODO: use_system_sqlite (http://crbug.com/22208).
474 +
475 + # libevent: https://bugs.gentoo.org/593458
476 + local gn_system_libraries=(
477 + flac
478 + fontconfig
479 + freetype
480 + # Need harfbuzz_from_pkgconfig target
481 + #harfbuzz-ng
482 + libdrm
483 + libjpeg
484 + libpng
485 + libwebp
486 + libxml
487 + libxslt
488 + openh264
489 + re2
490 + snappy
491 + yasm
492 + zlib
493 + )
494 + if use system-ffmpeg; then
495 + gn_system_libraries+=( ffmpeg opus )
496 + fi
497 + if use system-icu; then
498 + gn_system_libraries+=( icu )
499 + fi
500 + if use system-libvpx; then
501 + gn_system_libraries+=( libvpx )
502 + fi
503 + build/linux/unbundle/replace_gn_files.py --system-libraries "${gn_system_libraries[@]}" || die
504 +
505 + # See dependency logic in third_party/BUILD.gn
506 + myconf_gn+=" use_system_harfbuzz=true"
507 +
508 + # Optional dependencies.
509 + myconf_gn+=" closure_compile=$(usex closure-compile true false)"
510 + myconf_gn+=" enable_hangout_services_extension=$(usex hangouts true false)"
511 + myconf_gn+=" enable_widevine=$(usex widevine true false)"
512 + myconf_gn+=" use_cups=$(usex cups true false)"
513 + myconf_gn+=" use_gnome_keyring=$(usex gnome-keyring true false)"
514 + myconf_gn+=" use_kerberos=$(usex kerberos true false)"
515 + myconf_gn+=" use_pulseaudio=$(usex pulseaudio true false)"
516 +
517 + # TODO: link_pulseaudio=true for GN.
518 +
519 + myconf_gn+=" fieldtrial_testing_like_official_build=true"
520 +
521 + # Never use bundled gold binary. Disable gold linker flags for now.
522 + # Do not use bundled clang.
523 + # Trying to use gold results in linker crash.
524 + myconf_gn+=" use_gold=false use_sysroot=false linux_use_bundled_binutils=false use_custom_libcxx=false"
525 +
526 + # Disable forced lld, bug 641556
527 + myconf_gn+=" use_lld=false"
528 +
529 + ffmpeg_branding="$(usex proprietary-codecs Chrome Chromium)"
530 + myconf_gn+=" proprietary_codecs=$(usex proprietary-codecs true false)"
531 + myconf_gn+=" ffmpeg_branding=\"${ffmpeg_branding}\""
532 +
533 + # Set up Google API keys, see http://www.chromium.org/developers/how-tos/api-keys .
534 + # Note: these are for Gentoo use ONLY. For your own distribution,
535 + # please get your own set of keys. Feel free to contact chromium@g.o
536 + # for more info.
537 + local google_api_key="AIzaSyDEAOvatFo0eTgsV_ZlEzx0ObmepsMzfAc"
538 + local google_default_client_id="329227923882.apps.googleusercontent.com"
539 + local google_default_client_secret="vgKG0NNv7GoDpbtoFNLxCUXu"
540 + myconf_gn+=" google_api_key=\"${google_api_key}\""
541 + myconf_gn+=" google_default_client_id=\"${google_default_client_id}\""
542 + myconf_gn+=" google_default_client_secret=\"${google_default_client_secret}\""
543 +
544 + local myarch="$(tc-arch)"
545 +
546 + # Avoid CFLAGS problems, bug #352457, bug #390147.
547 + if ! use custom-cflags; then
548 + replace-flags "-Os" "-O2"
549 + strip-flags
550 +
551 + # Prevent linker from running out of address space, bug #471810 .
552 + if use x86; then
553 + filter-flags "-g*"
554 + fi
555 +
556 + # Prevent libvpx build failures. Bug 530248, 544702, 546984.
557 + if [[ ${myarch} == amd64 || ${myarch} == x86 ]]; then
558 + filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 -mno-avx -mno-avx2
559 + fi
560 + fi
561 +
562 + if [[ $myarch = amd64 ]] ; then
563 + myconf_gn+=" target_cpu=\"x64\""
564 + ffmpeg_target_arch=x64
565 + elif [[ $myarch = x86 ]] ; then
566 + myconf_gn+=" target_cpu=\"x86\""
567 + ffmpeg_target_arch=ia32
568 +
569 + # This is normally defined by compiler_cpu_abi in
570 + # build/config/compiler/BUILD.gn, but we patch that part out.
571 + append-flags -msse2 -mfpmath=sse -mmmx
572 + elif [[ $myarch = arm64 ]] ; then
573 + myconf_gn+=" target_cpu=\"arm64\""
574 + ffmpeg_target_arch=arm64
575 + elif [[ $myarch = arm ]] ; then
576 + myconf_gn+=" target_cpu=\"arm\""
577 + ffmpeg_target_arch=$(usex neon arm-neon arm)
578 + else
579 + die "Failed to determine target arch, got '$myarch'."
580 + fi
581 +
582 + # Make sure that -Werror doesn't get added to CFLAGS by the build system.
583 + # Depending on GCC version the warnings are different and we don't want
584 + # the build to fail because of that.
585 + myconf_gn+=" treat_warnings_as_errors=false"
586 +
587 + # Disable fatal linker warnings, bug 506268.
588 + myconf_gn+=" fatal_linker_warnings=false"
589 +
590 + # https://bugs.gentoo.org/588596
591 + #append-cxxflags $(test-flags-CXX -fno-delete-null-pointer-checks)
592 +
593 + # Bug 491582.
594 + export TMPDIR="${WORKDIR}/temp"
595 + mkdir -p -m 755 "${TMPDIR}" || die
596 +
597 + # https://bugs.gentoo.org/654216
598 + addpredict /dev/dri/ #nowarn
599 +
600 + #if ! use system-ffmpeg; then
601 + if false; then
602 + local build_ffmpeg_args=""
603 + if use pic && [[ "${ffmpeg_target_arch}" == "ia32" ]]; then
604 + build_ffmpeg_args+=" --disable-asm"
605 + fi
606 +
607 + # Re-configure bundled ffmpeg. See bug #491378 for example reasons.
608 + einfo "Configuring bundled ffmpeg..."
609 + pushd third_party/ffmpeg > /dev/null || die
610 + chromium/scripts/build_ffmpeg.py linux ${ffmpeg_target_arch} \
611 + --branding ${ffmpeg_branding} -- ${build_ffmpeg_args} || die
612 + chromium/scripts/copy_config.sh || die
613 + chromium/scripts/generate_gn.py || die
614 + popd > /dev/null || die
615 + fi
616 +
617 + einfo "Configuring Chromium..."
618 + set -- gn gen --args="${myconf_gn} ${EXTRA_GN}" out/Release
619 + echo "$@"
620 + "$@" || die
621 +}
622 +
623 +src_compile() {
624 + # Final link uses lots of file descriptors.
625 + ulimit -n 2048
626 +
627 + # Calling this here supports resumption via FEATURES=keepwork
628 + python_setup
629 +
630 + #"${EPYTHON}" tools/clang/scripts/update.py --force-local-build --gcc-toolchain /usr --skip-checkout --use-system-cmake --without-android || die
631 +
632 + # Work around broken deps
633 + #eninja -C out/Release gen/ui/accessibility/ax_enums.mojom{,-shared}.h
634 +
635 + # Build mksnapshot and pax-mark it.
636 + local x
637 + for x in mksnapshot v8_context_snapshot_generator; do
638 + if tc-is-cross-compiler; then
639 + eninja -C out/Release "host/${x}"
640 + pax-mark m "out/Release/host/${x}"
641 + else
642 + eninja -C out/Release "${x}"
643 + pax-mark m "out/Release/${x}"
644 + fi
645 + done
646 +
647 + # Even though ninja autodetects number of CPUs, we respect
648 + # user's options, for debugging with -j 1 or any other reason.
649 + eninja -C out/Release chrome chromedriver
650 + use suid && eninja -C out/Release chrome_sandbox
651 +
652 + pax-mark m out/Release/chrome
653 +}
654 +
655 +src_install() {
656 + local CHROMIUM_HOME="/usr/$(get_libdir)/chromium-browser"
657 + exeinto "${CHROMIUM_HOME}"
658 + doexe out/Release/chrome
659 +
660 + if use suid; then
661 + newexe out/Release/chrome_sandbox chrome-sandbox
662 + fperms 4755 "${CHROMIUM_HOME}/chrome-sandbox"
663 + fi
664 +
665 + doexe out/Release/chromedriver
666 +
667 + local sedargs=( -e "s:/usr/lib/:/usr/$(get_libdir)/:g" )
668 + sed "${sedargs[@]}" "${FILESDIR}/chromium-launcher-r3.sh" > chromium-launcher.sh || die
669 + doexe chromium-launcher.sh
670 +
671 + # It is important that we name the target "chromium-browser",
672 + # xdg-utils expect it; bug #355517.
673 + dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium-browser
674 + # keep the old symlink around for consistency
675 + dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium
676 +
677 + dosym "${CHROMIUM_HOME}/chromedriver" /usr/bin/chromedriver
678 +
679 + # Allow users to override command-line options, bug #357629.
680 + insinto /etc/chromium
681 + newins "${FILESDIR}/chromium.default" "default"
682 +
683 + pushd out/Release/locales > /dev/null || die
684 + chromium_remove_language_paks
685 + popd
686 +
687 + insinto "${CHROMIUM_HOME}"
688 + doins out/Release/*.bin
689 + doins out/Release/*.pak
690 + doins out/Release/*.so
691 +
692 + if ! use system-icu; then
693 + doins out/Release/icudtl.dat
694 + fi
695 +
696 + doins -r out/Release/locales
697 + doins -r out/Release/resources
698 +
699 + if [[ -d out/Release/swiftshader ]]; then
700 + insinto "${CHROMIUM_HOME}/swiftshader"
701 + doins out/Release/swiftshader/*.so
702 + fi
703 +
704 + # Install icons and desktop entry.
705 + local branding size
706 + for size in 16 22 24 32 48 64 128 256 ; do
707 + case ${size} in
708 + 16|32) branding="chrome/app/theme/default_100_percent/chromium" ;;
709 + *) branding="chrome/app/theme/chromium" ;;
710 + esac
711 + newicon -s ${size} "${branding}/product_logo_${size}.png" \
712 + chromium-browser.png
713 + done
714 +
715 + local mime_types="text/html;text/xml;application/xhtml+xml;"
716 + mime_types+="x-scheme-handler/http;x-scheme-handler/https;" # bug #360797
717 + mime_types+="x-scheme-handler/ftp;" # bug #412185
718 + mime_types+="x-scheme-handler/mailto;x-scheme-handler/webcal;" # bug #416393
719 + make_desktop_entry \
720 + chromium-browser \
721 + "Chromium" \
722 + chromium-browser \
723 + "Network;WebBrowser" \
724 + "MimeType=${mime_types}\nStartupWMClass=chromium-browser"
725 + sed -e "/^Exec/s/$/ %U/" -i "${ED}"/usr/share/applications/*.desktop || die
726 +
727 + # Install GNOME default application entry (bug #303100).
728 + insinto /usr/share/gnome-control-center/default-apps
729 + newins "${FILESDIR}"/chromium-browser.xml chromium-browser.xml
730 +
731 + readme.gentoo_create_doc
732 +}
733 +
734 +pkg_postrm() {
735 + xdg_icon_cache_update
736 + xdg_desktop_database_update
737 +}
738 +
739 +pkg_postinst() {
740 + xdg_icon_cache_update
741 + xdg_desktop_database_update
742 + readme.gentoo_print_elog
743 +}
744
745 diff --git a/www-client/chromium/files/chromium-74-2f28731.patch b/www-client/chromium/files/chromium-74-2f28731.patch
746 new file mode 100644
747 index 00000000000..83452619fe0
748 --- /dev/null
749 +++ b/www-client/chromium/files/chromium-74-2f28731.patch
750 @@ -0,0 +1,483 @@
751 +From 2f28731c17b246bd70075f828dcafcd23547da5d Mon Sep 17 00:00:00 2001
752 +From: David 'Digit' Turner <digit@××××××.com>
753 +Date: Wed, 3 Apr 2019 14:32:09 +0000
754 +Subject: [PATCH] base: Fix Value layout for GCC
755 +MIME-Version: 1.0
756 +Content-Type: text/plain; charset=UTF-8
757 +Content-Transfer-Encoding: 8bit
758 +
759 +It turns out that the previous changes to the base::Value
760 +layout broke GCC compilation (see [1] for details).
761 +
762 +This CL fixes the situation by using a new DoubleStorage
763 +type that will store double values in a 4-byte aligned
764 +struct, with bit_cast<> being used to convert between
765 +double and DoubleStorage values in the implementation.
766 +
767 +This ensures that base::Value remains as small as possible
768 +in all cases. The small penalty is that loading/storing
769 +double values on 32-bit ARM is slightly slower due to
770 +the fact that the value is no longer 8-byte aligned.
771 +
772 ++ Fix the ValuesTest.SizeOfValue test to work correctly,
773 + and disable it for debug builds, so it doesn't fail
774 + because debug versions of the internal containers
775 + are larger on certain systems.
776 +
777 +[1] https://chromium-review.googlesource.com/c/chromium/src/+/1472716
778 +
779 +BUG=646113
780 +R=dcheng@××××××××.org, pasko@××××××××.org, lizeb@××××××××.org, jdoerrie@××××××××.org, jose.dapena@×××.com
781 +
782 +Change-Id: I9a365407dc064ba1bdc19859706f4154a495921e
783 +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1550363
784 +Commit-Queue: David Turner <digit@××××××××.org>
785 +Reviewed-by: Jan Wilken Dörrie <jdoerrie@××××××××.org>
786 +Cr-Commit-Position: refs/heads/master@{#647271}
787 +---
788 + base/values.cc | 67 +++++++++++++---------------
789 + base/values.h | 94 ++++++++++------------------------------
790 + base/values_unittest.cc | 96 ++++++++++++++++++++++++++++++-----------
791 + 3 files changed, 124 insertions(+), 133 deletions(-)
792 +
793 +diff --git a/base/values.cc b/base/values.cc
794 +index 9fed5b52d60e..16d686b0bee5 100644
795 +--- a/base/values.cc
796 ++++ b/base/values.cc
797 +@@ -12,6 +12,7 @@
798 + #include <ostream>
799 + #include <utility>
800 +
801 ++#include "base/bit_cast.h"
802 + #include "base/json/json_writer.h"
803 + #include "base/logging.h"
804 + #include "base/memory/ptr_util.h"
805 +@@ -36,6 +37,9 @@ static_assert(std::is_standard_layout<Value>::value,
806 + "base::Value should be a standard-layout C++ class in order "
807 + "to avoid undefined behaviour in its implementation!");
808 +
809 ++static_assert(sizeof(Value::DoubleStorage) == sizeof(double),
810 ++ "The double and DoubleStorage types should have the same size");
811 ++
812 + namespace {
813 +
814 + const char* const kTypeNames[] = {"null", "boolean", "integer", "double",
815 +@@ -110,8 +114,6 @@ Value::Value(Value&& that) noexcept {
816 + InternalMoveConstructFrom(std::move(that));
817 + }
818 +
819 +-Value::Value() noexcept : type_(Type::NONE) {}
820 +-
821 + Value::Value(Type type) : type_(type) {
822 + // Initialize with the default value.
823 + switch (type_) {
824 +@@ -125,7 +127,7 @@ Value::Value(Type type) : type_(type) {
825 + int_value_ = 0;
826 + return;
827 + case Type::DOUBLE:
828 +- double_value_ = 0.0;
829 ++ double_value_ = bit_cast<DoubleStorage>(0.0);
830 + return;
831 + case Type::STRING:
832 + new (&string_value_) std::string();
833 +@@ -149,21 +151,16 @@ Value::Value(Type type) : type_(type) {
834 + CHECK(false);
835 + }
836 +
837 +-Value::Value(bool in_bool)
838 +- : bool_type_(Type::BOOLEAN),
839 +- bool_value_(in_bool) {}
840 ++Value::Value(bool in_bool) : type_(Type::BOOLEAN), bool_value_(in_bool) {}
841 +
842 +-Value::Value(int in_int)
843 +- : int_type_(Type::INTEGER),
844 +- int_value_(in_int) {}
845 ++Value::Value(int in_int) : type_(Type::INTEGER), int_value_(in_int) {}
846 +
847 + Value::Value(double in_double)
848 +- : double_type_(Type::DOUBLE),
849 +- double_value_(in_double) {
850 +- if (!std::isfinite(double_value_)) {
851 ++ : type_(Type::DOUBLE), double_value_(bit_cast<DoubleStorage>(in_double)) {
852 ++ if (!std::isfinite(in_double)) {
853 + NOTREACHED() << "Non-finite (i.e. NaN or positive/negative infinity) "
854 + << "values cannot be represented in JSON";
855 +- double_value_ = 0.0;
856 ++ double_value_ = bit_cast<DoubleStorage>(0.0);
857 + }
858 + }
859 +
860 +@@ -172,8 +169,7 @@ Value::Value(const char* in_string) : Value(std::string(in_string)) {}
861 + Value::Value(StringPiece in_string) : Value(std::string(in_string)) {}
862 +
863 + Value::Value(std::string&& in_string) noexcept
864 +- : string_type_(Type::STRING),
865 +- string_value_(std::move(in_string)) {
866 ++ : type_(Type::STRING), string_value_(std::move(in_string)) {
867 + DCHECK(IsStringUTF8(string_value_));
868 + }
869 +
870 +@@ -182,19 +178,15 @@ Value::Value(const char16* in_string16) : Value(StringPiece16(in_string16)) {}
871 + Value::Value(StringPiece16 in_string16) : Value(UTF16ToUTF8(in_string16)) {}
872 +
873 + Value::Value(const std::vector<char>& in_blob)
874 +- : binary_type_(Type::BINARY),
875 +- binary_value_(in_blob.begin(), in_blob.end()) {}
876 ++ : type_(Type::BINARY), binary_value_(in_blob.begin(), in_blob.end()) {}
877 +
878 + Value::Value(base::span<const uint8_t> in_blob)
879 +- : binary_type_(Type::BINARY),
880 +- binary_value_(in_blob.begin(), in_blob.end()) {}
881 ++ : type_(Type::BINARY), binary_value_(in_blob.begin(), in_blob.end()) {}
882 +
883 + Value::Value(BlobStorage&& in_blob) noexcept
884 +- : binary_type_(Type::BINARY),
885 +- binary_value_(std::move(in_blob)) {}
886 ++ : type_(Type::BINARY), binary_value_(std::move(in_blob)) {}
887 +
888 +-Value::Value(const DictStorage& in_dict)
889 +- : dict_type_(Type::DICTIONARY), dict_() {
890 ++Value::Value(const DictStorage& in_dict) : type_(Type::DICTIONARY), dict_() {
891 + dict_.reserve(in_dict.size());
892 + for (const auto& it : in_dict) {
893 + dict_.try_emplace(dict_.end(), it.first,
894 +@@ -203,18 +195,16 @@ Value::Value(const DictStorage& in_dict)
895 + }
896 +
897 + Value::Value(DictStorage&& in_dict) noexcept
898 +- : dict_type_(Type::DICTIONARY),
899 +- dict_(std::move(in_dict)) {}
900 ++ : type_(Type::DICTIONARY), dict_(std::move(in_dict)) {}
901 +
902 +-Value::Value(const ListStorage& in_list) : list_type_(Type::LIST), list_() {
903 ++Value::Value(const ListStorage& in_list) : type_(Type::LIST), list_() {
904 + list_.reserve(in_list.size());
905 + for (const auto& val : in_list)
906 + list_.emplace_back(val.Clone());
907 + }
908 +
909 + Value::Value(ListStorage&& in_list) noexcept
910 +- : list_type_(Type::LIST),
911 +- list_(std::move(in_list)) {}
912 ++ : type_(Type::LIST), list_(std::move(in_list)) {}
913 +
914 + Value& Value::operator=(Value&& that) noexcept {
915 + InternalCleanup();
916 +@@ -223,6 +213,10 @@ Value& Value::operator=(Value&& that) noexcept {
917 + return *this;
918 + }
919 +
920 ++double Value::AsDoubleInternal() const {
921 ++ return bit_cast<double>(double_value_);
922 ++}
923 ++
924 + Value Value::Clone() const {
925 + switch (type_) {
926 + case Type::NONE:
927 +@@ -232,7 +226,7 @@ Value Value::Clone() const {
928 + case Type::INTEGER:
929 + return Value(int_value_);
930 + case Type::DOUBLE:
931 +- return Value(double_value_);
932 ++ return Value(AsDoubleInternal());
933 + case Type::STRING:
934 + return Value(string_value_);
935 + case Type::BINARY:
936 +@@ -277,7 +271,7 @@ int Value::GetInt() const {
937 +
938 + double Value::GetDouble() const {
939 + if (is_double())
940 +- return double_value_;
941 ++ return AsDoubleInternal();
942 + if (is_int())
943 + return int_value_;
944 + CHECK(false);
945 +@@ -342,9 +336,10 @@ base::Optional<double> Value::FindDoubleKey(StringPiece key) const {
946 + const Value* result = FindKey(key);
947 + if (result) {
948 + if (result->is_int())
949 +- return base::make_optional(static_cast<double>(result->int_value_));
950 +- if (result->is_double())
951 +- return base::make_optional(result->double_value_);
952 ++ return static_cast<double>(result->int_value_);
953 ++ if (result->is_double()) {
954 ++ return result->AsDoubleInternal();
955 ++ }
956 + }
957 + return base::nullopt;
958 + }
959 +@@ -601,7 +596,7 @@ bool Value::GetAsInteger(int* out_value) const {
960 +
961 + bool Value::GetAsDouble(double* out_value) const {
962 + if (out_value && is_double()) {
963 +- *out_value = double_value_;
964 ++ *out_value = AsDoubleInternal();
965 + return true;
966 + }
967 + if (out_value && is_int()) {
968 +@@ -696,7 +691,7 @@ bool operator==(const Value& lhs, const Value& rhs) {
969 + case Value::Type::INTEGER:
970 + return lhs.int_value_ == rhs.int_value_;
971 + case Value::Type::DOUBLE:
972 +- return lhs.double_value_ == rhs.double_value_;
973 ++ return lhs.AsDoubleInternal() == rhs.AsDoubleInternal();
974 + case Value::Type::STRING:
975 + return lhs.string_value_ == rhs.string_value_;
976 + case Value::Type::BINARY:
977 +@@ -741,7 +736,7 @@ bool operator<(const Value& lhs, const Value& rhs) {
978 + case Value::Type::INTEGER:
979 + return lhs.int_value_ < rhs.int_value_;
980 + case Value::Type::DOUBLE:
981 +- return lhs.double_value_ < rhs.double_value_;
982 ++ return lhs.AsDoubleInternal() < rhs.AsDoubleInternal();
983 + case Value::Type::STRING:
984 + return lhs.string_value_ < rhs.string_value_;
985 + case Value::Type::BINARY:
986 +diff --git a/base/values.h b/base/values.h
987 +index 486fe7ff3976..c455936d4961 100644
988 +--- a/base/values.h
989 ++++ b/base/values.h
990 +@@ -83,6 +83,8 @@ class BASE_EXPORT Value {
991 + using BlobStorage = std::vector<uint8_t>;
992 + using DictStorage = flat_map<std::string, std::unique_ptr<Value>>;
993 + using ListStorage = std::vector<Value>;
994 ++ // See technical note below explaining why this is used.
995 ++ using DoubleStorage = struct { alignas(4) char v[sizeof(double)]; };
996 +
997 + enum class Type {
998 + NONE = 0,
999 +@@ -111,7 +113,10 @@ class BASE_EXPORT Value {
1000 + static std::unique_ptr<Value> ToUniquePtrValue(Value val);
1001 +
1002 + Value(Value&& that) noexcept;
1003 +- Value() noexcept; // A null value.
1004 ++ Value() noexcept {} // A null value
1005 ++ // Fun fact: using '= default' above instead of '{}' does not work because
1006 ++ // the compiler complains that the default constructor was deleted since
1007 ++ // the inner union contains fields with non-default constructors.
1008 +
1009 + // Value's copy constructor and copy assignment operator are deleted. Use this
1010 + // to obtain a deep copy explicitly.
1011 +@@ -405,82 +410,29 @@ class BASE_EXPORT Value {
1012 + size_t EstimateMemoryUsage() const;
1013 +
1014 + protected:
1015 +- // Technical note:
1016 +- // The naive way to implement a tagged union leads to wasted bytes
1017 +- // in the object on CPUs like ARM ones, which impose an 8-byte alignment
1018 +- // for double values. I.e. if one does something like:
1019 ++ // Special case for doubles, which are aligned to 8 bytes on some
1020 ++ // 32-bit architectures. In this case, a simple declaration as a
1021 ++ // double member would make the whole union 8 byte-aligned, which
1022 ++ // would also force 4 bytes of wasted padding space before it in
1023 ++ // the Value layout.
1024 + //
1025 +- // struct TaggedValue {
1026 +- // int type_; // size = 1, align = 4
1027 +- // union {
1028 +- // bool bool_value_; // size = 1, align = 1
1029 +- // int int_value_; // size = 4, align = 4
1030 +- // double double_value_; // size = 8, align = 8
1031 +- // std::string string_value_; // size = 12, align = 4 (32-bit)
1032 +- // };
1033 +- // };
1034 +- //
1035 +- // The end result is that the union will have an alignment of 8, and a size
1036 +- // of 16, due to 4 extra padding bytes following |string_value_| to respect
1037 +- // the alignment requirement.
1038 +- //
1039 +- // As a consequence, the struct TaggedValue will have a size of 24 bytes,
1040 +- // due to the size of the union (16), the size of |type_| (4) and 4 bytes
1041 +- // of padding between |type_| and the union to respect its alignment.
1042 +- //
1043 +- // This means 8 bytes of unused memory per instance on 32-bit ARM!
1044 +- //
1045 +- // To reclaim these, a union of structs is used instead, in order to ensure
1046 +- // that |double_value_| below is always located at an offset that is a
1047 +- // multiple of 8, relative to the start of the overall data structure.
1048 +- //
1049 +- // Each struct must declare its own |type_| field, which must have a different
1050 +- // name, to appease the C++ compiler.
1051 +- //
1052 +- // Using this technique sizeof(base::Value) == 16 on 32-bit ARM instead
1053 +- // of 24, without losing any information. Results are unchanged for x86,
1054 +- // x86_64 and arm64 (16, 32 and 32 bytes respectively).
1055 ++ // To override this, store the value as an array of 32-bit integers, and
1056 ++ // perform the appropriate bit casts when reading / writing to it.
1057 ++ Type type_ = Type::NONE;
1058 ++
1059 + union {
1060 +- struct {
1061 +- // TODO(crbug.com/646113): Make these private once DictionaryValue and
1062 +- // ListValue are properly inlined.
1063 +- Type type_ : 8;
1064 +- };
1065 +- struct {
1066 +- Type bool_type_ : 8;
1067 +- bool bool_value_;
1068 +- };
1069 +- struct {
1070 +- Type int_type_ : 8;
1071 +- int int_value_;
1072 +- };
1073 +- struct {
1074 +- Type double_type_ : 8;
1075 +- // Subtle: On architectures that require it, the compiler will ensure
1076 +- // that |double_value_|'s offset is a multiple of 8 (e.g. 32-bit ARM).
1077 +- // See technical note above to understand why it is important.
1078 +- double double_value_;
1079 +- };
1080 +- struct {
1081 +- Type string_type_ : 8;
1082 +- std::string string_value_;
1083 +- };
1084 +- struct {
1085 +- Type binary_type_ : 8;
1086 +- BlobStorage binary_value_;
1087 +- };
1088 +- struct {
1089 +- Type dict_type_ : 8;
1090 +- DictStorage dict_;
1091 +- };
1092 +- struct {
1093 +- Type list_type_ : 8;
1094 +- ListStorage list_;
1095 +- };
1096 ++ bool bool_value_;
1097 ++ int int_value_;
1098 ++ DoubleStorage double_value_;
1099 ++ std::string string_value_;
1100 ++ BlobStorage binary_value_;
1101 ++ DictStorage dict_;
1102 ++ ListStorage list_;
1103 + };
1104 +
1105 + private:
1106 + friend class ValuesTest_SizeOfValue_Test;
1107 ++ double AsDoubleInternal() const;
1108 + void InternalMoveConstructFrom(Value&& that);
1109 + void InternalCleanup();
1110 +
1111 +diff --git a/base/values_unittest.cc b/base/values_unittest.cc
1112 +index 2dd1c76afaa9..f3536a8612b1 100644
1113 +--- a/base/values_unittest.cc
1114 ++++ b/base/values_unittest.cc
1115 +@@ -26,45 +26,89 @@
1116 +
1117 + namespace base {
1118 +
1119 +-// Test is currently incorrect on Windows x86.
1120 +-#if !defined(OS_WIN) || !defined(ARCH_CPU_X86)
1121 ++// Ensure that base::Value is as small as possible, i.e. that there is
1122 ++// no wasted space after the inner value due to alignment constraints.
1123 ++// Distinguish between the 'header' that includes |type_| and and the inner
1124 ++// value that follows it, which can be a bool, int, double, string, blob, list
1125 ++// or dict.
1126 ++//
1127 ++// This test is only enabled when NDEBUG is defined. This way the test will not
1128 ++// fail in debug builds that sometimes contain larger versions of the standard
1129 ++// containers used inside base::Value.
1130 ++#if defined(NDEBUG)
1131 ++
1132 ++static size_t AlignSizeTo(size_t size, size_t alignment) {
1133 ++ EXPECT_TRUE((alignment & (alignment - 1)) == 0)
1134 ++ << "Alignment " << alignment << " is not a power of 2!";
1135 ++ return (size + (alignment - 1u)) & ~(alignment - 1u);
1136 ++}
1137 ++
1138 + TEST(ValuesTest, SizeOfValue) {
1139 +- // Ensure that base::Value is as small as possible, i.e. that there is
1140 +- // no wasted space after the inner value due to alignment constraints.
1141 +- // Distinguish between the 'header' that includes |type_| and and the inner
1142 +- // value that follows it, which can be a bool, int, double, string, blob, list
1143 +- // or dict.
1144 +-#define INNER_TYPES_LIST(X) \
1145 +- X(bool, bool_value_) \
1146 +- X(int, int_value_) \
1147 +- X(double, double_value_) \
1148 +- X(std::string, string_value_) \
1149 +- X(Value::BlobStorage, binary_value_) \
1150 +- X(Value::ListStorage, list_) \
1151 ++#define INNER_TYPES_LIST(X) \
1152 ++ X(bool, bool_value_) \
1153 ++ X(int, int_value_) \
1154 ++ X(Value::DoubleStorage, double_value_) \
1155 ++ X(std::string, string_value_) \
1156 ++ X(Value::BlobStorage, binary_value_) \
1157 ++ X(Value::ListStorage, list_) \
1158 + X(Value::DictStorage, dict_)
1159 +
1160 +-#define INNER_STRUCT_LIMIT(type, value) offsetof(Value, value) + sizeof(type),
1161 ++#define INNER_FIELD_ALIGNMENT(type, value) alignof(type),
1162 ++
1163 ++ // The maximum alignment of each inner struct value field inside base::Value
1164 ++ size_t max_inner_value_alignment =
1165 ++ std::max({INNER_TYPES_LIST(INNER_FIELD_ALIGNMENT)});
1166 ++
1167 ++ // Check that base::Value has the smallest alignment possible. This would
1168 ++ // fail if the header would contain something that has a larger alignment
1169 ++ // than necessary.
1170 ++ EXPECT_EQ(max_inner_value_alignment, alignof(Value));
1171 ++
1172 ++ // Find the offset of each inner value. Which should normally not be
1173 ++ // larger than 4. Note that we use std::max(4, ...) because bool_value_
1174 ++ // could be stored just after the |bool_type_| field, with an offset of
1175 ++ // 1, and that would be ok.
1176 ++#define INNER_VALUE_START_OFFSET(type, value) offsetof(Value, value),
1177 ++
1178 ++ size_t min_inner_value_offset =
1179 ++ std::min({INNER_TYPES_LIST(INNER_VALUE_START_OFFSET)});
1180 +
1181 +- // Return the maximum size in bytes of each inner struct inside base::Value
1182 +- size_t max_inner_struct_limit =
1183 +- std::max({INNER_TYPES_LIST(INNER_STRUCT_LIMIT)});
1184 ++ // Inner fields may contain pointers, which have an alignment of 8
1185 ++ // on most 64-bit platforms.
1186 ++ size_t expected_min_offset = alignof(void*);
1187 ++
1188 ++ EXPECT_EQ(expected_min_offset, min_inner_value_offset);
1189 +
1190 + // Ensure that base::Value is not larger than necessary, i.e. that there is
1191 +- // no un-necessary padding afte the structs due to alignment constraints of
1192 ++ // no un-necessary padding after the structs due to alignment constraints of
1193 + // one of the inner fields.
1194 +- EXPECT_EQ(max_inner_struct_limit, sizeof(Value));
1195 +- if (max_inner_struct_limit != sizeof(Value)) {
1196 ++#define INNER_STRUCT_END_OFFSET(type, value) \
1197 ++ offsetof(Value, value) + sizeof(type),
1198 ++
1199 ++ // The maximum size in bytes of each inner struct inside base::Value,
1200 ++ size_t max_inner_struct_end_offset =
1201 ++ std::max({INNER_TYPES_LIST(INNER_STRUCT_END_OFFSET)});
1202 ++
1203 ++ // The expected value size.
1204 ++ size_t expected_value_size =
1205 ++ AlignSizeTo(max_inner_struct_end_offset, alignof(Value));
1206 ++
1207 ++ EXPECT_EQ(expected_value_size, sizeof(Value));
1208 ++ if (min_inner_value_offset != expected_min_offset ||
1209 ++ expected_value_size != sizeof(Value)) {
1210 + // The following are useful to understand what's wrong when the EXPECT_EQ()
1211 +- // above actually fails.
1212 +-#define PRINT_INNER_FIELD_INFO(x, y) \
1213 +- LOG(INFO) << #y " type=" #x " size=" << sizeof(x) << " align=" << alignof(x);
1214 ++ // above actually fail.
1215 ++#define PRINT_INNER_FIELD_INFO(x, y) \
1216 ++ LOG(INFO) << #y " type=" #x " offset=" << offsetof(Value, y) \
1217 ++ << " size=" << sizeof(x) << " align=" << alignof(x);
1218 +
1219 + LOG(INFO) << "Value size=" << sizeof(Value) << " align=" << alignof(Value);
1220 + INNER_TYPES_LIST(PRINT_INNER_FIELD_INFO)
1221 +- LOG(INFO) << "max_inner_struct_limit=" << max_inner_struct_limit;
1222 ++ LOG(INFO) << "max_inner_struct_end_offset=" << max_inner_struct_end_offset;
1223 + }
1224 + }
1225 +-#endif
1226 ++
1227 ++#endif // NDEBUG
1228 +
1229 + TEST(ValuesTest, TestNothrow) {
1230 + static_assert(std::is_nothrow_move_constructible<Value>::value,
1231 +--
1232 +2.21.0
1233 +
1234
1235 diff --git a/www-client/chromium/files/chromium-74-7685422.patch b/www-client/chromium/files/chromium-74-7685422.patch
1236 new file mode 100644
1237 index 00000000000..19747245bd7
1238 --- /dev/null
1239 +++ b/www-client/chromium/files/chromium-74-7685422.patch
1240 @@ -0,0 +1,42 @@
1241 +From 7685422a90e1da829cb32d685a4b970d30738098 Mon Sep 17 00:00:00 2001
1242 +From: Jose Dapena Paz <jose.dapena@×××.com>
1243 +Date: Wed, 3 Apr 2019 18:35:04 +0000
1244 +Subject: [PATCH] base: Value::Type enum class size should be 8-bit.
1245 +MIME-Version: 1.0
1246 +Content-Type: text/plain; charset=UTF-8
1247 +Content-Transfer-Encoding: 8bit
1248 +
1249 +GCC is complaining because, when base::Type is used to declare the different
1250 +variants of Type in its union, they are forced to take 8-bit, that is smaller
1251 +than the enum class default size (same as int).
1252 +
1253 +So this change sets explicitely the enum class underlying type to be unsigned
1254 +char.
1255 +
1256 +BUG=chromium:819294
1257 +
1258 +Change-Id: I1765e2503e2c3d3675c73ecb0f7f5bc33456e6f0
1259 +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1550366
1260 +Commit-Queue: José Dapena Paz <jose.dapena@×××.com>
1261 +Reviewed-by: Jan Wilken Dörrie <jdoerrie@××××××××.org>
1262 +Cr-Commit-Position: refs/heads/master@{#647382}
1263 +---
1264 + base/values.h | 2 +-
1265 + 1 file changed, 1 insertion(+), 1 deletion(-)
1266 +
1267 +diff --git a/base/values.h b/base/values.h
1268 +index c455936d4961..14b76acec02f 100644
1269 +--- a/base/values.h
1270 ++++ b/base/values.h
1271 +@@ -86,7 +86,7 @@ class BASE_EXPORT Value {
1272 + // See technical note below explaining why this is used.
1273 + using DoubleStorage = struct { alignas(4) char v[sizeof(double)]; };
1274 +
1275 +- enum class Type {
1276 ++ enum class Type : unsigned char {
1277 + NONE = 0,
1278 + BOOLEAN,
1279 + INTEGER,
1280 +--
1281 +2.21.0
1282 +
1283
1284 diff --git a/www-client/chromium/files/chromium-74-c2c467f.patch b/www-client/chromium/files/chromium-74-c2c467f.patch
1285 new file mode 100644
1286 index 00000000000..e9e5d22e4a8
1287 --- /dev/null
1288 +++ b/www-client/chromium/files/chromium-74-c2c467f.patch
1289 @@ -0,0 +1,75 @@
1290 +From c2c467f69fc00d353879d7add5f2c04a6acabbb1 Mon Sep 17 00:00:00 2001
1291 +From: David 'Digit' Turner <digit@××××××.com>
1292 +Date: Wed, 20 Mar 2019 21:41:09 +0000
1293 +Subject: [PATCH] base: Value::FindDoubleKey() converts integers to doubles
1294 +
1295 +Ensure that FindDoubleKey() can return the value of an
1296 +INTEGER key as a double. This is consistent with the behaviour
1297 +of Value::GetDouble() which will auto-convert INTEGER values
1298 +to doubles.
1299 +
1300 +BUG=646113
1301 +R=dcheng@××××××××.org,jdoerrie@××××××××.org,sdefresne@××××××××.org,hidehiko@××××××××.org
1302 +
1303 +Change-Id: I2c08cb91b6cfd5db268a182ffffe16682d848008
1304 +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1529017
1305 +Reviewed-by: Sylvain Defresne <sdefresne@××××××××.org>
1306 +Reviewed-by: Daniel Cheng <dcheng@××××××××.org>
1307 +Commit-Queue: David Turner <digit@××××××××.org>
1308 +Cr-Commit-Position: refs/heads/master@{#642680}
1309 +---
1310 + base/values.cc | 10 ++++++++--
1311 + base/values.h | 2 ++
1312 + base/values_unittest.cc | 2 +-
1313 + 3 files changed, 11 insertions(+), 3 deletions(-)
1314 +
1315 +diff --git a/base/values.cc b/base/values.cc
1316 +index 035aa2350cde..69d66ff8ab00 100644
1317 +--- a/base/values.cc
1318 ++++ b/base/values.cc
1319 +@@ -339,8 +339,14 @@ base::Optional<int> Value::FindIntKey(StringPiece key) const {
1320 + }
1321 +
1322 + base::Optional<double> Value::FindDoubleKey(StringPiece key) const {
1323 +- const Value* result = FindKeyOfType(key, Type::DOUBLE);
1324 +- return result ? base::make_optional(result->double_value_) : base::nullopt;
1325 ++ const Value* result = FindKey(key);
1326 ++ if (result) {
1327 ++ if (result->is_int())
1328 ++ return base::make_optional(static_cast<double>(result->int_value_));
1329 ++ if (result->is_double())
1330 ++ return base::make_optional(result->double_value_);
1331 ++ }
1332 ++ return base::nullopt;
1333 + }
1334 +
1335 + const std::string* Value::FindStringKey(StringPiece key) const {
1336 +diff --git a/base/values.h b/base/values.h
1337 +index e31cadd83102..6f2cd3cc3d79 100644
1338 +--- a/base/values.h
1339 ++++ b/base/values.h
1340 +@@ -200,6 +200,8 @@ class BASE_EXPORT Value {
1341 + // function's name.
1342 + base::Optional<bool> FindBoolKey(StringPiece key) const;
1343 + base::Optional<int> FindIntKey(StringPiece key) const;
1344 ++ // Note FindDoubleKey() will auto-convert INTEGER keys to their double
1345 ++ // value, for consistency with GetDouble().
1346 + base::Optional<double> FindDoubleKey(StringPiece key) const;
1347 +
1348 + // |FindStringKey| returns |nullptr| if value is not found or not a string.
1349 +diff --git a/base/values_unittest.cc b/base/values_unittest.cc
1350 +index b23fd8332491..7c545c09d947 100644
1351 +--- a/base/values_unittest.cc
1352 ++++ b/base/values_unittest.cc
1353 +@@ -674,7 +674,7 @@ TEST(ValuesTest, FindDoubleKey) {
1354 + const Value dict(std::move(storage));
1355 + EXPECT_EQ(base::nullopt, dict.FindDoubleKey("null"));
1356 + EXPECT_EQ(base::nullopt, dict.FindDoubleKey("bool"));
1357 +- EXPECT_EQ(base::nullopt, dict.FindDoubleKey("int"));
1358 ++ EXPECT_NE(base::nullopt, dict.FindDoubleKey("int"));
1359 + EXPECT_NE(base::nullopt, dict.FindDoubleKey("double"));
1360 + EXPECT_EQ(base::nullopt, dict.FindDoubleKey("string"));
1361 + EXPECT_EQ(base::nullopt, dict.FindDoubleKey("blob"));
1362 +--
1363 +2.21.0
1364 +
1365
1366 diff --git a/www-client/chromium/files/chromium-74-e1b1f3a.patch b/www-client/chromium/files/chromium-74-e1b1f3a.patch
1367 new file mode 100644
1368 index 00000000000..344b0874b81
1369 --- /dev/null
1370 +++ b/www-client/chromium/files/chromium-74-e1b1f3a.patch
1371 @@ -0,0 +1,587 @@
1372 +From e1b1f3a5f273c8da533fad495b9de316e2c83c9b Mon Sep 17 00:00:00 2001
1373 +From: jdoerrie <jdoerrie@××××××××.org>
1374 +Date: Sat, 16 Mar 2019 04:08:01 +0000
1375 +Subject: [PATCH] [base] Add Dead Type to base::Value
1376 +
1377 +This change adds a temporary DEAD type to base::Value which should help
1378 +to track down use-after-free bugs. Furthermore, this change also removes
1379 +the now unneeded is_alive_ flag.
1380 +
1381 +Bug: 859477, 941404
1382 +Change-Id: I9b7a2f3cbb0b22d7e3ed35b2453537419f3f7e55
1383 +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1478897
1384 +Reviewed-by: Pavol Marko <pmarko@××××××××.org>
1385 +Reviewed-by: Tao Bai <michaelbai@××××××××.org>
1386 +Reviewed-by: Thomas Anderson <thomasanderson@××××××××.org>
1387 +Reviewed-by: Mike Pinkerton <pinkerton@××××××××.org>
1388 +Reviewed-by: Bill Budge <bbudge@××××××××.org>
1389 +Reviewed-by: Ken Rockot <rockot@××××××.com>
1390 +Reviewed-by: Steven Bennetts <stevenjb@××××××××.org>
1391 +Reviewed-by: Daniel Cheng <dcheng@××××××××.org>
1392 +Reviewed-by: David Turner <digit@××××××××.org>
1393 +Commit-Queue: Thomas Anderson <thomasanderson@××××××××.org>
1394 +Cr-Commit-Position: refs/heads/master@{#641404}
1395 +---
1396 + base/json/json_writer.cc | 5 ++
1397 + base/values.cc | 68 ++++++++++++-------
1398 + base/values.h | 23 ++-----
1399 + base/values_unittest.cc | 10 ++-
1400 + .../ui/cocoa/applescript/apple_event_util.mm | 10 +++
1401 + chromeos/network/onc/variable_expander.cc | 6 ++
1402 + .../core/browser/android/policy_converter.cc | 11 ++-
1403 + .../core/common/policy_loader_win_unittest.cc | 8 ++-
1404 + .../policy/core/common/policy_test_utils.cc | 5 ++
1405 + .../policy/core/common/registry_dict.cc | 4 ++
1406 + .../gin_java_script_to_java_types_coercion.cc | 8 ++-
1407 + ipc/ipc_message_utils.cc | 11 ++-
1408 + mojo/public/cpp/base/values_mojom_traits.h | 7 +-
1409 + .../ppb_x509_certificate_private_shared.cc | 2 +
1410 + 14 files changed, 127 insertions(+), 51 deletions(-)
1411 +
1412 +diff --git a/base/json/json_writer.cc b/base/json/json_writer.cc
1413 +index 376a459f9a46..cd020e7fa0c0 100644
1414 +--- a/base/json/json_writer.cc
1415 ++++ b/base/json/json_writer.cc
1416 +@@ -179,6 +179,11 @@ bool JSONWriter::BuildJSONString(const Value& node, size_t depth) {
1417 + // Successful only if we're allowed to omit it.
1418 + DLOG_IF(ERROR, !omit_binary_values_) << "Cannot serialize binary value.";
1419 + return omit_binary_values_;
1420 ++
1421 ++ // TODO(crbug.com/859477): Remove after root cause is found.
1422 ++ case Value::Type::DEAD:
1423 ++ CHECK(false);
1424 ++ return false;
1425 + }
1426 +
1427 + // TODO(crbug.com/859477): Revert to NOTREACHED() after root cause is found.
1428 +diff --git a/base/values.cc b/base/values.cc
1429 +index 0c002551b317..035aa2350cde 100644
1430 +--- a/base/values.cc
1431 ++++ b/base/values.cc
1432 +@@ -90,8 +90,6 @@ std::unique_ptr<Value> CopyWithoutEmptyChildren(const Value& node) {
1433 +
1434 + } // namespace
1435 +
1436 +-constexpr uint16_t Value::kMagicIsAlive;
1437 +-
1438 + // static
1439 + std::unique_ptr<Value> Value::CreateWithCopiedBuffer(const char* buffer,
1440 + size_t size) {
1441 +@@ -112,9 +110,9 @@ Value::Value(Value&& that) noexcept {
1442 + InternalMoveConstructFrom(std::move(that));
1443 + }
1444 +
1445 +-Value::Value() noexcept : type_(Type::NONE), is_alive_(kMagicIsAlive) {}
1446 ++Value::Value() noexcept : type_(Type::NONE) {}
1447 +
1448 +-Value::Value(Type type) : type_(type), is_alive_(kMagicIsAlive) {
1449 ++Value::Value(Type type) : type_(type) {
1450 + // Initialize with the default value.
1451 + switch (type_) {
1452 + case Type::NONE:
1453 +@@ -141,22 +139,26 @@ Value::Value(Type type) : type_(type), is_alive_(kMagicIsAlive) {
1454 + case Type::LIST:
1455 + new (&list_) ListStorage();
1456 + return;
1457 ++ // TODO(crbug.com/859477): Remove after root cause is found.
1458 ++ case Type::DEAD:
1459 ++ CHECK(false);
1460 ++ return;
1461 + }
1462 ++
1463 ++ // TODO(crbug.com/859477): Revert to NOTREACHED() after root cause is found.
1464 ++ CHECK(false);
1465 + }
1466 +
1467 + Value::Value(bool in_bool)
1468 + : bool_type_(Type::BOOLEAN),
1469 +- bool_is_alive_(kMagicIsAlive),
1470 + bool_value_(in_bool) {}
1471 +
1472 + Value::Value(int in_int)
1473 + : int_type_(Type::INTEGER),
1474 +- int_is_alive_(kMagicIsAlive),
1475 + int_value_(in_int) {}
1476 +
1477 + Value::Value(double in_double)
1478 + : double_type_(Type::DOUBLE),
1479 +- double_is_alive_(kMagicIsAlive),
1480 + double_value_(in_double) {
1481 + if (!std::isfinite(double_value_)) {
1482 + NOTREACHED() << "Non-finite (i.e. NaN or positive/negative infinity) "
1483 +@@ -171,7 +173,6 @@ Value::Value(StringPiece in_string) : Value(std::string(in_string)) {}
1484 +
1485 + Value::Value(std::string&& in_string) noexcept
1486 + : string_type_(Type::STRING),
1487 +- string_is_alive_(kMagicIsAlive),
1488 + string_value_(std::move(in_string)) {
1489 + DCHECK(IsStringUTF8(string_value_));
1490 + }
1491 +@@ -182,21 +183,18 @@ Value::Value(StringPiece16 in_string16) : Value(UTF16ToUTF8(in_string16)) {}
1492 +
1493 + Value::Value(const std::vector<char>& in_blob)
1494 + : binary_type_(Type::BINARY),
1495 +- binary_is_alive_(kMagicIsAlive),
1496 + binary_value_(in_blob.begin(), in_blob.end()) {}
1497 +
1498 + Value::Value(base::span<const uint8_t> in_blob)
1499 + : binary_type_(Type::BINARY),
1500 +- binary_is_alive_(kMagicIsAlive),
1501 + binary_value_(in_blob.begin(), in_blob.end()) {}
1502 +
1503 + Value::Value(BlobStorage&& in_blob) noexcept
1504 + : binary_type_(Type::BINARY),
1505 +- binary_is_alive_(kMagicIsAlive),
1506 + binary_value_(std::move(in_blob)) {}
1507 +
1508 + Value::Value(const DictStorage& in_dict)
1509 +- : dict_type_(Type::DICTIONARY), dict_is_alive_(kMagicIsAlive), dict_() {
1510 ++ : dict_type_(Type::DICTIONARY), dict_() {
1511 + dict_.reserve(in_dict.size());
1512 + for (const auto& it : in_dict) {
1513 + dict_.try_emplace(dict_.end(), it.first,
1514 +@@ -206,11 +204,9 @@ Value::Value(const DictStorage& in_dict)
1515 +
1516 + Value::Value(DictStorage&& in_dict) noexcept
1517 + : dict_type_(Type::DICTIONARY),
1518 +- dict_is_alive_(kMagicIsAlive),
1519 + dict_(std::move(in_dict)) {}
1520 +
1521 +-Value::Value(const ListStorage& in_list)
1522 +- : list_type_(Type::LIST), list_is_alive_(kMagicIsAlive), list_() {
1523 ++Value::Value(const ListStorage& in_list) : list_type_(Type::LIST), list_() {
1524 + list_.reserve(in_list.size());
1525 + for (const auto& val : in_list)
1526 + list_.emplace_back(val.Clone());
1527 +@@ -218,7 +214,6 @@ Value::Value(const ListStorage& in_list)
1528 +
1529 + Value::Value(ListStorage&& in_list) noexcept
1530 + : list_type_(Type::LIST),
1531 +- list_is_alive_(kMagicIsAlive),
1532 + list_(std::move(in_list)) {}
1533 +
1534 + Value& Value::operator=(Value&& that) noexcept {
1535 +@@ -246,15 +241,21 @@ Value Value::Clone() const {
1536 + return Value(dict_);
1537 + case Type::LIST:
1538 + return Value(list_);
1539 ++ // TODO(crbug.com/859477): Remove after root cause is found.
1540 ++ case Type::DEAD:
1541 ++ CHECK(false);
1542 ++ return Value();
1543 + }
1544 +
1545 +- NOTREACHED();
1546 ++ // TODO(crbug.com/859477): Revert to NOTREACHED() after root cause is found.
1547 ++ CHECK(false);
1548 + return Value();
1549 + }
1550 +
1551 + Value::~Value() {
1552 + InternalCleanup();
1553 +- is_alive_ = 0;
1554 ++ // TODO(crbug.com/859477): Remove after root cause is found.
1555 ++ type_ = Type::DEAD;
1556 + }
1557 +
1558 + // static
1559 +@@ -654,9 +655,14 @@ bool operator==(const Value& lhs, const Value& rhs) {
1560 + });
1561 + case Value::Type::LIST:
1562 + return lhs.list_ == rhs.list_;
1563 ++ // TODO(crbug.com/859477): Remove after root cause is found.
1564 ++ case Value::Type::DEAD:
1565 ++ CHECK(false);
1566 ++ return false;
1567 + }
1568 +
1569 +- NOTREACHED();
1570 ++ // TODO(crbug.com/859477): Revert to NOTREACHED() after root cause is found.
1571 ++ CHECK(false);
1572 + return false;
1573 + }
1574 +
1575 +@@ -693,9 +699,14 @@ bool operator<(const Value& lhs, const Value& rhs) {
1576 + });
1577 + case Value::Type::LIST:
1578 + return lhs.list_ < rhs.list_;
1579 ++ // TODO(crbug.com/859477): Remove after root cause is found.
1580 ++ case Value::Type::DEAD:
1581 ++ CHECK(false);
1582 ++ return false;
1583 + }
1584 +
1585 +- NOTREACHED();
1586 ++ // TODO(crbug.com/859477): Revert to NOTREACHED() after root cause is found.
1587 ++ CHECK(false);
1588 + return false;
1589 + }
1590 +
1591 +@@ -733,7 +744,6 @@ size_t Value::EstimateMemoryUsage() const {
1592 +
1593 + void Value::InternalMoveConstructFrom(Value&& that) {
1594 + type_ = that.type_;
1595 +- is_alive_ = that.is_alive_;
1596 +
1597 + switch (type_) {
1598 + case Type::NONE:
1599 +@@ -759,12 +769,17 @@ void Value::InternalMoveConstructFrom(Value&& that) {
1600 + case Type::LIST:
1601 + new (&list_) ListStorage(std::move(that.list_));
1602 + return;
1603 ++ // TODO(crbug.com/859477): Remove after root cause is found.
1604 ++ case Type::DEAD:
1605 ++ CHECK(false);
1606 ++ return;
1607 + }
1608 ++
1609 ++ // TODO(crbug.com/859477): Revert to NOTREACHED() after root cause is found.
1610 ++ CHECK(false);
1611 + }
1612 +
1613 + void Value::InternalCleanup() {
1614 +- CHECK_EQ(is_alive_, kMagicIsAlive);
1615 +-
1616 + switch (type_) {
1617 + case Type::NONE:
1618 + case Type::BOOLEAN:
1619 +@@ -785,7 +800,14 @@ void Value::InternalCleanup() {
1620 + case Type::LIST:
1621 + list_.~ListStorage();
1622 + return;
1623 ++ // TODO(crbug.com/859477): Remove after root cause is found.
1624 ++ case Type::DEAD:
1625 ++ CHECK(false);
1626 ++ return;
1627 + }
1628 ++
1629 ++ // TODO(crbug.com/859477): Revert to NOTREACHED() after root cause is found.
1630 ++ CHECK(false);
1631 + }
1632 +
1633 + ///////////////////// DictionaryValue ////////////////////
1634 +diff --git a/base/values.h b/base/values.h
1635 +index 429ef1dfdebd..e31cadd83102 100644
1636 +--- a/base/values.h
1637 ++++ b/base/values.h
1638 +@@ -92,7 +92,9 @@ class BASE_EXPORT Value {
1639 + STRING,
1640 + BINARY,
1641 + DICTIONARY,
1642 +- LIST
1643 ++ LIST,
1644 ++ // TODO(crbug.com/859477): Remove once root cause is found.
1645 ++ DEAD
1646 + // Note: Do not add more types. See the file-level comment above for why.
1647 + };
1648 +
1649 +@@ -375,10 +377,6 @@ class BASE_EXPORT Value {
1650 + size_t EstimateMemoryUsage() const;
1651 +
1652 + protected:
1653 +- // Magic IsAlive signature to debug double frees.
1654 +- // TODO(crbug.com/859477): Remove once root cause is found.
1655 +- static constexpr uint16_t kMagicIsAlive = 0x2f19;
1656 +-
1657 + // Technical note:
1658 + // The naive way to implement a tagged union leads to wasted bytes
1659 + // in the object on CPUs like ARM ones, which impose an 8-byte alignment
1660 +@@ -408,8 +406,8 @@ class BASE_EXPORT Value {
1661 + // that |double_value_| below is always located at an offset that is a
1662 + // multiple of 8, relative to the start of the overall data structure.
1663 + //
1664 +- // Each struct must declare its own |type_| and |is_alive_| field, which
1665 +- // must have a different name, to appease the C++ compiler.
1666 ++ // Each struct must declare its own |type_| field, which must have a different
1667 ++ // name, to appease the C++ compiler.
1668 + //
1669 + // Using this technique sizeof(base::Value) == 16 on 32-bit ARM instead
1670 + // of 24, without losing any information. Results are unchanged for x86,
1671 +@@ -419,24 +417,17 @@ class BASE_EXPORT Value {
1672 + // TODO(crbug.com/646113): Make these private once DictionaryValue and
1673 + // ListValue are properly inlined.
1674 + Type type_ : 8;
1675 +-
1676 +- // IsAlive member to debug double frees.
1677 +- // TODO(crbug.com/859477): Remove once root cause is found.
1678 +- uint16_t is_alive_ = kMagicIsAlive;
1679 + };
1680 + struct {
1681 + Type bool_type_ : 8;
1682 +- uint16_t bool_is_alive_;
1683 + bool bool_value_;
1684 + };
1685 + struct {
1686 + Type int_type_ : 8;
1687 +- uint16_t int_is_alive_;
1688 + int int_value_;
1689 + };
1690 + struct {
1691 + Type double_type_ : 8;
1692 +- uint16_t double_is_alive_;
1693 + // Subtle: On architectures that require it, the compiler will ensure
1694 + // that |double_value_|'s offset is a multiple of 8 (e.g. 32-bit ARM).
1695 + // See technical note above to understand why it is important.
1696 +@@ -444,22 +435,18 @@ class BASE_EXPORT Value {
1697 + };
1698 + struct {
1699 + Type string_type_ : 8;
1700 +- uint16_t string_is_alive_;
1701 + std::string string_value_;
1702 + };
1703 + struct {
1704 + Type binary_type_ : 8;
1705 +- uint16_t binary_is_alive_;
1706 + BlobStorage binary_value_;
1707 + };
1708 + struct {
1709 + Type dict_type_ : 8;
1710 +- uint16_t dict_is_alive_;
1711 + DictStorage dict_;
1712 + };
1713 + struct {
1714 + Type list_type_ : 8;
1715 +- uint16_t list_is_alive_;
1716 + ListStorage list_;
1717 + };
1718 + };
1719 +diff --git a/base/values_unittest.cc b/base/values_unittest.cc
1720 +index 0a641bcc7ef4..b23fd8332491 100644
1721 +--- a/base/values_unittest.cc
1722 ++++ b/base/values_unittest.cc
1723 +@@ -20,17 +20,20 @@
1724 + #include "base/strings/string16.h"
1725 + #include "base/strings/string_piece.h"
1726 + #include "base/strings/utf_string_conversions.h"
1727 ++#include "build/build_config.h"
1728 + #include "testing/gmock/include/gmock/gmock.h"
1729 + #include "testing/gtest/include/gtest/gtest.h"
1730 +
1731 + namespace base {
1732 +
1733 ++// Test is currently incorrect on Windows x86.
1734 ++#if !defined(OS_WIN) || !defined(ARCH_CPU_X86)
1735 + TEST(ValuesTest, SizeOfValue) {
1736 + // Ensure that base::Value is as small as possible, i.e. that there is
1737 + // no wasted space after the inner value due to alignment constraints.
1738 +- // Distinguish between the 'header' that includes |type_| and |is_alive_|
1739 +- // and the inner value that follows it, which can be a bool, int, double,
1740 +- // string, blob, list or dict.
1741 ++ // Distinguish between the 'header' that includes |type_| and and the inner
1742 ++ // value that follows it, which can be a bool, int, double, string, blob, list
1743 ++ // or dict.
1744 + #define INNER_TYPES_LIST(X) \
1745 + X(bool, bool_value_) \
1746 + X(int, int_value_) \
1747 +@@ -61,6 +64,7 @@ TEST(ValuesTest, SizeOfValue) {
1748 + LOG(INFO) << "max_inner_struct_limit=" << max_inner_struct_limit;
1749 + }
1750 + }
1751 ++#endif
1752 +
1753 + TEST(ValuesTest, TestNothrow) {
1754 + static_assert(std::is_nothrow_move_constructible<Value>::value,
1755 +diff --git a/chrome/browser/ui/cocoa/applescript/apple_event_util.mm b/chrome/browser/ui/cocoa/applescript/apple_event_util.mm
1756 +index 16d685607ced..25a59338ee73 100644
1757 +--- a/chrome/browser/ui/cocoa/applescript/apple_event_util.mm
1758 ++++ b/chrome/browser/ui/cocoa/applescript/apple_event_util.mm
1759 +@@ -96,6 +96,16 @@ NSAppleEventDescriptor* ValueToAppleEventDescriptor(const base::Value* value) {
1760 + }
1761 + break;
1762 + }
1763 ++
1764 ++ // TODO(crbug.com/859477): Remove after root cause is found.
1765 ++ case base::Value::Type::DEAD:
1766 ++ CHECK(false);
1767 ++ break;
1768 ++
1769 ++ // TODO(crbug.com/859477): Remove after root cause is found.
1770 ++ default:
1771 ++ CHECK(false);
1772 ++ break;
1773 + }
1774 +
1775 + return descriptor;
1776 +diff --git a/chromeos/network/onc/variable_expander.cc b/chromeos/network/onc/variable_expander.cc
1777 +index fd72752c2aa6..cd5bbb238eb3 100644
1778 +--- a/chromeos/network/onc/variable_expander.cc
1779 ++++ b/chromeos/network/onc/variable_expander.cc
1780 +@@ -145,6 +145,12 @@ bool VariableExpander::ExpandValue(base::Value* value) const {
1781 + // Nothing to do here.
1782 + break;
1783 + }
1784 ++
1785 ++ // TODO(crbug.com/859477): Remove after root cause is found.
1786 ++ case base::Value::Type::DEAD: {
1787 ++ CHECK(false);
1788 ++ break;
1789 ++ }
1790 + }
1791 + return no_error;
1792 + }
1793 +diff --git a/components/policy/core/browser/android/policy_converter.cc b/components/policy/core/browser/android/policy_converter.cc
1794 +index b711a64febc9..9d41ad0d1507 100644
1795 +--- a/components/policy/core/browser/android/policy_converter.cc
1796 ++++ b/components/policy/core/browser/android/policy_converter.cc
1797 +@@ -175,10 +175,17 @@ std::unique_ptr<base::Value> PolicyConverter::ConvertValueToSchema(
1798 + }
1799 + return value;
1800 + }
1801 ++
1802 ++ // TODO(crbug.com/859477): Remove after root cause is found.
1803 ++ case base::Value::Type::DEAD: {
1804 ++ CHECK(false);
1805 ++ return nullptr;
1806 ++ }
1807 + }
1808 +
1809 +- NOTREACHED();
1810 +- return std::unique_ptr<base::Value>();
1811 ++ // TODO(crbug.com/859477): Revert to NOTREACHED() after root cause is found.
1812 ++ CHECK(false);
1813 ++ return nullptr;
1814 + }
1815 +
1816 + void PolicyConverter::SetPolicyValue(const std::string& key,
1817 +diff --git a/components/policy/core/common/policy_loader_win_unittest.cc b/components/policy/core/common/policy_loader_win_unittest.cc
1818 +index 311e7fb122fc..0377307c5e28 100644
1819 +--- a/components/policy/core/common/policy_loader_win_unittest.cc
1820 ++++ b/components/policy/core/common/policy_loader_win_unittest.cc
1821 +@@ -133,8 +133,14 @@ bool InstallValue(const base::Value& value,
1822 +
1823 + case base::Value::Type::BINARY:
1824 + return false;
1825 ++
1826 ++ // TODO(crbug.com/859477): Remove after root cause is found.
1827 ++ case base::Value::Type::DEAD:
1828 ++ CHECK(false);
1829 ++ return false;
1830 + }
1831 +- NOTREACHED();
1832 ++ // TODO(crbug.com/859477): Revert to NOTREACHED() after root cause is found.
1833 ++ CHECK(false);
1834 + return false;
1835 + }
1836 +
1837 +diff --git a/components/policy/core/common/policy_test_utils.cc b/components/policy/core/common/policy_test_utils.cc
1838 +index 5af98b47275c..919f004153ec 100644
1839 +--- a/components/policy/core/common/policy_test_utils.cc
1840 ++++ b/components/policy/core/common/policy_test_utils.cc
1841 +@@ -137,6 +137,11 @@ CFPropertyListRef ValueToProperty(const base::Value& value) {
1842 + // because there's no equivalent JSON type, and policy values can only
1843 + // take valid JSON values.
1844 + break;
1845 ++
1846 ++ // TODO(crbug.com/859477): Remove after root cause is found.
1847 ++ case base::Value::Type::DEAD:
1848 ++ CHECK(false);
1849 ++ break;
1850 + }
1851 +
1852 + return NULL;
1853 +diff --git a/components/policy/core/common/registry_dict.cc b/components/policy/core/common/registry_dict.cc
1854 +index f3ed372bdcb3..696ba7e04abe 100644
1855 +--- a/components/policy/core/common/registry_dict.cc
1856 ++++ b/components/policy/core/common/registry_dict.cc
1857 +@@ -135,6 +135,10 @@ std::unique_ptr<base::Value> ConvertRegistryValue(const base::Value& value,
1858 + case base::Value::Type::BINARY:
1859 + // No conversion possible.
1860 + break;
1861 ++ // TODO(crbug.com/859477): Remove after root cause is found.
1862 ++ case base::Value::Type::DEAD:
1863 ++ CHECK(false);
1864 ++ return nullptr;
1865 + }
1866 +
1867 + LOG(WARNING) << "Failed to convert " << value.type() << " to "
1868 +diff --git a/content/browser/android/java/gin_java_script_to_java_types_coercion.cc b/content/browser/android/java/gin_java_script_to_java_types_coercion.cc
1869 +index dabd66ba8c72..84fd5489a414 100644
1870 +--- a/content/browser/android/java/gin_java_script_to_java_types_coercion.cc
1871 ++++ b/content/browser/android/java/gin_java_script_to_java_types_coercion.cc
1872 +@@ -722,8 +722,14 @@ jvalue CoerceJavaScriptValueToJavaValue(JNIEnv* env,
1873 + case base::Value::Type::BINARY:
1874 + return CoerceGinJavaBridgeValueToJavaValue(
1875 + env, value, target_type, coerce_to_string, object_refs, error);
1876 ++ // TODO(crbug.com/859477): Remove after root cause is found.
1877 ++ case base::Value::Type::DEAD:
1878 ++ CHECK(false);
1879 ++ return jvalue();
1880 + }
1881 +- NOTREACHED();
1882 ++
1883 ++ // TODO(crbug.com/859477): Revert to NOTREACHED() after root cause is found.
1884 ++ CHECK(false);
1885 + return jvalue();
1886 + }
1887 +
1888 +diff --git a/ipc/ipc_message_utils.cc b/ipc/ipc_message_utils.cc
1889 +index ec04c77c6c18..df6ec39bd663 100644
1890 +--- a/ipc/ipc_message_utils.cc
1891 ++++ b/ipc/ipc_message_utils.cc
1892 +@@ -92,7 +92,7 @@ void WriteValue(base::Pickle* m, const base::Value* value, int recursion) {
1893 +
1894 + switch (value->type()) {
1895 + case base::Value::Type::NONE:
1896 +- break;
1897 ++ break;
1898 + case base::Value::Type::BOOLEAN: {
1899 + bool val;
1900 + result = value->GetAsBoolean(&val);
1901 +@@ -147,6 +147,11 @@ void WriteValue(base::Pickle* m, const base::Value* value, int recursion) {
1902 + }
1903 + break;
1904 + }
1905 ++
1906 ++ // TODO(crbug.com/859477): Remove after root cause is found.
1907 ++ default:
1908 ++ CHECK(false);
1909 ++ break;
1910 + }
1911 + }
1912 +
1913 +@@ -260,7 +265,9 @@ bool ReadValue(const base::Pickle* m,
1914 + break;
1915 + }
1916 + default:
1917 +- return false;
1918 ++ // TODO(crbug.com/859477): Remove after root cause is found.
1919 ++ CHECK(false);
1920 ++ return false;
1921 + }
1922 +
1923 + return true;
1924 +diff --git a/mojo/public/cpp/base/values_mojom_traits.h b/mojo/public/cpp/base/values_mojom_traits.h
1925 +index cdb9bbbd94df..66752b7c90d8 100644
1926 +--- a/mojo/public/cpp/base/values_mojom_traits.h
1927 ++++ b/mojo/public/cpp/base/values_mojom_traits.h
1928 +@@ -86,8 +86,13 @@ struct COMPONENT_EXPORT(MOJO_BASE_SHARED_TRAITS)
1929 + return mojo_base::mojom::ValueDataView::Tag::DICTIONARY_VALUE;
1930 + case base::Value::Type::LIST:
1931 + return mojo_base::mojom::ValueDataView::Tag::LIST_VALUE;
1932 ++ // TODO(crbug.com/859477): Remove after root cause is found.
1933 ++ case base::Value::Type::DEAD:
1934 ++ CHECK(false);
1935 ++ return mojo_base::mojom::ValueDataView::Tag::NULL_VALUE;
1936 + }
1937 +- NOTREACHED();
1938 ++ // TODO(crbug.com/859477): Revert to NOTREACHED() after root cause is found.
1939 ++ CHECK(false);
1940 + return mojo_base::mojom::ValueDataView::Tag::NULL_VALUE;
1941 + }
1942 +
1943 +diff --git a/ppapi/shared_impl/private/ppb_x509_certificate_private_shared.cc b/ppapi/shared_impl/private/ppb_x509_certificate_private_shared.cc
1944 +index 6ffff36337e0..7f392d50f718 100644
1945 +--- a/ppapi/shared_impl/private/ppb_x509_certificate_private_shared.cc
1946 ++++ b/ppapi/shared_impl/private/ppb_x509_certificate_private_shared.cc
1947 +@@ -73,6 +73,8 @@ PP_Var PPB_X509Certificate_Fields::GetFieldAsPPVar(
1948 + }
1949 + case base::Value::Type::DICTIONARY:
1950 + case base::Value::Type::LIST:
1951 ++ // TODO(crbug.com/859477): Remove after root cause is found.
1952 ++ case base::Value::Type::DEAD:
1953 + // Not handled.
1954 + break;
1955 + }
1956 +--
1957 +2.21.0
1958 +
1959
1960 diff --git a/www-client/chromium/files/chromium-compiler-r8.patch b/www-client/chromium/files/chromium-compiler-r8.patch
1961 new file mode 100644
1962 index 00000000000..5d8bd0efecd
1963 --- /dev/null
1964 +++ b/www-client/chromium/files/chromium-compiler-r8.patch
1965 @@ -0,0 +1,169 @@
1966 +From aff4a3a1c35dc37141a61d2c6b7e703a55f9b371 Mon Sep 17 00:00:00 2001
1967 +From: Mike Gilbert <floppym@g.o>
1968 +Date: Sat, 23 Mar 2019 12:12:37 -0400
1969 +Subject: [PATCH] Disable various compiler configs
1970 +
1971 +---
1972 + build/config/compiler/BUILD.gn | 55 ++++++++++++----------------------
1973 + 1 file changed, 19 insertions(+), 36 deletions(-)
1974 +
1975 +diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
1976 +index ca6ff2b13809..b614709cd1db 100644
1977 +--- a/build/config/compiler/BUILD.gn
1978 ++++ b/build/config/compiler/BUILD.gn
1979 +@@ -240,8 +240,6 @@ config("compiler") {
1980 +
1981 + configs += [
1982 + # See the definitions below.
1983 +- ":clang_revision",
1984 +- ":compiler_cpu_abi",
1985 + ":compiler_codegen",
1986 + ":compiler_deterministic",
1987 + ]
1988 +@@ -489,17 +487,6 @@ config("compiler") {
1989 + }
1990 + }
1991 +
1992 +- if (is_clang && !is_nacl && !use_xcode_clang) {
1993 +- cflags += [
1994 +- # TODO(hans): Remove this once Clang generates better optimized debug info
1995 +- # by default. https://crbug.com/765793
1996 +- "-Xclang",
1997 +- "-mllvm",
1998 +- "-Xclang",
1999 +- "-instcombine-lower-dbg-declare=0",
2000 +- ]
2001 +- }
2002 +-
2003 + # Print absolute paths in diagnostics. There is no precedent for doing this
2004 + # on Linux/Mac (GCC doesn't support it), but MSVC does this with /FC and
2005 + # Windows developers rely on it (crbug.com/636109) so only do this on Windows.
2006 +@@ -1540,7 +1527,7 @@ config("chromium_code") {
2007 + defines = [ "_HAS_NODISCARD" ]
2008 + }
2009 + } else {
2010 +- cflags = [ "-Wall" ]
2011 ++ cflags = []
2012 + if (treat_warnings_as_errors) {
2013 + cflags += [ "-Werror" ]
2014 +
2015 +@@ -1549,10 +1536,6 @@ config("chromium_code") {
2016 + # well.
2017 + ldflags = [ "-Werror" ]
2018 + }
2019 +- if (is_clang) {
2020 +- # Enable extra warnings for chromium_code when we control the compiler.
2021 +- cflags += [ "-Wextra" ]
2022 +- }
2023 +
2024 + # In Chromium code, we define __STDC_foo_MACROS in order to get the
2025 + # C99 macros on Mac and Linux.
2026 +@@ -1561,15 +1544,6 @@ config("chromium_code") {
2027 + "__STDC_FORMAT_MACROS",
2028 + ]
2029 +
2030 +- if (!is_debug && !using_sanitizer && current_cpu != "s390x" &&
2031 +- current_cpu != "s390" && current_cpu != "ppc64" &&
2032 +- current_cpu != "mips" && current_cpu != "mips64") {
2033 +- # Non-chromium code is not guaranteed to compile cleanly with
2034 +- # _FORTIFY_SOURCE. Also, fortified build may fail when optimizations are
2035 +- # disabled, so only do that for Release build.
2036 +- defines += [ "_FORTIFY_SOURCE=2" ]
2037 +- }
2038 +-
2039 + if (is_mac) {
2040 + cflags_objc = [ "-Wobjc-missing-property-synthesis" ]
2041 + cflags_objcc = [ "-Wobjc-missing-property-synthesis" ]
2042 +@@ -1949,7 +1923,8 @@ config("default_stack_frames") {
2043 + }
2044 +
2045 + # Default "optimization on" config.
2046 +-config("optimize") {
2047 ++config("optimize") { }
2048 ++config("xoptimize") {
2049 + if (is_win) {
2050 + # TODO(thakis): Remove is_clang here, https://crbug.com/598772
2051 + if (is_official_build && full_wpo_on_official && !is_clang) {
2052 +@@ -1983,7 +1958,8 @@ config("optimize") {
2053 + }
2054 +
2055 + # Same config as 'optimize' but without the WPO flag.
2056 +-config("optimize_no_wpo") {
2057 ++config("optimize_no_wpo") { }
2058 ++config("xoptimize_no_wpo") {
2059 + if (is_win) {
2060 + # Favor size over speed, /O1 must be before the common flags. The GYP
2061 + # build also specifies /Os and /GF but these are implied by /O1.
2062 +@@ -2006,7 +1982,8 @@ config("optimize_no_wpo") {
2063 + }
2064 +
2065 + # Turn off optimizations.
2066 +-config("no_optimize") {
2067 ++config("no_optimize") { }
2068 ++config("xno_optimize") {
2069 + if (is_win) {
2070 + cflags = [
2071 + "/Od", # Disable optimization.
2072 +@@ -2034,7 +2011,8 @@ config("no_optimize") {
2073 + # Turns up the optimization level. On Windows, this implies whole program
2074 + # optimization and link-time code generation which is very expensive and should
2075 + # be used sparingly.
2076 +-config("optimize_max") {
2077 ++config("optimize_max") { }
2078 ++config("xoptimize_max") {
2079 + if (is_nacl && is_nacl_irt) {
2080 + # The NaCl IRT is a special case and always wants its own config.
2081 + # Various components do:
2082 +@@ -2081,7 +2059,8 @@ config("optimize_max") {
2083 + #
2084 + # TODO(crbug.com/621335) - rework how all of these configs are related
2085 + # so that we don't need this disclaimer.
2086 +-config("optimize_speed") {
2087 ++config("optimize_speed") { }
2088 ++config("xoptimize_speed") {
2089 + if (is_nacl && is_nacl_irt) {
2090 + # The NaCl IRT is a special case and always wants its own config.
2091 + # Various components do:
2092 +@@ -2119,7 +2098,8 @@ config("optimize_speed") {
2093 + }
2094 + }
2095 +
2096 +-config("optimize_fuzzing") {
2097 ++config("optimize_fuzzing") { }
2098 ++config("xoptimize_fuzzing") {
2099 + cflags = [ "-O1" ] + common_optimize_on_cflags
2100 + ldflags = common_optimize_on_ldflags
2101 + visibility = [ ":default_optimization" ]
2102 +@@ -2221,7 +2201,8 @@ config("win_pdbaltpath") {
2103 + }
2104 +
2105 + # Full symbols.
2106 +-config("symbols") {
2107 ++config("symbols") { }
2108 ++config("xsymbols") {
2109 + if (is_win) {
2110 + if (use_goma || is_clang) {
2111 + # Note that with VC++ this requires is_win_fastlink, enforced elsewhere.
2112 +@@ -2328,7 +2309,8 @@ config("symbols") {
2113 + # Minimal symbols.
2114 + # This config guarantees to hold symbol for stack trace which are shown to user
2115 + # when crash happens in unittests running on buildbot.
2116 +-config("minimal_symbols") {
2117 ++config("minimal_symbols") { }
2118 ++config("xminimal_symbols") {
2119 + if (is_win) {
2120 + # Linker symbols for backtraces only.
2121 + cflags = []
2122 +@@ -2380,7 +2362,8 @@ config("minimal_symbols") {
2123 + }
2124 +
2125 + # No symbols.
2126 +-config("no_symbols") {
2127 ++config("no_symbols") { }
2128 ++config("xno_symbols") {
2129 + if (!is_win) {
2130 + cflags = [ "-g0" ]
2131 + asmflags = cflags
2132 +--
2133 +2.21.0
2134 +
2135
2136 diff --git a/www-client/chromium/files/quiche-00f47df.patch b/www-client/chromium/files/quiche-00f47df.patch
2137 new file mode 100644
2138 index 00000000000..720edf934d3
2139 --- /dev/null
2140 +++ b/www-client/chromium/files/quiche-00f47df.patch
2141 @@ -0,0 +1,38 @@
2142 +From 00f47df999c9b19e80fdc01db0ae9ca1b6a12b3a Mon Sep 17 00:00:00 2001
2143 +From: vasilvv <vasilvv@××××××.com>
2144 +Date: Wed, 3 Apr 2019 13:58:53 -0700
2145 +Subject: [PATCH] GCC: do not delete move constructor of QuicStreamSendBuffer
2146 +MIME-Version: 1.0
2147 +Content-Type: text/plain; charset=UTF-8
2148 +Content-Transfer-Encoding: 8bit
2149 +
2150 +QuicStreamSendBuffer constructor is implicitely required in the
2151 +initialization of the vector of substreams in QuicCryptoStream.
2152 +Though clang apparently ignores that, GCC fails to build.
2153 +
2154 +BUG=chromium:819294
2155 +
2156 +Originally submitted by José Dapena Paz <jose.dapena@×××.com> at https://quiche-review.googlesource.com/c/quiche/+/2420
2157 +
2158 +PiperOrigin-RevId: 241800134
2159 +Change-Id: I4e3c97d6e5895d85340e8c1b740e6196d9104066
2160 +---
2161 + quic/core/quic_stream_send_buffer.h | 2 +-
2162 + 1 file changed, 1 insertion(+), 1 deletion(-)
2163 +
2164 +diff --git a/quic/core/quic_stream_send_buffer.h b/quic/core/quic_stream_send_buffer.h
2165 +index e34514b..74e9d0d 100644
2166 +--- a/net/third_party/quic/core/quic_stream_send_buffer.h
2167 ++++ b/net/third_party/quic/core/quic_stream_send_buffer.h
2168 +@@ -62,7 +62,7 @@ class QUIC_EXPORT_PRIVATE QuicStreamSendBuffer {
2169 + public:
2170 + explicit QuicStreamSendBuffer(QuicBufferAllocator* allocator);
2171 + QuicStreamSendBuffer(const QuicStreamSendBuffer& other) = delete;
2172 +- QuicStreamSendBuffer(QuicStreamSendBuffer&& other) = delete;
2173 ++ QuicStreamSendBuffer(QuicStreamSendBuffer&& other) = default;
2174 + ~QuicStreamSendBuffer();
2175 +
2176 + // Save |data_length| of data starts at |iov_offset| in |iov| to send buffer.
2177 +--
2178 +2.21.0
2179 +