diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2019-05-06 06:00:51 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2019-08-07 14:40:55 +0000 |
commit | 5f276606f194b9b107043dda8d8479a9842f13cb (patch) | |
tree | 74189c769c729326ddd8578aee0890aa377422da /community | |
parent | ec982866ada0790335f5550608772b72f71e69a8 (diff) | |
download | aports-5f276606f194b9b107043dda8d8479a9842f13cb.tar.bz2 aports-5f276606f194b9b107043dda8d8479a9842f13cb.tar.xz |
community/chromium: upgrade to 76
disabel armhf and armv7 til we sorted out the clang++ problem
Diffstat (limited to 'community')
20 files changed, 114 insertions, 1709 deletions
diff --git a/community/chromium/APKBUILD b/community/chromium/APKBUILD index 5af6d65be6..63ec904d3e 100644 --- a/community/chromium/APKBUILD +++ b/community/chromium/APKBUILD @@ -1,11 +1,11 @@ # Contributor: Carlo Landmeter <clandmeter@gmail.com> # Maintainer: Carlo Landmeter <clandmeter@gmail.com> pkgname=chromium -pkgver=73.0.3683.103 +pkgver=76.0.3809.87 pkgrel=0 pkgdesc="chromium web browser" url="http://www.chromium.org/" -arch="x86_64 armv7 aarch64 armhf" +arch="x86_64 aarch64" # disable armhf and armv7 til we sorted out clang++ license="BSD" depends="xdg-utils" depends_dev="" @@ -17,6 +17,7 @@ makedepends="$depends_dev bsd-compat-headers bzip2-dev cairo-dev + clang-dev cups-dev dbus-glib-dev elfutils-dev @@ -61,6 +62,7 @@ makedepends="$depends_dev ninja nodejs nss-dev + openjdk8 opus-dev paxmark pciutils-dev @@ -100,17 +102,11 @@ source="https://commondatastorage.googleapis.com/chromium-browser-official/$pkgn chromium-use-alpine-target.patch chromium-gcc-r1.patch - chromium-73-gcc-1.patch - chromium-73-gcc-2.patch - chromium-73-gcc-3.patch - chromium-73-gcc-4.patch - chromium-73-gcc-5.patch - chromium-73-gcc-6.patch media-base.patch musl-crashpad.patch - musl-v8-fix-deadlock.patch musl-v8-monotonic-pthread-cont_timedwait.patch - gcc8-alignof.patch + nasm.patch + gcc-fno-delete-null-pointer-checks.patch gcc-arm.patch musl-arm-limits.patch @@ -147,7 +143,7 @@ prepare() { touch chrome/test/data/webui/i18n_process_css_test.html # Use the file at run time instead of effectively compiling it in sed 's|//third_party/usb_ids/usb.ids|/usr/share/hwdata/usb.ids|g' \ - -i device/usb/BUILD.gn + -i services/device/public/cpp/usb/BUILD.gn mkdir -p third_party/node/linux/node-linux-x64/bin ln -s /usr/bin/node third_party/node/linux/node-linux-x64/bin/ @@ -157,7 +153,6 @@ prepare() { ffmpeg flac fontconfig - freetype harfbuzz-ng libdrm libevent @@ -209,24 +204,26 @@ build() { eval "$(base64 -d < $srcdir/google-api.keys)" msg "Bootstrapping GN" - local _c=$(_gn_flags is_clang=false \ + local _c=$(_gn_flags is_clang=true \ use_sysroot=false \ treat_warnings_as_errors=false \ fatal_linker_warnings=false \ binutils_path=\"/usr/bin\" \ + use_custom_libcxx=false \ use_gold=false \ use_allocator=\"none\" \ use_allocator_shim=false \ use_vaapi=true \ ) - AR="ar" CC="${CC:-gcc}" CXX="${CXX:-g++}" LD="${CXX:-g++}" \ +# AR="ar" CC="${CC:-gcc}" CXX="${CXX:-g++}" LD="${CXX:-g++}" \ + CC="${CC:-clang}" CXX="${CXX:-clang++}" LD="${CXX:-clang++}" \ python tools/gn/bootstrap/bootstrap.py -s -v --gn-gen-args "$_c" msg "Configuring build" _c=$(_gn_flags \ clang_use_chrome_plugins=false \ - closure_compile=false \ + closure_compile=true \ custom_toolchain=\"//build/toolchain/linux/unbundle:default\" \ enable_hangout_services_extension=true \ enable_nacl=false \ @@ -241,13 +238,13 @@ build() { google_default_client_secret=\"$_google_default_client_secret\" \ host_toolchain=\"//build/toolchain/linux/unbundle:default\" \ icu_use_data_file=true \ - is_clang=false \ + is_clang=true \ is_component_build=false \ is_debug=$_is_debug \ is_desktop_linux=true \ linux_use_bundled_binutils=false \ proprietary_codecs=true \ - remove_webcore_debug_symbols=true \ + blink_symbol_level=0 \ symbol_level=0 \ treat_warnings_as_errors=false \ use_allocator=\"none\" \ @@ -257,12 +254,13 @@ build() { use_gnome_keyring=false \ use_gold=false \ use_lld=false \ + use_jumbo_build=true \ use_pulseaudio=false \ use_sysroot=false \ use_system_harfbuzz=true \ ) - AR="ar" CC="${CC:-gcc}" CXX="${CXX:-g++}" LD="${CXX:-g++}" NM=/usr/bin/nm \ + AR="ar" CC="clang" CXX="clang++" LD="clang++" NM=/usr/bin/nm \ out/Release/gn gen out/$_buildtype --args="$_c $_ca" msg "Ninja turtles GO!" @@ -339,7 +337,7 @@ chromedriver() { mv "$pkgdir"/usr/bin/chromedriver "$subpkgdir"/usr/bin } -sha512sums="917ba026abcab9e016cf3aab931da8baefd652858115dc96d1037d5c96ed5a0a9e0cb9a4d23d3fa35c85d25b2deca44032f7313f84a2a74bf0abb2c22250b04c chromium-73.0.3683.103.tar.xz +sha512sums="f237cb794bff68cbc2ea3daadea2852df810543873ceaefa4be901702b3578ce7b23a0f083b76373de20e60ea2dc1245c58de0888fb6c72ca465bca0ee0e7c1a chromium-76.0.3809.87.tar.xz a3bb959c65944ae2fb765725cedcffd743a58bc0c2cd1f1999d15fe79801d00f3474b08b4ed7b48859ed921eb57093d0ad09d90f201d729ed9b8a419a591ed29 pstables-2.8.h b9a810416dd7a8ffc3a5ced85ad9acebda1665bd08a57eec7b189698cc5f74d2c3fd69044e20fcb83297a43214b2772a1312b2c6122ea0eb716abacf39524d60 chromium-launcher.sh f6d962b9e4c22dd42183df3db5d3202dab33eccecafb1bf63ca678147289581262db1e5e64cbe8f9c212beefb0a6717bb8d311e497f56b55fe95b8bab2db493f chromium.conf @@ -348,29 +346,22 @@ e182c998a43d22d1c76a86c561619afd1fca8c2be668265ad5e2f81a3806f7a154272cc027a2f8b3 230d1819b9d644ebaa6e194e948d662add8d237a99cc3d6b0f8a2fc2b331b43a3cd0766746f1c76c1a114f1730b40504c532d0c40aafa8cbc45022663cbcc245 default-pthread-stacksize.patch ef31809702ef020e02445ac36857c621cf852dea14c2fdf291ea0700b6fc6d94e3704726a051e95d193aa10fe74ca53a870848fec5f8153fb262f2e184affe7f musl-fixes.patch 90efbc89151c77f32434364dcbaabaf9d9a207f4a77f147cd51b3fe100832fbfb3a9fb665303a79a3d788e400f4f41890de202ccbb7bd1fc6252e33c6e74e429 musl-fixes-breakpad.patch -0aa3176f1021332088740d6e4fe2eadbe375240df0690c8449426a42a674fdf58e8a1fda85ca527dc1b4451e964d54564283fd81e3b7df059f5bcfccb8e07e84 musl-hacks.patch +4640c175657f6a53f8a8d1c6bd2208ec30751d739a086b8f4f49250a88e522441a4919c1e47673cbee54c24c9cc65f18d386071fc4667662e4d13201f0bb7e64 musl-hacks.patch 95ead57f7338649351948d100e32e5ec1eeadb02bffa136ff15c6c515eceb8013c444be092d777c1b62b945bfb83b97778ba4d3a0ccc2d7c2c9a0a8cd8ee0f01 musl-libc++.patch -952a73da0ed01d40e2422cababa84224782b76a3f57d6b3de0b2d69690acc24c6fb0755991d32d31cea590cc3b8c71357160a0231f820dbf15a48155496a7a14 musl-sandbox.patch -1024bc66b74053611d46e2222a6b4954b045812a505187130a500f0cce731beaf61c098f441f7ad676711fef0b12f439436a7ce538bcb284d4e5e3d11cf53580 no-execinfo.patch +2f6111926a6575a117de18bf27b9052a5d33d4de3b0fdfe4016925ee8ac5d88ad13b7366d228c0670a4bca5fe4df391c2288caefcb96d86360286edfe015dc70 musl-sandbox.patch +83b4cc042d501bd94ce953d1bc94361adf9d6f0d1fa71c04c5d3688c0befb81fdb6ccf31e6cab6a22d0057db309b473bc6af75535675c61d167035e36dd1d6c6 no-execinfo.patch db7f676d3476820c29f234b1f8f17a74e82b72d67fc727c715307734fd238e3cb0f99d8b5320d45f820b62c01163283c4829caa37afd6a9ca7592a54d3c65819 no-mallinfo.patch -6833054ef89da20c0de63faac2f87ff250b5aca3ac785fc404da4a9e03c4e00df9d7da009788e611d113cdf3be2ba50f933d85d6baf20f2df6a3711cceff5152 resolver.patch -6b0812725a0fc562527f3556dc4979fec72d1ba92f26a5e78ff2016c39bb2c155a0ff95fc22101f9c097d14b84182d6615276f4247f60ae7833ab45da8366e6d swiftshader.patch -1b8647ab4081ec27f142eb564841b603dbf4c41118502e43b061d06f8866ebd1418d676457ed9ee0dc0a759e0369a29219bea98e74f687ddcba5d4513ca460ba secure_getenv.patch +81c590942e73a62027290684c56030796e4bb953dd5007db787733ba84a505326a65001267b820ac3f44212c7e903c102809961f8e4ad42c57e21c44ad41cfe6 resolver.patch +84732900f50799ee8d4c9a572a8703c1cd67c6a3b8f8dcf97f308319dcef6ac3d41ea5ddfb2ef4d695bdebdae691e30d5631a8d04e59b931935ba188b0308a61 swiftshader.patch +7f9b816ff9088f84929dc9853ab8cf0c705ef95fedb9e9c3e85bc50c8befb76e39ecf5e754fa3fc8b34b42397875ec41c0729f880a642262b675ebf79901810a secure_getenv.patch 246c43a0ab557671119ebc4ecb292925ebfee25312fb50e739a179dc085d23b9623bec2d7baecdd37ebd9318f8770664f20c12de6383def74cd89b7845d149ce chromium-use-alpine-target.patch 6e2bcbed44786c6c0d3beda935269f30fdcdf07c400defa6bf73f8359a60b1d59cc2f80dbc106be651a535635995641321d9e524b18919d3975bd6008a641d59 chromium-gcc-r1.patch -d1f1323d2347769777c67c045f4dbd331ec96788b1319f7880e780dc1cbec4306e5eff45b7d4322fcb0792acf28e58da43bfb9125052848e536f5ca7515861e3 chromium-73-gcc-1.patch -be327cbb60d31589cb32f296b4d1b3f537c0c86ad4e6928ff23254c75c858251fa3d23ad7a7a0f8ed827b6a3aa76199b8b385a5c2202ee0ce4ce73d22e9348cf chromium-73-gcc-2.patch -0be2923f9d4c5263740d54f091339e4ccc4eab7159cd7e0a0c90c9f8740698f5b85e1e825a045e556dd6b535831ac3d5fa56093eb63f8e4ceefd9917d4e5fa86 chromium-73-gcc-3.patch -e7382bdc5d365bcc4d1e9331f01f12598bd1b5d0e66183f09b176caa0d3aa7a03c1cbddd31a565203fe851b09408de5be17894216fffa57fa3d4ed0903e87710 chromium-73-gcc-4.patch -628dee3c491e5f9d2d70f8a6f9b43e1b4002f79678f30a8293f728942e7bf186ba5636fb0eac544f40002e761235fb7239e22afe0251e2de2f98ae06e2bcd4b6 chromium-73-gcc-5.patch -80d89c711c4ada2a7d1d3757fea88b7f1f75cf6105ee83e275be4fe74689f58729a1c157b69744cd0c76bd6c3055386f4f7567aa9219e70baafe2f9330ff87d8 chromium-73-gcc-6.patch 589a7acf149d44db081da2dd24a7769f2b9572a8cc64d2aad78577a64768d3b6fb2bfa02292b5260acd2c4a28c3ae9b82847ff901ce8a21baeca0b46dcda0ca9 media-base.patch 05c1af43038f76014f5f8b605085310414242f2bfad0e3258ddb29a08e7f4307de31b2d551b0a291986cc7d5a01cf3a003ac864216877195bb4310fd33193f0f musl-crashpad.patch -2c22e0d56b2557bafc842043911ecd0f8f70589013aeb7d3e8c7c8a5622bdbfe1f249e7223991ebf6130c7a45c7771a02dcc096dd03c48e2559ea4741147cfce musl-v8-fix-deadlock.patch 6953e83d4034f7a016dd055fed152a8a448f741a4c4f7a8f3b03cc7a4589d3d3c03775f844d76d6d4478ac15c655fee0be7355f0d5062ddc7fa9f6ce4b011116 musl-v8-monotonic-pthread-cont_timedwait.patch -9bfc532fd1e84e30362ac41fcd68253e17ee4cb5e986ceb5bb122e3235e4617e295ce9dddfdfbbd0b9d3e67267096152da2a19e3bb4bb9111c7fdb22fa398872 gcc8-alignof.patch +34013a1a960d0f3b20183d03df5be6b36e2eb9b3d3319fa2bcf3c69084968fde0239ad7304c9a6165b3284a2a55a220b3d207889e2b913dc4578268fdede9ea6 nasm.patch bb0f3dc1ade429a398d487ae190a278948533398c4a1085aeb35ff57fefb90a1e598008ba839423ca0acd30ba4c992950f395dba3b9994d3c7187fe68b9a93d7 gcc-fno-delete-null-pointer-checks.patch -ebfa795879130226d5d3601901df9c3a119b4f7342c12b7a24cb1697a4fa535c9a9cc4a11d30085df569a7337846c0e26b78928fd78f53c98e5773978621753d gcc-arm.patch +91296fcbdfc4b35899e2af949024c7041d85cc64644cf5fe73c8e46a0523b09d1fb8849f315bd212c1ac25caf57553e933cb4eeb8d1856960441d24b2dd20e27 gcc-arm.patch 3bcffb36f28a01d8bb91f1c1ee1e327caebb1e139d4e8772ad15460ee69cb5ea3307a235dc83184a9e09b687882d9617f3a3ce1a7b07cbd6e11b0a5d6a6ace81 musl-arm-limits.patch d4d46ea95ed8d47cd4b09f27d99df61cc6b72b4cb92b865310f245259d5adf02cd136888cd44ad12aeba3fd4d638982437fdf230e817d0188cc5ea76fec82cd1 chromium-71.0.3578.98-skia-aarch64-buildfix.patch -229a0c04ebd7465fabe3268959c386e63ac9e272a0506bb65785f6f9532a9f88bee436287fbcfc63e5fd9d85fb4f68f73a79475b6e6cc53dc58d715d40cd0ed2 aarch64-fixes.patch" +f0a0fa663fd7a88346d69675a96dfd864364f6ba41d19a5adfbfb0f13fd784b194a60cd2c63edfcc21d6b049628eade690ff803f787dbdd29d84cd8312be4d4a aarch64-fixes.patch" diff --git a/community/chromium/aarch64-fixes.patch b/community/chromium/aarch64-fixes.patch index 589cabe0bb..107bb8b1bc 100644 --- a/community/chromium/aarch64-fixes.patch +++ b/community/chromium/aarch64-fixes.patch @@ -1,27 +1,3 @@ -diff --git a/third_party/swiftshader/third_party/llvm-7.0/BUILD.gn b/third_party/swiftshader/third_party/llvm-7.0/BUILD.gn -index 744b0eb..32ff5a8 100644 ---- ./third_party/swiftshader/third_party/llvm-7.0/BUILD.gn -+++ ./third_party/swiftshader/third_party/llvm-7.0/BUILD.gn -@@ -55,7 +55,10 @@ config("swiftshader_llvm_private_config") { - } - - if (is_clang) { -- cflags += [ "-Wno-header-hygiene" ] -+ cflags += [ -+ "-Wno-header-hygiene", -+ "-Wno-error=header-hygiene", -+ ] - if (target_cpu == "x86" || target_cpu == "x64") { - cflags += [ "-msse2" ] - } -@@ -70,7 +73,6 @@ config("swiftshader_llvm_private_config") { - "-Wno-unused-private-field", - "-Wno-unused-result", - "-Wno-unused-variable", -- "-Wno-error=header-hygiene", - ] - - defines = [ diff --git a/third_party/swiftshader/third_party/llvm-7.0/configs/linux/include/llvm/Config/config.h b/third_party/swiftshader/third_party/llvm-7.0/configs/linux/include/llvm/Config/config.h index ff20611..ec22982 100644 --- ./third_party/swiftshader/third_party/llvm-7.0/configs/linux/include/llvm/Config/config.h diff --git a/community/chromium/add-missing-blink-tools.patch b/community/chromium/add-missing-blink-tools.patch deleted file mode 100644 index 4eddd8c744..0000000000 --- a/community/chromium/add-missing-blink-tools.patch +++ /dev/null @@ -1,1071 +0,0 @@ -Description: add back contents of third-party/blink/tools that went missing in the source tarball for 66.0.3359.106 -Bug: https://bugs.chromium.org/p/chromium/issues/detail?id=832283 - ---- /dev/null -+++ b/third_party/blink/tools/OWNERS -@@ -0,0 +1 @@ -+file://third_party/WebKit/Tools/OWNERS ---- /dev/null -+++ b/third_party/blink/tools/blinkpy/__init__.py -@@ -0,0 +1,3 @@ -+# Copyright 2017 The Chromium Authors. All rights reserved. -+# Use of this source code is governed by a BSD-style license that can be -+# found in the LICENSE file. ---- /dev/null -+++ b/third_party/blink/tools/blinkpy/common/__init__.py -@@ -0,0 +1,3 @@ -+# Copyright 2017 The Chromium Authors. All rights reserved. -+# Use of this source code is governed by a BSD-style license that can be -+# found in the LICENSE file. ---- /dev/null -+++ b/third_party/blink/tools/blinkpy/common/name_style_converter.py -@@ -0,0 +1,128 @@ -+# Copyright 2017 The Chromium Authors. All rights reserved. -+# Use of this source code is governed by a BSD-style license that can be -+# found in the LICENSE file. -+ -+# pylint: disable=import-error,print-statement,relative-import -+ -+import re -+ -+SPECIAL_TOKENS = [ -+ # This list should be sorted by length. -+ 'CString', -+ 'Float32', -+ 'Float64', -+ 'Base64', -+ 'IFrame', -+ 'Latin1', -+ 'PlugIn', -+ 'SQLite', -+ 'Uint16', -+ 'Uint32', -+ 'WebGL2', -+ 'ASCII', -+ 'CType', -+ 'DList', -+ 'Int16', -+ 'Int32', -+ 'MPath', -+ 'OList', -+ 'TSpan', -+ 'UList', -+ 'UTF16', -+ 'Uint8', -+ 'WebGL', -+ 'XPath', -+ 'ETC1', -+ 'HTML', -+ 'Int8', -+ 'S3TC', -+ 'SPv2', -+ 'UTF8', -+ 'API', -+ 'CSS', -+ 'DOM', -+ 'EXT', -+ 'RTC', -+ 'SVG', -+ '2D', -+ 'AX', -+ 'V0', -+ 'V8', -+] -+ -+MATCHING_EXPRESSION = '((?:[A-Z][a-z]+)|[0-9]D?$)' -+ -+ -+class SmartTokenizer(object): -+ """Detects special cases that are not easily discernible without additional -+ knowledge, such as recognizing that in SVGSVGElement, the first two SVGs -+ are separate tokens, but WebGL is one token.""" -+ -+ def __init__(self, name): -+ self.remaining = name -+ -+ def tokenize(self): -+ name = self.remaining -+ tokens = [] -+ while len(name) > 0: -+ matched_token = None -+ for token in SPECIAL_TOKENS: -+ if name.startswith(token): -+ matched_token = token -+ break -+ if not matched_token: -+ match = re.search(MATCHING_EXPRESSION, name) -+ if not match: -+ matched_token = name -+ elif match.start(0) != 0: -+ matched_token = name[:match.start(0)] -+ else: -+ matched_token = match.group(0) -+ tokens.append(name[:len(matched_token)]) -+ name = name[len(matched_token):] -+ return tokens -+ -+ -+class NameStyleConverter(object): -+ """Converts names from camelCase to various other styles. -+ """ -+ -+ def __init__(self, name): -+ self.tokens = self.tokenize(name) -+ -+ def tokenize(self, name): -+ tokenizer = SmartTokenizer(name) -+ return tokenizer.tokenize() -+ -+ def to_snake_case(self): -+ """Snake case is the file and variable name style per Google C++ Style -+ Guide: -+ https://google.github.io/styleguide/cppguide.html#Variable_Names -+ -+ Also known as the hacker case. -+ https://en.wikipedia.org/wiki/Snake_case -+ """ -+ return '_'.join([token.lower() for token in self.tokens]) -+ -+ def to_upper_camel_case(self): -+ """Upper-camel case is the class and function name style per -+ Google C++ Style Guide: -+ https://google.github.io/styleguide/cppguide.html#Function_Names -+ -+ Also known as the PascalCase. -+ https://en.wikipedia.org/wiki/Camel_case. -+ """ -+ return ''.join([token[0].upper() + token[1:] for token in self.tokens]) -+ -+ def to_macro_case(self): -+ """Macro case is the macro name style per Google C++ Style Guide: -+ https://google.github.io/styleguide/cppguide.html#Macro_Names -+ """ -+ return '_'.join([token.upper() for token in self.tokens]) -+ -+ def to_all_cases(self): -+ return { -+ 'snake_case': self.to_snake_case(), -+ 'upper_camel_case': self.to_upper_camel_case(), -+ 'macro_case': self.to_macro_case(), -+ } ---- /dev/null -+++ b/third_party/blink/tools/blinkpy/common/name_style_converter_test.py -@@ -0,0 +1,178 @@ -+# Copyright 2017 The Chromium Authors. All rights reserved. -+# Use of this source code is governed by a BSD-style license that can be -+# found in the LICENSE file. -+ -+# pylint: disable=import-error,print-statement,relative-import,protected-access -+ -+"""Unit tests for name_style_converter.py.""" -+ -+import unittest -+ -+from name_style_converter import NameStyleConverter -+from name_style_converter import SmartTokenizer -+ -+ -+class SmartTokenizerTest(unittest.TestCase): -+ def test_simple_cases(self): -+ tokenizer = SmartTokenizer('foo') -+ self.assertEqual(tokenizer.tokenize(), ['foo']) -+ -+ tokenizer = SmartTokenizer('fooBar') -+ self.assertEqual(tokenizer.tokenize(), ['foo', 'Bar']) -+ -+ tokenizer = SmartTokenizer('fooBarBaz') -+ self.assertEqual(tokenizer.tokenize(), ['foo', 'Bar', 'Baz']) -+ -+ tokenizer = SmartTokenizer('Baz') -+ self.assertEqual(tokenizer.tokenize(), ['Baz']) -+ -+ tokenizer = SmartTokenizer('') -+ self.assertEqual(tokenizer.tokenize(), []) -+ -+ tokenizer = SmartTokenizer('FOO') -+ self.assertEqual(tokenizer.tokenize(), ['FOO']) -+ -+ tokenizer = SmartTokenizer('foo2') -+ self.assertEqual(tokenizer.tokenize(), ['foo', '2']) -+ -+ def test_tricky_cases(self): -+ tokenizer = SmartTokenizer('XMLHttpRequest') -+ self.assertEqual(tokenizer.tokenize(), ['XML', 'Http', 'Request']) -+ -+ tokenizer = SmartTokenizer('HTMLElement') -+ self.assertEqual(tokenizer.tokenize(), ['HTML', 'Element']) -+ -+ tokenizer = SmartTokenizer('WebGLRenderingContext') -+ self.assertEqual(tokenizer.tokenize(), -+ ['WebGL', 'Rendering', 'Context']) -+ -+ tokenizer = SmartTokenizer('CanvasRenderingContext2D') -+ self.assertEqual(tokenizer.tokenize(), -+ ['Canvas', 'Rendering', 'Context', '2D']) -+ tokenizer = SmartTokenizer('CanvasRenderingContext2DAPITest') -+ self.assertEqual(tokenizer.tokenize(), -+ ['Canvas', 'Rendering', 'Context', '2D', 'API', 'Test']) -+ -+ tokenizer = SmartTokenizer('SVGSVGElement') -+ self.assertEqual(tokenizer.tokenize(), ['SVG', 'SVG', 'Element']) -+ -+ tokenizer = SmartTokenizer('CanvasRenderingContext2D') -+ self.assertEqual(tokenizer.tokenize(), ['Canvas', 'Rendering', 'Context', '2D']) -+ -+ tokenizer = SmartTokenizer('CSSURLImageValue') -+ self.assertEqual(tokenizer.tokenize(), ['CSS', 'URL', 'Image', 'Value']) -+ tokenizer = SmartTokenizer('CSSPropertyAPID') -+ self.assertEqual(tokenizer.tokenize(), ['CSS', 'Property', 'API', 'D']) -+ tokenizer = SmartTokenizer('AXARIAGridCell') -+ self.assertEqual(tokenizer.tokenize(), ['AX', 'ARIA', 'Grid', 'Cell']) -+ -+ tokenizer = SmartTokenizer('CDATASection') -+ self.assertEqual(tokenizer.tokenize(), ['CDATA', 'Section']) -+ -+ tokenizer = SmartTokenizer('ASCIICType') -+ self.assertEqual(tokenizer.tokenize(), ['ASCII', 'CType']) -+ tokenizer = SmartTokenizer('CString') -+ self.assertEqual(tokenizer.tokenize(), ['CString']) -+ -+ tokenizer = SmartTokenizer('HTMLDListElement') -+ self.assertEqual(tokenizer.tokenize(), ['HTML', 'DList', 'Element']) -+ tokenizer = SmartTokenizer('HTMLOListElement') -+ self.assertEqual(tokenizer.tokenize(), ['HTML', 'OList', 'Element']) -+ tokenizer = SmartTokenizer('HTMLIFrameElement') -+ self.assertEqual(tokenizer.tokenize(), ['HTML', 'IFrame', 'Element']) -+ tokenizer = SmartTokenizer('HTMLPlugInElement') -+ self.assertEqual(tokenizer.tokenize(), ['HTML', 'PlugIn', 'Element']) -+ -+ # No special handling for OptGroup, FieldSet, and TextArea. -+ tokenizer = SmartTokenizer('HTMLOptGroupElement') -+ self.assertEqual(tokenizer.tokenize(), ['HTML', 'Opt', 'Group', 'Element']) -+ tokenizer = SmartTokenizer('HTMLFieldSetElement') -+ self.assertEqual(tokenizer.tokenize(), ['HTML', 'Field', 'Set', 'Element']) -+ tokenizer = SmartTokenizer('HTMLTextAreaElement') -+ self.assertEqual(tokenizer.tokenize(), ['HTML', 'Text', 'Area', 'Element']) -+ -+ tokenizer = SmartTokenizer('Path2D') -+ self.assertEqual(tokenizer.tokenize(), ['Path', '2D']) -+ tokenizer = SmartTokenizer('Point2D') -+ self.assertEqual(tokenizer.tokenize(), ['Point', '2D']) -+ tokenizer = SmartTokenizer('CanvasRenderingContext2DState') -+ self.assertEqual(tokenizer.tokenize(), ['Canvas', 'Rendering', 'Context', '2D', 'State']) -+ -+ tokenizer = SmartTokenizer('RTCDTMFSender') -+ self.assertEqual(tokenizer.tokenize(), ['RTC', 'DTMF', 'Sender']) -+ -+ tokenizer = SmartTokenizer('WebGLCompressedTextureS3TCsRGB') -+ self.assertEqual(tokenizer.tokenize(), ['WebGL', 'Compressed', 'Texture', 'S3TC', 'sRGB']) -+ tokenizer = SmartTokenizer('WebGL2CompressedTextureETC1') -+ self.assertEqual(tokenizer.tokenize(), ['WebGL2', 'Compressed', 'Texture', 'ETC1']) -+ tokenizer = SmartTokenizer('EXTsRGB') -+ self.assertEqual(tokenizer.tokenize(), ['EXT', 'sRGB']) -+ -+ tokenizer = SmartTokenizer('SVGFEBlendElement') -+ self.assertEqual(tokenizer.tokenize(), ['SVG', 'FE', 'Blend', 'Element']) -+ tokenizer = SmartTokenizer('SVGMPathElement') -+ self.assertEqual(tokenizer.tokenize(), ['SVG', 'MPath', 'Element']) -+ tokenizer = SmartTokenizer('SVGTSpanElement') -+ self.assertEqual(tokenizer.tokenize(), ['SVG', 'TSpan', 'Element']) -+ tokenizer = SmartTokenizer('SVGURIReference') -+ self.assertEqual(tokenizer.tokenize(), ['SVG', 'URI', 'Reference']) -+ -+ tokenizer = SmartTokenizer('UTF16TextIterator') -+ self.assertEqual(tokenizer.tokenize(), ['UTF16', 'Text', 'Iterator']) -+ tokenizer = SmartTokenizer('UTF8Decoder') -+ self.assertEqual(tokenizer.tokenize(), ['UTF8', 'Decoder']) -+ tokenizer = SmartTokenizer('Uint8Array') -+ self.assertEqual(tokenizer.tokenize(), ['Uint8', 'Array']) -+ tokenizer = SmartTokenizer('DOMWindowBase64') -+ self.assertEqual(tokenizer.tokenize(), ['DOM', 'Window', 'Base64']) -+ tokenizer = SmartTokenizer('TextCodecLatin1') -+ self.assertEqual(tokenizer.tokenize(), ['Text', 'Codec', 'Latin1']) -+ tokenizer = SmartTokenizer('V8BindingForCore') -+ self.assertEqual(tokenizer.tokenize(), ['V8', 'Binding', 'For', 'Core']) -+ tokenizer = SmartTokenizer('V8DOMRect') -+ self.assertEqual(tokenizer.tokenize(), ['V8', 'DOM', 'Rect']) -+ -+ tokenizer = SmartTokenizer('V0InsertionPoint') -+ self.assertEqual(tokenizer.tokenize(), ['V0', 'Insertion', 'Point']) -+ tokenizer = SmartTokenizer('ShadowDOMV0Test') -+ self.assertEqual(tokenizer.tokenize(), ['Shadow', 'DOM', 'V0', 'Test']) -+ tokenizer = SmartTokenizer('ElementShadowV0') -+ self.assertEqual(tokenizer.tokenize(), ['Element', 'Shadow', 'V0']) -+ tokenizer = SmartTokenizer('StubChromeClientForSPv2') -+ self.assertEqual(tokenizer.tokenize(), ['Stub', 'Chrome', 'Client', 'For', 'SPv2']) -+ -+ tokenizer = SmartTokenizer('SQLiteAuthorizer') -+ self.assertEqual(tokenizer.tokenize(), ['SQLite', 'Authorizer']) -+ tokenizer = SmartTokenizer('XPathEvaluator') -+ self.assertEqual(tokenizer.tokenize(), ['XPath', 'Evaluator']) -+ -+ tokenizer = SmartTokenizer('IsXHTMLDocument') -+ self.assertEqual(tokenizer.tokenize(), ['Is', 'XHTML', 'Document']) -+ -+ tokenizer = SmartTokenizer('Animation.idl') -+ self.assertEqual(tokenizer.tokenize(), ['Animation', '.idl']) -+ -+ -+class NameStyleConverterTest(unittest.TestCase): -+ def test_snake_case(self): -+ converter = NameStyleConverter('HTMLElement') -+ self.assertEqual(converter.to_snake_case(), 'html_element') -+ -+ def test_upper_camel_case(self): -+ converter = NameStyleConverter('someSuperThing') -+ self.assertEqual(converter.to_upper_camel_case(), 'SomeSuperThing') -+ -+ converter = NameStyleConverter('SVGElement') -+ self.assertEqual(converter.to_upper_camel_case(), 'SVGElement') -+ -+ def test_macro_case(self): -+ converter = NameStyleConverter('WebGLBaz2D') -+ self.assertEqual(converter.to_macro_case(), 'WEBGL_BAZ_2D') -+ -+ def test_all_cases(self): -+ converter = NameStyleConverter('SVGScriptElement') -+ self.assertEqual(converter.to_all_cases(), { -+ 'snake_case': 'svg_script_element', -+ 'upper_camel_case': 'SVGScriptElement', -+ 'macro_case': 'SVG_SCRIPT_ELEMENT', -+ }) ---- /dev/null -+++ b/third_party/blink/tools/compile_devtools_frontend.py -@@ -0,0 +1,20 @@ -+#!/usr/bin/env vpython -+# Copyright 2017 The Chromium Authors. All rights reserved. -+# Use of this source code is governed by a BSD-style license that can be -+# found in the LICENSE file. -+ -+"""Compile DevTools frontend code with Closure compiler. -+ -+This script wraps devtools/scripts/compile_frontend.py. -+DevTools bot kicks this script. -+""" -+ -+import os -+import sys -+ -+sys.path.append(os.path.join( -+ os.path.dirname(__file__), '..', '..', 'WebKit', 'Source', 'devtools', 'scripts')) -+import compile_frontend -+ -+if __name__ == '__main__': -+ sys.exit(compile_frontend.main()) ---- /dev/null -+++ b/third_party/blink/tools/move_blink_source.py -@@ -0,0 +1,615 @@ -+#!/usr/bin/env vpython -+# Copyright 2017 The Chromium Authors. All rights reserved. -+# Use of this source code is governed by a BSD-style license that can be -+# found in the LICENSE file. -+ -+"""Tool to move Blink source from third_party/WebKit to third_party/blink. -+ -+See https://docs.google.com/document/d/1l3aPv1Wx__SpRkdOhvJz8ciEGigNT3wFKv78XiuW0Tw/edit?usp=sharing#heading=h.o225wrxp242h -+for the details. -+""" -+ -+import argparse -+import logging -+import os -+import re -+import sys -+from functools import partial -+ -+# Without abspath(), PathFinder can't find chromium_base correctly. -+sys.path.append(os.path.abspath( -+ os.path.join(os.path.dirname(__file__), '..', '..', '..', -+ 'third_party', 'WebKit', 'Tools', 'Scripts'))) -+from blinkpy.common.name_style_converter import NameStyleConverter -+from plan_blink_move import plan_blink_move -+from plan_blink_move import relative_dest -+from webkitpy.common.checkout.git import Git -+from webkitpy.common.path_finder import get_chromium_src_dir -+from webkitpy.common.path_finder import get_scripts_dir -+from webkitpy.common.system.executive import Executive -+from webkitpy.common.system.executive import ScriptError -+from webkitpy.common.system.filesystem import FileSystem -+ -+_log = logging.getLogger('move_blink_source') -+ -+ -+class FileType(object): -+ NONE = 0 -+ BUILD = 1 -+ BLINK_BUILD = 2 -+ OWNERS = 3 -+ DEPS = 4 -+ MOJOM = 5 -+ TYPEMAP = 6 -+ BLINK_BUILD_PY = 7 -+ LAYOUT_TESTS_WITH_MOJOM = 8 -+ -+ @staticmethod -+ def detect(path): -+ slash_dir, basename = os.path.split(path) -+ slash_dir = slash_dir.replace(os.path.sep, '/') -+ if basename == 'DEPS': -+ return FileType.DEPS -+ if basename == 'OWNERS': -+ return FileType.OWNERS -+ if basename.endswith('.mojom'): -+ return FileType.MOJOM -+ if basename.endswith('.typemap'): -+ return FileType.TYPEMAP -+ if basename.endswith('.py') and 'third_party/WebKit/Source/build' in slash_dir: -+ return FileType.BLINK_BUILD_PY -+ if basename.endswith(('.gn', '.gni')): -+ if 'third_party/WebKit' in path or 'third_party/blink' in slash_dir: -+ return FileType.BLINK_BUILD -+ if 'third_party' in slash_dir: -+ return FileType.NONE -+ return FileType.BUILD -+ if basename.endswith('.html') and re.search( -+ r'third_party/WebKit/LayoutTests/(geolocation-api|installedapp|' + -+ r'media/mediasession|payments|presentation|webshare)', slash_dir): -+ return FileType.LAYOUT_TESTS_WITH_MOJOM -+ return FileType.NONE -+ -+ -+class MoveBlinkSource(object): -+ -+ def __init__(self, fs, options, repo_root): -+ self._fs = fs -+ self._options = options -+ _log.debug(options) -+ self._repo_root = repo_root -+ -+ # The following fields are initialized in _create_basename_maps. -+ self._basename_map = None -+ self._basename_re = None -+ self._idl_generated_impl_headers = None -+ # _checked_in_header_re is used to distinguish checked-in header files -+ # and generated header files. -+ self._checked_in_header_re = None -+ -+ self._updated_files = [] -+ -+ def update(self, apply_only=None): -+ """Updates contents of files affected by Blink source move. -+ -+ Args: -+ apply_only: If it's None, updates all affected files. Otherwise, -+ it should be a set of file paths and this function updates -+ only the files in |apply_only|. -+ """ -+ _log.info('Planning renaming ...') -+ file_pairs = plan_blink_move(self._fs, []) -+ _log.info('Will move %d files', len(file_pairs)) -+ -+ self._create_basename_maps(file_pairs) -+ dirs = self._update_file_content(apply_only) -+ -+ # Updates #includes in files in directories with updated DEPS + -+ # third_party/WebKit/{Source,common,public}. -+ self._append_unless_upper_dir_exists(dirs, self._fs.join(self._repo_root, 'third_party', 'WebKit', 'Source')) -+ self._append_unless_upper_dir_exists(dirs, self._fs.join(self._repo_root, 'third_party', 'WebKit', 'common')) -+ self._append_unless_upper_dir_exists(dirs, self._fs.join(self._repo_root, 'third_party', 'WebKit', 'public')) -+ self._append_unless_upper_dir_exists(dirs, self._fs.join(self._repo_root, 'mojo', 'public', 'tools', -+ 'bindings', 'generators', 'cpp_templates')) -+ self._update_cpp_includes_in_directories(dirs, apply_only) -+ -+ # Content update for individual files. -+ # The following is a list of tuples. -+ # Tuple: (<file path relative to repo root>, [replacement commands]) -+ # Command: a callable object, or -+ # a tuple of (<original string>, <new string>). -+ file_replacement_list = [ -+ ('DEPS', -+ [('src/third_party/WebKit/Source/devtools', -+ 'src/third_party/blink/renderer/devtools')]), -+ ('WATCHLISTS', -+ [('third_party/WebKit/Source', 'third_party/blink/renderer'), -+ ('third_party/WebKit/public', 'third_party/blink/renderer/public')]), -+ ('build/check_gn_headers_whitelist.txt', -+ [('third_party/WebKit/Source', 'third_party/blink/renderer'), -+ ('third_party/WebKit/public', 'third_party/blink/renderer/public'), -+ self._update_basename]), -+ ('testing/buildbot/gn_isolate_map.pyl', -+ [('third_party/WebKit/Source', 'third_party/blink/renderer')]), -+ ('third_party/WebKit/Source/BUILD.gn', -+ [('$root_gen_dir/third_party/WebKit', -+ '$root_gen_dir/third_party/blink/renderer')]), -+ ('third_party/WebKit/Source/config.gni', -+ [('snake_case_source_files = false', -+ 'snake_case_source_files = true')]), -+ ('third_party/WebKit/Source/core/css/CSSProperties.json5', -+ [self._update_basename]), -+ ('third_party/WebKit/Source/core/css/ComputedStyleExtraFields.json5', -+ [self._update_basename]), -+ ('third_party/WebKit/Source/core/css/ComputedStyleFieldAliases.json5', -+ [self._update_basename]), -+ ('third_party/WebKit/Source/core/html/parser/create-html-entity-table', -+ [self._update_basename]), -+ ('third_party/WebKit/Source/core/inspector/inspector_protocol_config.json', -+ [self._update_basename]), -+ ('third_party/WebKit/Source/core/probe/CoreProbes.json5', -+ [self._update_basename]), -+ ('third_party/WebKit/Source/core/testing/InternalSettings.h', -+ [('InternalSettingsGenerated.h', 'internal_settings_generated.h')]), -+ ('third_party/WebKit/Source/core/testing/Internals.cpp', -+ [('InternalRuntimeFlags.h', 'internal_runtime_flags.h')]), -+ ('third_party/WebKit/Source/platform/probe/PlatformProbes.json5', -+ [self._update_basename]), -+ ('third_party/WebKit/public/BUILD.gn', -+ [('$root_gen_dir/third_party/WebKit', -+ '$root_gen_dir/third_party/blink/renderer')]), -+ ('third_party/WebKit/public/blink_resources.grd', -+ [('../Source/', '../')]), -+ ('tools/android/eclipse/.classpath', -+ [('third_party/WebKit/public', 'third_party/blink/renderer/public')]), -+ ('tools/android/loading/cloud/backend/deploy.sh', -+ [('third_party/WebKit/Source', 'third_party/blink/renderer')]), -+ ('tools/android/loading/emulation_unittest.py', -+ [('third_party/WebKit/Source', 'third_party/blink/renderer')]), -+ ('tools/android/loading/options.py', -+ [('third_party/WebKit/Source', 'third_party/blink/renderer')]), -+ ('tools/android/loading/request_track.py', -+ [('third_party/WebKit/Source', 'third_party/blink/renderer')]), -+ ('tools/gritsettings/resource_ids', -+ [('third_party/WebKit/public', 'third_party/blink/renderer/public'), -+ ('third_party/WebKit/Source', 'third_party/blink/renderer')]), -+ ('tools/metrics/actions/extract_actions.py', -+ [('third_party/WebKit/Source', 'third_party/blink/renderer')]), -+ ('tools/metrics/histograms/update_editor_commands.py', -+ [('third_party/WebKit/Source/core/editing/EditorCommand.cpp', -+ 'third_party/blink/renderer/core/editing/editor_command.cc')]), -+ ('tools/metrics/histograms/update_use_counter_css.py', -+ [('third_party/WebKit/Source/core/frame/UseCounter.cpp', -+ 'third_party/blink/renderer/core/frame/use_counter.cc')]), -+ ('tools/metrics/histograms/update_use_counter_feature_enum.py', -+ [('third_party/WebKit/public', 'third_party/blink/renderer/public')]), -+ ] -+ for file_path, replacement_list in file_replacement_list: -+ if not apply_only or file_path in apply_only: -+ self._update_single_file_content(file_path, replacement_list, should_write=self._options.run) -+ -+ if self._options.run: -+ _log.info('Formatting updated %d files ...', len(self._updated_files)) -+ git = Git(cwd=self._repo_root) -+ # |git cl format| can't handle too many files at once. -+ while len(self._updated_files) > 0: -+ end_index = 100 -+ if end_index > len(self._updated_files): -+ end_index = len(self._updated_files) -+ git.run(['cl', 'format'] + self._updated_files[:end_index]) -+ self._updated_files = self._updated_files[end_index:] -+ -+ if not apply_only: -+ _log.info('Make a local commit ...') -+ git.commit_locally_with_message("""The Great Blink mv for source files, part 1. -+ -+Update file contents without moving files. -+ -+NOAUTOREVERT=true -+Bug: 768828 -+""") -+ -+ def move(self, apply_only=None): -+ """Move Blink source files. -+ -+ Args: -+ apply_only: If it's None, move all affected files. Otherwise, -+ it should be a set of file paths and this function moves -+ only the files in |apply_only|. -+ """ -+ _log.info('Planning renaming ...') -+ file_pairs = plan_blink_move(self._fs, []) -+ -+ if apply_only: -+ file_pairs = [(src, dest) for (src, dest) in file_pairs -+ if 'third_party/WebKit/' + src.replace('\\', '/') in apply_only] -+ print 'Update file_pairs = ', file_pairs -+ _log.info('Will move %d files', len(file_pairs)) -+ -+ git = Git(cwd=self._repo_root) -+ files_set = self._get_checked_in_files(git) -+ for i, (src, dest) in enumerate(file_pairs): -+ src_from_repo = self._fs.join('third_party', 'WebKit', src) -+ if src_from_repo.replace('\\', '/') not in files_set: -+ _log.info('%s is not in the repository', src) -+ continue -+ dest_from_repo = self._fs.join('third_party', 'blink', dest) -+ self._fs.maybe_make_directory(self._repo_root, 'third_party', 'blink', self._fs.dirname(dest)) -+ if self._options.run_git: -+ git.move(src_from_repo, dest_from_repo) -+ _log.info('[%d/%d] Git moved %s', i + 1, len(file_pairs), src) -+ else: -+ self._fs.move(self._fs.join(self._repo_root, src_from_repo), -+ self._fs.join(self._repo_root, dest_from_repo)) -+ _log.info('[%d/%d] Moved %s', i + 1, len(file_pairs), src) -+ if apply_only: -+ return -+ -+ self._update_single_file_content( -+ 'build/get_landmines.py', -+ [('\ndef main', ' print \'The Great Blink mv for source files (crbug.com/768828)\'\n\ndef main')]) -+ -+ _log.info('Run run-bindings-tests ...') -+ Executive().run_command(['python', -+ self._fs.join(get_scripts_dir(), 'run-bindings-tests'), -+ '--reset-results'], -+ cwd=self._repo_root) -+ -+ if self._options.run_git: -+ _log.info('Make a local commit ...') -+ git.commit_locally_with_message("""The Great Blink mv for source files, part 2. -+ -+Move and rename files. -+ -+NOAUTOREVERT=true -+Bug: 768828 -+""") -+ -+ def fix_branch(self): -+ git = Git(cwd=self._repo_root) -+ status = self._get_local_change_status(git) -+ if len(status) == 0: -+ _log.info('No local changes.') -+ return -+ modified_files = {f for (s, f) in status if s != 'D'} -+ deleted_files = {f for (s, f) in status if s == 'D'} -+ -+ self.update(apply_only=modified_files) -+ self.move(apply_only=modified_files) -+ try: -+ git.commit_locally_with_message('This commit should be squashed.') -+ except ScriptError: -+ _log.info('move_blink_source.py modified nothing.') -+ -+ # TODO(tkent): Show a message about deleted_files. -+ -+ def _get_local_change_status(self, git): -+ """Returns a list of tuples representing local change summary. -+ -+ Each tuple contains two strings. The first one is file change status -+ such as "M", "D". See --diff-filter section of git-diff manual page. -+ The second one is file name relative to the repository top. -+ """ -+ -+ base_commit = git.run(['show-branch', '--merge-base', 'master', 'HEAD']).strip() -+ # Note that file names in the following command result are always -+ # slash-separated, even on Windows. -+ status_lines = git.run(['diff', '--name-status', '--no-renames', base_commit]).split('\n') -+ status_tuple_list = [] -+ for l in status_lines: -+ items = l.split('\t') -+ if len(items) == 2: -+ status_tuple_list.append(tuple(items)) -+ elif len(l) > 0: -+ _log.warning('Unrecognized diff output: "%s"', l) -+ return status_tuple_list -+ -+ def _get_checked_in_files(self, git): -+ files_text = git.run(['ls-files', -+ 'third_party/WebKit/Source', -+ 'third_party/WebKit/common', -+ 'third_party/WebKit/public']) -+ return set(files_text.split('\n')) -+ -+ def _create_basename_maps(self, file_pairs): -+ basename_map = {} -+ # Generated inspector/protocol/* contains a lot of names duplicated with -+ # checked-in core files. We don't want to rename them, and don't want to -+ # replace them in BUILD.gn and #include accidentally. -+ pattern = r'(?<!inspector/protocol/)\b(' -+ idl_headers = set() -+ header_pattern = r'(?<!inspector/protocol/)\b(' -+ for source, dest in file_pairs: -+ _, source_base = self._fs.split(source) -+ _, dest_base = self._fs.split(dest) -+ # OriginTrialFeaturesForCore.h in bindings/tests/results/modules/ -+ # confuses generated/checked-in detection in _replace_include_path(). -+ if 'bindings/tests' in source.replace('\\', '/'): -+ continue -+ if source_base.endswith('.h'): -+ header_pattern += re.escape(source_base) + '|' -+ if source_base == dest_base: -+ continue -+ basename_map[source_base] = dest_base -+ pattern += re.escape(source_base) + '|' -+ # IDL sometimes generates implementation files as well as -+ # binding files. We'd like to update #includes for such files. -+ if source_base.endswith('.idl'): -+ source_header = source_base.replace('.idl', '.h') -+ basename_map[source_header] = dest_base.replace('.idl', '.h') -+ pattern += re.escape(source_header) + '|' -+ idl_headers.add(source_header) -+ _log.info('Rename %d files for snake_case', len(basename_map)) -+ self._basename_map = basename_map -+ self._basename_re = re.compile(pattern[0:len(pattern) - 1] + ')(?=["\']|$)') -+ self._idl_generated_impl_headers = idl_headers -+ self._checked_in_header_re = re.compile(header_pattern[0:len(header_pattern) - 1] + ')$') -+ -+ def _shorten_path(self, path): -+ if path.startswith(self._repo_root): -+ return path[len(self._repo_root) + 1:] -+ return path -+ -+ @staticmethod -+ def _filter_file(fs, dirname, basename): -+ return FileType.detect(fs.join(dirname, basename)) != FileType.NONE -+ -+ def _update_build(self, content): -+ content = content.replace('//third_party/WebKit/Source', '//third_party/blink/renderer') -+ content = content.replace('//third_party/WebKit/common', '//third_party/blink/common') -+ content = content.replace('//third_party/WebKit/public', '//third_party/blink/renderer/public') -+ # export_header_blink exists outside of Blink too. -+ content = content.replace('export_header_blink = "third_party/WebKit/public/platform/WebCommon.h"', -+ 'export_header_blink = "third_party/blink/renderer/public/platform/web_common.h"') -+ return content -+ -+ def _update_blink_build(self, content): -+ content = self._update_build(content) -+ -+ # Update visibility=[...] -+ content = content.replace('//third_party/WebKit/*', '//third_party/blink/*') -+ content = content.replace('//third_party/WebKit/Source/*', '//third_party/blink/renderer/*') -+ content = content.replace('//third_party/WebKit/public/*', '//third_party/blink/renderer/public/*') -+ -+ # Update mojom variables -+ content = content.replace('export_header = "third_party/WebKit/common', -+ 'export_header = "third_party/blink/common') -+ content = content.replace('export_header_blink = "third_party/WebKit/Source', -+ 'export_header_blink = "third_party/blink/renderer') -+ return self._update_basename(content) -+ -+ def _update_owners(self, content): -+ content = content.replace('//third_party/WebKit/Source', '//third_party/blink/renderer') -+ content = content.replace('//third_party/WebKit/common', '//third_party/blink/common') -+ content = content.replace('//third_party/WebKit/public', '//third_party/blink/renderer/public') -+ return content -+ -+ def _update_deps(self, content): -+ original_content = content -+ content = content.replace('third_party/WebKit/Source', 'third_party/blink/renderer') -+ content = content.replace('third_party/WebKit/common', 'third_party/blink/common') -+ content = content.replace('third_party/WebKit/public', 'third_party/blink/renderer/public') -+ content = content.replace('third_party/WebKit', 'third_party/blink') -+ if original_content == content: -+ return content -+ return self._update_basename(content) -+ -+ def _update_mojom(self, content): -+ content = content.replace('third_party/WebKit/public', 'third_party/blink/renderer/public') -+ content = content.replace('third_party/WebKit/common', 'third_party/blink/common') -+ return content -+ -+ def _update_typemap(self, content): -+ content = content.replace('//third_party/WebKit/Source', '//third_party/blink/renderer') -+ content = content.replace('//third_party/WebKit/common', '//third_party/blink/common') -+ content = content.replace('//third_party/WebKit/public', '//third_party/blink/renderer/public') -+ return self._update_basename(content) -+ -+ def _update_blink_build_py(self, content): -+ # We don't prepend 'third_party/blink/renderer/' to matched basenames -+ # because it won't affect build and manual update after the great mv is -+ # enough. -+ return self._update_basename(content) -+ -+ def _update_layout_tests(self, content): -+ return content.replace('file:///gen/third_party/WebKit/', 'file:///gen/third_party/blink/renderer/') -+ -+ def _update_basename(self, content): -+ return self._basename_re.sub(lambda match: self._basename_map[match.group(1)], content) -+ -+ @staticmethod -+ def _append_unless_upper_dir_exists(dirs, new_dir): -+ for i in range(0, len(dirs)): -+ if new_dir.startswith(dirs[i]): -+ return -+ if dirs[i].startswith(new_dir): -+ dirs[i] = new_dir -+ return -+ dirs.append(new_dir) -+ -+ def _update_file_content(self, apply_only): -+ _log.info('Find *.gn, *.mojom, *.py, *.typemap, DEPS, and OWNERS ...') -+ files = self._fs.files_under( -+ self._repo_root, dirs_to_skip=['.git', 'out'], file_filter=self._filter_file) -+ _log.info('Scan contents of %d files ...', len(files)) -+ updated_deps_dirs = [] -+ for file_path in files: -+ file_type = FileType.detect(file_path) -+ original_content = self._fs.read_text_file(file_path) -+ content = original_content -+ if file_type == FileType.BUILD: -+ content = self._update_build(content) -+ elif file_type == FileType.BLINK_BUILD: -+ content = self._update_blink_build(content) -+ elif file_type == FileType.OWNERS: -+ content = self._update_owners(content) -+ elif file_type == FileType.DEPS: -+ if self._fs.dirname(file_path) == self._repo_root: -+ _log.info("Skip //DEPS") -+ continue -+ content = self._update_deps(content) -+ elif file_type == FileType.MOJOM: -+ content = self._update_mojom(content) -+ elif file_type == FileType.TYPEMAP: -+ content = self._update_typemap(content) -+ elif file_type == FileType.BLINK_BUILD_PY: -+ content = self._update_blink_build_py(content) -+ elif file_type == FileType.LAYOUT_TESTS_WITH_MOJOM: -+ content = self._update_layout_tests(content) -+ -+ if original_content == content: -+ continue -+ if self._options.run and (not apply_only or file_path.replace('\\', '/') in apply_only): -+ self._fs.write_text_file(file_path, content) -+ self._updated_files.append(file_path) -+ if file_type == FileType.DEPS: -+ self._append_unless_upper_dir_exists(updated_deps_dirs, self._fs.dirname(file_path)) -+ _log.info('Updated %s', self._shorten_path(file_path)) -+ return updated_deps_dirs -+ -+ def _update_cpp_includes_in_directories(self, dirs, apply_only): -+ for dirname in dirs: -+ _log.info('Processing #include in %s ...', self._shorten_path(dirname)) -+ files = self._fs.files_under( -+ dirname, file_filter=lambda fs, _, basename: basename.endswith( -+ ('.h', '.cc', '.cpp', '.mm', '.cc.tmpl', '.cpp.tmpl', -+ '.h.tmpl', 'XPathGrammar.y', '.gperf'))) -+ for file_path in files: -+ posix_file_path = file_path.replace('\\', '/') -+ original_content = self._fs.read_text_file(file_path) -+ -+ content = self._update_cpp_includes(original_content) -+ if file_path.endswith('.h') and '/third_party/WebKit/public/' in posix_file_path: -+ content = self._update_basename_only_includes(content, file_path) -+ if file_path.endswith('.h') and '/third_party/WebKit/' in posix_file_path: -+ content = self._update_include_guard(content, file_path) -+ -+ if original_content == content: -+ continue -+ if self._options.run and (not apply_only or posix_file_path in apply_only): -+ self._fs.write_text_file(file_path, content) -+ self._updated_files.append(file_path) -+ _log.info('Updated %s', self._shorten_path(file_path)) -+ -+ def _replace_include_path(self, match): -+ include_or_import = match.group(1) -+ path = match.group(2) -+ -+ # If |path| starts with 'third_party/WebKit', we should adjust the -+ # directory name for third_party/blink, and replace its basename by -+ # self._basename_map. -+ # -+ # If |path| starts with a Blink-internal directory such as bindings, -+ # core, modules, platform, public, it refers to a checked-in file, or a -+ # generated file. For the former, we should add -+ # 'third_party/blink/renderer/' and replace the basename. For the -+ # latter, we should update the basename for a name mapped from an IDL -+ # renaming, and should not add 'third_party/blink/renderer'. -+ -+ if path.startswith('third_party/WebKit'): -+ path = path.replace('third_party/WebKit/Source', 'third_party/blink/renderer') -+ path = path.replace('third_party/WebKit/common', 'third_party/blink/common') -+ path = path.replace('third_party/WebKit/public', 'third_party/blink/renderer/public') -+ path = self._update_basename(path) -+ return '#%s "%s"' % (include_or_import, path) -+ -+ match = self._checked_in_header_re.search(path) -+ if match: -+ if match.group(1) in self._basename_map: -+ path = 'third_party/blink/renderer/' + path[:match.start(1)] + self._basename_map[match.group(1)] -+ else: -+ path = 'third_party/blink/renderer/' + path -+ elif 'core/inspector/protocol/' not in path: -+ basename_start = path.rfind('/') + 1 -+ basename = path[basename_start:] -+ if basename in self._idl_generated_impl_headers: -+ path = path[:basename_start] + self._basename_map[basename] -+ elif basename.startswith('V8'): -+ path = path[:basename_start] + NameStyleConverter(basename[:len(basename) - 2]).to_snake_case() + '.h' -+ return '#%s "%s"' % (include_or_import, path) -+ -+ def _update_cpp_includes(self, content): -+ pattern = re.compile(r'#(include|import)\s+"((bindings|core|modules|platform|public|' + -+ r'third_party/WebKit/(Source|common|public))/[-_\w/.]+)"') -+ return pattern.sub(self._replace_include_path, content) -+ -+ def _replace_basename_only_include(self, subdir, source_path, match): -+ source_basename = match.group(1) -+ if source_basename in self._basename_map: -+ return '#include "third_party/blink/renderer/public/%s/%s"' % (subdir, self._basename_map[source_basename]) -+ _log.warning('Basename-only %s in %s', match.group(0), self._shorten_path(source_path)) -+ return match.group(0) -+ -+ def _update_basename_only_includes(self, content, source_path): -+ if not source_path.endswith('.h') or '/third_party/WebKit/public/' not in source_path.replace('\\', '/'): -+ return -+ # In public/ header files, we should replace |#include "WebFoo.h"| -+ # with |#include "third_party/blink/renderer/public/platform-or-web/web_foo.h"| -+ subdir = self._fs.basename(self._fs.dirname(source_path)) -+ # subdir is 'web' or 'platform'. -+ return re.sub(r'#include\s+"(\w+\.h)"', -+ partial(self._replace_basename_only_include, subdir, source_path), content) -+ -+ def _update_include_guard(self, content, source_path): -+ current_guard = re.sub(r'[.]', '_', self._fs.basename(source_path)) -+ new_path = relative_dest(self._fs, self._fs.relpath( -+ source_path, start=self._fs.join(self._repo_root, 'third_party', 'WebKit'))) -+ new_guard = 'THIRD_PARTY_BLINK_' + re.sub(r'[\\/.]', '_', new_path.upper()) + '_' -+ content = re.sub(r'#ifndef\s+(WTF_)?' + current_guard, '#ifndef ' + new_guard, content); -+ content = re.sub(r'#define\s+(WTF_)?' + current_guard, '#define ' + new_guard, content); -+ content = re.sub(r'#endif\s+//\s+(WTF_)?' + current_guard, '#endif // ' + new_guard, content); -+ return content -+ -+ def _update_single_file_content(self, file_path, replace_list, should_write=True): -+ full_path = self._fs.join(self._repo_root, file_path) -+ original_content = self._fs.read_text_file(full_path) -+ content = original_content -+ for command in replace_list: -+ if isinstance(command, tuple): -+ src, dest = command -+ content = content.replace(src, dest) -+ elif callable(command): -+ content = command(content) -+ else: -+ raise TypeError('A tuple or a function is expected.') -+ if content != original_content: -+ if should_write: -+ self._fs.write_text_file(full_path, content) -+ self._updated_files.append(full_path) -+ _log.info('Updated %s', file_path) -+ else: -+ _log.warning('%s does not contain specified source strings.', file_path) -+ -+ -+def main(): -+ logging.basicConfig(level=logging.DEBUG, -+ format='[%(asctime)s %(levelname)s %(name)s] %(message)s', -+ datefmt='%H:%M:%S') -+ parser = argparse.ArgumentParser(description='Blink source mover') -+ sub_parsers = parser.add_subparsers() -+ -+ update_parser = sub_parsers.add_parser('update') -+ update_parser.set_defaults(command='update') -+ update_parser.add_argument('--run', dest='run', action='store_true', -+ help='Update file contents') -+ -+ move_parser = sub_parsers.add_parser('move') -+ move_parser.set_defaults(command='move') -+ move_parser.add_argument('--git', dest='run_git', action='store_true', -+ help='Run |git mv| command instead of |mv|.') -+ -+ fixbranch_parser = sub_parsers.add_parser('fixbranch') -+ fixbranch_parser.set_defaults(command='fixbranch', run=True, run_git=True) -+ -+ options = parser.parse_args() -+ mover = MoveBlinkSource(FileSystem(), options, get_chromium_src_dir()) -+ if options.command == 'update': -+ mover.update() -+ elif options.command == 'move': -+ mover.move() -+ elif options.command == 'fixbranch': -+ mover.fix_branch() -+ -+ -+if __name__ == '__main__': -+ main() ---- /dev/null -+++ b/third_party/blink/tools/plan_blink_move.py -@@ -0,0 +1,96 @@ -+#!/usr/bin/env vpython -+# Copyright 2017 The Chromium Authors. All rights reserved. -+# Use of this source code is governed by a BSD-style license that can be -+# found in the LICENSE file. -+ -+import os -+import re -+import sys -+ -+sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', '..', -+ 'third_party', 'WebKit', 'Tools', 'Scripts')) -+from blinkpy.common.name_style_converter import NameStyleConverter -+from webkitpy.common.system.filesystem import FileSystem -+ -+ -+def relative_dest(fs, filename): -+ """Returns a destination path string for given filename. -+ -+ |filename| is a path relative to third_party/WebKit, and the resultant path -+ is relative to third_party/blink. -+ """ -+ dest = None -+ if filename.startswith('public'): -+ dest = re.sub(r'^public', 'renderer' + fs.sep + 'public', filename) -+ elif filename.startswith('Source'): -+ dest = re.sub(r'^Source', 'renderer', filename) -+ elif filename.startswith('common'): -+ dest = filename -+ else: -+ raise ValueError('|filename| must start with "common", "public", or "Source": %s' % filename) -+ if filename.endswith(('.h', '.cpp', '.mm', '.idl', '.typemap', 'Settings.json5')): -+ dirname, basename = fs.split(dest) -+ basename, ext = fs.splitext(basename) -+ # Skip some inspector-related files. #includes for these files are -+ # generated by a script outside of Blink. -+ if (re.match(r'Inspector.*Agent', basename) -+ or basename == 'InspectorTraceEvents' -+ or basename == 'PerformanceMonitor' -+ or basename == 'PlatformTraceEventsAgent'): -+ return dest -+ # Skip CSSProperty*. Some files are generated, and some files are -+ # checked-in. It's hard to handle them automatically. -+ if re.search(r'css[\\/]properties$', dirname): -+ return dest -+ if filename.endswith('.cpp'): -+ ext = '.cc' -+ # WebKit.h should be renamed to blink.h. -+ if basename == 'WebKit' and ext == '.h': -+ basename = 'blink' -+ if basename.lower() != basename: -+ basename = NameStyleConverter(basename).to_snake_case() -+ return fs.join(dirname, basename + ext) -+ return dest -+ -+ -+def start_with_list(name, prefixes): -+ if len(prefixes) == 0: -+ return True -+ for prefix in prefixes: -+ if name.startswith(prefix): -+ return True -+ return False -+ -+ -+def plan_blink_move(fs, prefixes): -+ """Returns (source, dest) path pairs. -+ -+ The source paths are relative to third_party/WebKit, -+ and the dest paths are relative to third_party/blink. -+ The paths use os.sep as the path part separator. -+ """ -+ blink_dir = fs.join(fs.dirname(__file__), '..') -+ webkit_dir = fs.join(blink_dir, '..', '..', 'third_party', 'WebKit') -+ source_files = fs.files_under(fs.join(webkit_dir, 'Source')) -+ source_files += fs.files_under(fs.join(webkit_dir, 'common')) -+ source_files += fs.files_under(fs.join(webkit_dir, 'public')) -+ -+ # It's possible to check git.exists() here, but we don't do it due to slow -+ # performance. We should check it just before executing git command. -+ -+ source_files = [f[len(webkit_dir) + 1:] for f in source_files] -+ return [(f, relative_dest(fs, f)) for f in source_files -+ if f.find('node_modules') == -1 and start_with_list(f, prefixes)] -+ -+ -+def main(): -+ fs = FileSystem() -+ file_pairs = plan_blink_move(fs, sys.argv[1:]) -+ print 'Show renaming plan. It contains files not in the repository.' -+ print '<Source path relative to third_party/WebKit> => <Destination path relative to third_party/blink>' -+ for pair in file_pairs: -+ print '%s\t=>\t%s' % pair -+ -+ -+if __name__ == '__main__': -+ main() diff --git a/community/chromium/chromium-73-gcc-1.patch b/community/chromium/chromium-73-gcc-1.patch deleted file mode 100644 index d7b5793ad4..0000000000 --- a/community/chromium/chromium-73-gcc-1.patch +++ /dev/null @@ -1,99 +0,0 @@ -From 130a5ae24a02daba8729ba2216bcaf3dbfacea69 Mon Sep 17 00:00:00 2001 -From: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com> -Date: Fri, 8 Feb 2019 16:58:38 +0000 -Subject: [PATCH] media::learning: Make LabelledExample's move assignment - operator noexcept -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -The GCC build is currently broken with an error like this: - - ../../media/learning/common/labelled_example.cc:20:1: error: function ‘media::learning::LabelledExample::LabelledExample(media::learning::LabelledExample&&)’ defaulted on its redeclaration with an exception-specification that differs from the implicit exception-specification ‘’ - LabelledExample::LabelledExample(LabelledExample&& rhs) noexcept = default; - ^~~~~~~~~~~~~~~ - -With GCC, having that noexcept marker requires all members to be marked with -noexcept themselves, and TargetValue was missing some assignment operators -and noexcept markers. - -clang is fine because we pass -fno-exceptions and it disables the same error -there, while GCC continues to raise it (bug 843143 and its corresponding CL -have a longer discussion on this issue). - -Bug: 819294 -Change-Id: Ide30932fc466ccb52d6883a82777e703dae48798 -Reviewed-on: https://chromium-review.googlesource.com/c/1458210 -Commit-Queue: Frank Liberato <liberato@chromium.org> -Reviewed-by: Frank Liberato <liberato@chromium.org> -Auto-Submit: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com> -Cr-Commit-Position: refs/heads/master@{#630355} ---- - media/learning/common/labelled_example.cc | 3 ++- - media/learning/common/labelled_example.h | 2 +- - media/learning/common/value.cc | 6 ++++++ - media/learning/common/value.h | 4 ++++ - 4 files changed, 13 insertions(+), 2 deletions(-) - -diff --git a/media/learning/common/labelled_example.cc b/media/learning/common/labelled_example.cc -index 76d08509298e..43e834f9f3cf 100644 ---- ./media/learning/common/labelled_example.cc -+++ ./media/learning/common/labelled_example.cc -@@ -59,7 +59,8 @@ bool LabelledExample::operator<(const LabelledExample& rhs) const { - LabelledExample& LabelledExample::operator=(const LabelledExample& rhs) = - default; - --LabelledExample& LabelledExample::operator=(LabelledExample&& rhs) = default; -+LabelledExample& LabelledExample::operator=(LabelledExample&& rhs) noexcept = -+ default; - - TrainingData::TrainingData() = default; - -diff --git a/media/learning/common/labelled_example.h b/media/learning/common/labelled_example.h -index 4f43c54e7a76..365abc3c0ebf 100644 ---- ./media/learning/common/labelled_example.h -+++ ./media/learning/common/labelled_example.h -@@ -40,7 +40,7 @@ struct COMPONENT_EXPORT(LEARNING_COMMON) LabelledExample { - bool operator<(const LabelledExample& rhs) const; - - LabelledExample& operator=(const LabelledExample& rhs); -- LabelledExample& operator=(LabelledExample&& rhs); -+ LabelledExample& operator=(LabelledExample&& rhs) noexcept; - - // Observed feature values. - // Note that to interpret these values, you probably need to have the -diff --git a/media/learning/common/value.cc b/media/learning/common/value.cc -index 9c9395c25d4e..12ea399d24c3 100644 ---- ./media/learning/common/value.cc -+++ ./media/learning/common/value.cc -@@ -23,6 +23,12 @@ Value::Value(const std::string& x) : value_(base::PersistentHash(x)) {} - - Value::Value(const Value& other) : value_(other.value_) {} - -+Value::Value(Value&& rhs) noexcept = default; -+ -+Value& Value::operator=(const Value& rhs) = default; -+ -+Value& Value::operator=(Value&& rhs) noexcept = default; -+ - bool Value::operator==(const Value& rhs) const { - return value_ == rhs.value_; - } -diff --git a/media/learning/common/value.h b/media/learning/common/value.h -index 0e64da961f34..62f4953f691c 100644 ---- ./media/learning/common/value.h -+++ ./media/learning/common/value.h -@@ -38,6 +38,10 @@ class COMPONENT_EXPORT(LEARNING_COMMON) Value { - explicit Value(const std::string& x); - - Value(const Value& other); -+ Value(Value&&) noexcept; -+ -+ Value& operator=(const Value&); -+ Value& operator=(Value&&) noexcept; - - bool operator==(const Value& rhs) const; - bool operator!=(const Value& rhs) const; --- -2.20.1 - diff --git a/community/chromium/chromium-73-gcc-2.patch b/community/chromium/chromium-73-gcc-2.patch deleted file mode 100644 index facd3fcfa2..0000000000 --- a/community/chromium/chromium-73-gcc-2.patch +++ /dev/null @@ -1,51 +0,0 @@ -From a5ba6f9bb7665040045dc0f8087407096630ad7b Mon Sep 17 00:00:00 2001 -From: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com> -Date: Fri, 8 Feb 2019 02:57:28 +0000 -Subject: [PATCH] color_utils: Use std::sqrt() instead of std::sqrtf() -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This fixes the build with libstdc++: - - ../../ui/gfx/color_utils.cc: In function ‘SkColor color_utils::SetDarkestColorForTesting(SkColor)’: - ../../ui/gfx/color_utils.cc:434:12: error: ‘sqrtf’ is not a member of ‘std’ - std::sqrtf((dark_luminance + 0.05f) * (kWhiteLuminance + 0.05f)) - 0.05f; - ^~~~~ - ../../ui/gfx/color_utils.cc:434:12: note: suggested alternative: ‘sqrt’ - std::sqrtf((dark_luminance + 0.05f) * (kWhiteLuminance + 0.05f)) - 0.05f; - ^~~~~ - sqrt - -sqrtf() is not formally part of C++14 as far as I can see even though libc++ -has it in <cmath>. Additionally, we're only dealing with floats in all parts -of the expression above, so using the float sqrt() overload should be -harmless anyway. - -Bug: 819294 -Change-Id: If6c7bf31819df97a761e6963def6d6506154c34d -Reviewed-on: https://chromium-review.googlesource.com/c/1458193 -Auto-Submit: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com> -Reviewed-by: Peter Kasting <pkasting@chromium.org> -Commit-Queue: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com> -Cr-Commit-Position: refs/heads/master@{#630140} ---- - ui/gfx/color_utils.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/ui/gfx/color_utils.cc b/ui/gfx/color_utils.cc -index c868cd54bac3..92ba1407d594 100644 ---- ./ui/gfx/color_utils.cc -+++ ./ui/gfx/color_utils.cc -@@ -431,7 +431,7 @@ SkColor SetDarkestColorForTesting(SkColor color) { - // GetContrastRatio(kWhiteLuminance, g_luminance_midpoint). The formula below - // can be verified by plugging it into how GetContrastRatio() operates. - g_luminance_midpoint = -- std::sqrtf((dark_luminance + 0.05f) * (kWhiteLuminance + 0.05f)) - 0.05f; -+ std::sqrt((dark_luminance + 0.05f) * (kWhiteLuminance + 0.05f)) - 0.05f; - - return previous_darkest_color; - } --- -2.20.1 - diff --git a/community/chromium/chromium-73-gcc-3.patch b/community/chromium/chromium-73-gcc-3.patch deleted file mode 100644 index 73ab49c542..0000000000 --- a/community/chromium/chromium-73-gcc-3.patch +++ /dev/null @@ -1,69 +0,0 @@ -From c33e832cc145c696d2157796c7640e659740dafa Mon Sep 17 00:00:00 2001 -From: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com> -Date: Fri, 8 Feb 2019 08:44:00 +0000 -Subject: [PATCH] quic_flags_impl: Fix GCC build after #618558 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Due to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84849, having -base::NoDestructor<T<U>> and passing an initializer list of Us does not -work if this is not done explicitly, as GCC incorrectly fails to determine -which constructor overload to use: - - ../../net/third_party/quic/platform/impl/quic_flags_impl.cc: In member function ‘bool quic::TypedQuicFlagHelper<T>::SetFlag(const string&) const [with T = bool; std::__cxx11::string = std::__cxx11::basic_string<char>]’: - ../../net/third_party/quic/platform/impl/quic_flags_impl.cc:156:41: error: call of overloaded ‘NoDestructor(<brace-enclosed initializer list>)’ is ambiguous - {"", "1", "t", "true", "y", "yes"}); - ^ - In file included from ../../net/third_party/quic/platform/impl/quic_flags_impl.h:16, - from ../../net/third_party/quic/platform/impl/quic_flags_impl.cc:5: - ../../base/no_destructor.h:62:3: note: candidate: ‘base::NoDestructor<T>::NoDestructor(const base::NoDestructor<T>&) [with T = std::set<std::__cxx11::basic_string<char> >]’ <deleted> - NoDestructor(const NoDestructor&) = delete; - ^~~~~~~~~~~~ - ../../base/no_destructor.h:60:12: note: candidate: ‘base::NoDestructor<T>::NoDestructor(T&&) [with T = std::set<std::__cxx11::basic_string<char> >]’ - explicit NoDestructor(T&& x) { new (storage_) T(std::move(x)); } - ^~~~~~~~~~~~ - ../../base/no_destructor.h:59:12: note: candidate: ‘base::NoDestructor<T>::NoDestructor(const T&) [with T = std::set<std::__cxx11::basic_string<char> >]’ - explicit NoDestructor(const T& x) { new (storage_) T(x); } - ^~~~~~~~~~~~ - -Explicitly use an std::initializer_list to make the build work everywhere. - -Bug: 819294 -Change-Id: I775be20e3766a88a656b58c94c40869cb1bee2a8 -Reviewed-on: https://chromium-review.googlesource.com/c/1458214 -Auto-Submit: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com> -Reviewed-by: Ryan Hamilton <rch@chromium.org> -Commit-Queue: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com> -Cr-Commit-Position: refs/heads/master@{#630249} ---- - net/third_party/quic/platform/impl/quic_flags_impl.cc | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/net/third_party/quic/platform/impl/quic_flags_impl.cc b/net/third_party/quic/platform/impl/quic_flags_impl.cc -index 5e6962d1e770..3fa45fc6892d 100644 ---- ./net/third_party/quic/platform/impl/quic_flags_impl.cc -+++ ./net/third_party/quic/platform/impl/quic_flags_impl.cc -@@ -5,6 +5,7 @@ - #include "net/third_party/quic/platform/impl/quic_flags_impl.h" - - #include <algorithm> -+#include <initializer_list> - #include <iostream> - #include <set> - -@@ -153,9 +154,9 @@ std::string QuicFlagRegistry::GetHelp() const { - template <> - bool TypedQuicFlagHelper<bool>::SetFlag(const std::string& s) const { - static const base::NoDestructor<std::set<std::string>> kTrueValues( -- {"", "1", "t", "true", "y", "yes"}); -+ std::initializer_list<std::string>({"", "1", "t", "true", "y", "yes"})); - static const base::NoDestructor<std::set<std::string>> kFalseValues( -- {"0", "f", "false", "n", "no"}); -+ std::initializer_list<std::string>({"0", "f", "false", "n", "no"})); - if (kTrueValues->find(base::ToLowerASCII(s)) != kTrueValues->end()) { - *flag_ = true; - return true; --- -2.20.1 - diff --git a/community/chromium/chromium-73-gcc-4.patch b/community/chromium/chromium-73-gcc-4.patch deleted file mode 100644 index be5c668c12..0000000000 --- a/community/chromium/chromium-73-gcc-4.patch +++ /dev/null @@ -1,59 +0,0 @@ -From bdd76190e54e6a0e11343dd19e4bf1d06956fa48 Mon Sep 17 00:00:00 2001 -From: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com> -Date: Wed, 13 Feb 2019 01:02:27 +0000 -Subject: [PATCH] BaseRenderingContext2D: Use base::CheckMul and simplify code - in putImageData() -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Follow-up to commit e0b3253a56 ("Fix image conversion truncation issues"). -The current code does not build with GCC due to -https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89287: - - ../../third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_context_2d.cc: In member function ‘void blink::BaseRenderingContext2D::putImageData(blink::ImageData*, int, int, int, int, int, int, blink::ExceptionState&)’: - ../../third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_context_2d.cc:1777:44: error: default type conversion can't deduce template argument for ‘template<class Dst, typename std::enable_if<base::internal::IsNumericRangeContained<Dst, long unsigned int, void>::value, void>::type* <anonymous> > constexpr base::internal::StrictNumeric<T>::operator Dst() const [with Dst = Dst; typename std::enable_if<base::internal::IsNumericRangeContained<Dst, T>::value>::type* <anonymous> = <enumerator>; T = long unsigned int]’ - new uint8_t[data_length.ValueOrDie()]); - ^ - -Work around it by using the more idiomatic base::CheckMul() with -AssignIfValid, so that we can have |data_length| be a size_t again and not -leave it to the compiler to figure out the type we want when creating the -|converted_pixels| array. - -Bug: 819294 -Change-Id: Id124cc4f3d749b45def4708e21e4badafd708578 -Reviewed-on: https://chromium-review.googlesource.com/c/1467201 -Auto-Submit: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com> -Commit-Queue: Kentaro Hara <haraken@chromium.org> -Reviewed-by: Kentaro Hara <haraken@chromium.org> -Cr-Commit-Position: refs/heads/master@{#631472} ---- - .../canvas/canvas2d/base_rendering_context_2d.cc | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -diff --git a/third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_context_2d.cc b/third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_context_2d.cc -index d9fa696c9a9d..34a8a202bfd3 100644 ---- a/third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_context_2d.cc -+++ ./third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_context_2d.cc -@@ -1769,12 +1769,12 @@ void BaseRenderingContext2D::putImageData(ImageData* data, - CanvasColorParams(ColorParams().ColorSpace(), PixelFormat(), kNonOpaque); - if (data_color_params.NeedsColorConversion(context_color_params) || - PixelFormat() == kF16CanvasPixelFormat) { -- base::CheckedNumeric<size_t> data_length = data->Size().Area(); -- data_length *= context_color_params.BytesPerPixel(); -- if (!data_length.IsValid()) -+ size_t data_length; -+ if (!base::CheckMul(data->Size().Area(), -+ context_color_params.BytesPerPixel()) -+ .AssignIfValid(&data_length)) - return; -- std::unique_ptr<uint8_t[]> converted_pixels( -- new uint8_t[data_length.ValueOrDie()]); -+ std::unique_ptr<uint8_t[]> converted_pixels(new uint8_t[data_length]); - if (data->ImageDataInCanvasColorSettings( - ColorParams().ColorSpace(), PixelFormat(), converted_pixels.get(), - kRGBAColorType)) { --- -2.20.1 - diff --git a/community/chromium/chromium-73-gcc-5.patch b/community/chromium/chromium-73-gcc-5.patch deleted file mode 100644 index b0c814180b..0000000000 --- a/community/chromium/chromium-73-gcc-5.patch +++ /dev/null @@ -1,65 +0,0 @@ -From 78b0f0dfa9e6f3c37b71102c01def92f1ab8c330 Mon Sep 17 00:00:00 2001 -From: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com> -Date: Wed, 13 Feb 2019 23:28:46 +0000 -Subject: [PATCH] CastActivityManager: Do not make DoLaunchSessionParams' move - constructor noexcept -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This fixes the GCC build: - - ../../chrome/browser/media/router/providers/cast/cast_activity_manager.cc:806:1: error: function ‘media_router::CastActivityManager::DoLaunchSessionParams::DoLaunchSessionParams(media_router::CastActivityManager::DoLaunchSessionParams&&)’ defaulted on its redeclaration with an exception-specification that differs from the implicit exception-specification ‘’ - CastActivityManager::DoLaunchSessionParams::DoLaunchSessionParams( - ^~~~~~~~~~~~~~~~~~~ - -With GCC, having that noexcept marker requires all members to be marked with -noexcept themselves, and MediaRoute, CastMediaSource and url::Origin need -the right annotations. Just making DoLaunchSessionParams not noexcept is the -least intrusive solution for now. - -clang is fine because we pass -fno-exceptions and it disables the same error -there, while GCC continues to raise it (bug 843143 and its corresponding CL -have a longer discussion on this issue). - -Bug: 819294 -Change-Id: Ia3a5fb60b5e74e68bd35cfa50e2fcc728b64e5eb -Reviewed-on: https://chromium-review.googlesource.com/c/1469942 -Commit-Queue: mark a. foltz <mfoltz@chromium.org> -Auto-Submit: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com> -Reviewed-by: mark a. foltz <mfoltz@chromium.org> -Cr-Commit-Position: refs/heads/master@{#631962} ---- - .../media/router/providers/cast/cast_activity_manager.cc | 2 +- - .../browser/media/router/providers/cast/cast_activity_manager.h | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/chrome/browser/media/router/providers/cast/cast_activity_manager.cc b/chrome/browser/media/router/providers/cast/cast_activity_manager.cc -index b7ee9695f69a..8569e0cd30a3 100644 ---- a/chrome/browser/media/router/providers/cast/cast_activity_manager.cc -+++ ./chrome/browser/media/router/providers/cast/cast_activity_manager.cc -@@ -804,7 +804,7 @@ CastActivityManager::DoLaunchSessionParams::DoLaunchSessionParams( - callback(std::move(callback)) {} - - CastActivityManager::DoLaunchSessionParams::DoLaunchSessionParams( -- DoLaunchSessionParams&& other) noexcept = default; -+ DoLaunchSessionParams&& other) = default; - - CastActivityManager::DoLaunchSessionParams::~DoLaunchSessionParams() = default; - -diff --git a/chrome/browser/media/router/providers/cast/cast_activity_manager.h b/chrome/browser/media/router/providers/cast/cast_activity_manager.h -index 325bffc725ee..08fe0ccca603 100644 ---- a/chrome/browser/media/router/providers/cast/cast_activity_manager.h -+++ ./chrome/browser/media/router/providers/cast/cast_activity_manager.h -@@ -295,7 +295,7 @@ class CastActivityManager : public cast_channel::CastMessageHandler::Observer, - const url::Origin& origin, - int tab_id, - mojom::MediaRouteProvider::CreateRouteCallback callback); -- DoLaunchSessionParams(DoLaunchSessionParams&& other) noexcept; -+ DoLaunchSessionParams(DoLaunchSessionParams&& other); - ~DoLaunchSessionParams(); - DoLaunchSessionParams& operator=(DoLaunchSessionParams&&) = delete; - --- -2.20.1 - diff --git a/community/chromium/chromium-73-gcc-6.patch b/community/chromium/chromium-73-gcc-6.patch deleted file mode 100644 index 40d85eb7af..0000000000 --- a/community/chromium/chromium-73-gcc-6.patch +++ /dev/null @@ -1,88 +0,0 @@ -From cf4c534f04c223f8a9d65407852e2a531a6d7fb6 Mon Sep 17 00:00:00 2001 -From: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com> -Date: Thu, 14 Feb 2019 22:22:21 +0000 -Subject: [PATCH] chrome/browser: Replace some forward declarations with actual - includes -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This fixes the GCC build which was failing like this: - - ../../base/scoped_observer.h: In instantiation of ‘void ScopedObserver<Source, Observer>::RemoveAll() [with Source = TabStripModel; Observer = TabStripModelObserver]’: - ../../base/scoped_observer.h:26:5: required from ‘ScopedObserver<Source, Observer>::~ScopedObserver() [with Source = TabStripModel; Observer = TabStripModelObserver]’ - ../../chrome/browser/ui/views/extensions/extension_popup.h:115:70: required from here - ../../base/scoped_observer.h:45:20: error: invalid use of incomplete type ‘class TabStripModel’ - sources_[i]->RemoveObserver(observer_); - ~~~~~~~~~~~~~^~~~~~~~~~~~~~ - -This is caused by https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89311 ("Brace -initialization needlessly invokes destructor"), i.e. having something like - - ScopedObserver<T, U> observer_{this}; - -in a header declaration requires T and U to be fully declared because -ScopedObserver's destructor references them. In a few cases, T was only -forward-declared. - -Bug: 819294 -Change-Id: Ie5b9dc2745e27d4532c5539e3845a8c9147a0595 -Reviewed-on: https://chromium-review.googlesource.com/c/1472576 -Auto-Submit: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com> -Commit-Queue: Alan Cutter <alancutter@chromium.org> -Reviewed-by: Finnur Thorarinsson <finnur@chromium.org> -Reviewed-by: Alan Cutter <alancutter@chromium.org> -Cr-Commit-Position: refs/heads/master@{#632385} ---- - chrome/browser/ui/views/extensions/extension_popup.cc | 1 - - chrome/browser/ui/views/extensions/extension_popup.h | 1 + - chrome/browser/ui/views/toolbar/extension_toolbar_menu_view.cc | 1 - - chrome/browser/ui/views/toolbar/extension_toolbar_menu_view.h | 2 +- - .../web_applications/extensions/bookmark_app_tab_helper.cc | 1 - - .../web_applications/extensions/bookmark_app_tab_helper.h | 2 +- - 6 files changed, 3 insertions(+), 5 deletions(-) - -diff --git a/chrome/browser/ui/views/extensions/extension_popup.cc b/chrome/browser/ui/views/extensions/extension_popup.cc -index 3f0985d383dd..57d16aba9e9f 100644 ---- a/chrome/browser/ui/views/extensions/extension_popup.cc -+++ ./chrome/browser/ui/views/extensions/extension_popup.cc -@@ -8,7 +8,6 @@ - #include "chrome/browser/devtools/devtools_window.h" - #include "chrome/browser/extensions/extension_view_host.h" - #include "chrome/browser/ui/browser.h" --#include "chrome/browser/ui/tabs/tab_strip_model.h" - #include "content/public/browser/devtools_agent_host.h" - #include "content/public/browser/notification_details.h" - #include "content/public/browser/notification_source.h" -diff --git a/chrome/browser/ui/views/extensions/extension_popup.h b/chrome/browser/ui/views/extensions/extension_popup.h -index 3661b5bda950..9018efa0fea5 100644 ---- a/chrome/browser/ui/views/extensions/extension_popup.h -+++ ./chrome/browser/ui/views/extensions/extension_popup.h -@@ -9,6 +9,7 @@ - #include "base/compiler_specific.h" - #include "base/macros.h" - #include "base/scoped_observer.h" -+#include "chrome/browser/ui/tabs/tab_strip_model.h" - #include "chrome/browser/ui/tabs/tab_strip_model_observer.h" - #include "chrome/browser/ui/views/extensions/extension_view_views.h" - #include "content/public/browser/devtools_agent_host_observer.h" -diff --git a/chrome/browser/ui/views/toolbar/extension_toolbar_menu_view.h b/chrome/browser/ui/views/toolbar/extension_toolbar_menu_view.h -index 2a3ea8e4f91f..ac44a4f05dec 100644 ---- a/chrome/browser/ui/views/toolbar/extension_toolbar_menu_view.h -+++ ./chrome/browser/ui/views/toolbar/extension_toolbar_menu_view.h -@@ -8,6 +8,7 @@ - #include "base/macros.h" - #include "base/memory/weak_ptr.h" - #include "base/scoped_observer.h" -+#include "chrome/browser/ui/toolbar/toolbar_actions_bar.h" - #include "chrome/browser/ui/toolbar/toolbar_actions_bar_observer.h" - #include "chrome/browser/ui/views/toolbar/app_menu_observer.h" - #include "ui/views/controls/scroll_view.h" -@@ -15,7 +16,6 @@ class AppMenu; - class AppMenu; - class Browser; - class BrowserActionsContainer; --class ToolbarActionsBar; - - namespace views { - class MenuItemView; diff --git a/community/chromium/gcc-arm.patch b/community/chromium/gcc-arm.patch index fdbb4bb7be..7498954ac6 100644 --- a/community/chromium/gcc-arm.patch +++ b/community/chromium/gcc-arm.patch @@ -1,11 +1,13 @@ ---- ./third_party/zlib/BUILD.gn.orig +diff --git a/third_party/zlib/BUILD.gn b/third_party/zlib/BUILD.gn +index 1a9cd3b..728a011 100644 +--- ./third_party/zlib/BUILD.gn +++ ./third_party/zlib/BUILD.gn -@@ -67,7 +67,7 @@ - # implement the CRC32* instructions. These are optional in ARMv8.0." - # - Fuchsia just added a syscall for feature detection. - # TODO(cavalcantii): crbug.com/810125. -- if (!is_ios && !is_fuchsia) { -+ if (is_clang && !is_ios && !is_fuchsia) { - defines = [ "CRC32_ARMV8_CRC32" ] - if (is_android) { - defines += [ "ARMV8_OS_ANDROID" ] +@@ -16,7 +16,7 @@ config("zlib_internal_config") { + + use_arm_neon_optimizations = false + if (current_cpu == "arm" || current_cpu == "arm64") { +- if (arm_use_neon) { ++ if (arm_use_neon && is_clang) { + use_arm_neon_optimizations = true + } + } diff --git a/community/chromium/gcc6.patch b/community/chromium/gcc6.patch deleted file mode 100644 index 036502c57e..0000000000 --- a/community/chromium/gcc6.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/build/config/linux/BUILD.gn b/build/config/linux/BUILD.gn -index 45fee9a..0769c41 100644 ---- build/config/linux/BUILD.gn -+++ build/config/linux/BUILD.gn -@@ -13,6 +13,7 @@ group("linux") { - # is applied to all targets. It is here to separate out the logic that is - # Linux-only. This is not applied to Android, but is applied to ChromeOS. - config("compiler") { -+ cflags_cc = [ "-fno-delete-null-pointer-checks" ] - } - - # This is included by reference in the //build/config/compiler:runtime_library diff --git a/community/chromium/gcc8-alignof.patch b/community/chromium/gcc8-alignof.patch deleted file mode 100644 index 90aa32872c..0000000000 --- a/community/chromium/gcc8-alignof.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- mojo/public/c/system/macros.h.orig 2018-09-06 10:11:54.336432699 -0400 -+++ mojo/public/c/system/macros.h 2018-09-06 10:13:56.555727572 -0400 -@@ -27,7 +27,13 @@ - (sizeof(void*) == 4 ? 32 : 0) - - // Like the C++11 |alignof| operator. --#if __cplusplus >= 201103L -+#if defined(__GNUC__) && __GNUC__ >= 8 -+// GCC 8 has changed the alignof operator to return the minimal alignment -+// required by the target ABI, instead of the preferred alignment. -+// This means that on 32-bit x86, it will return 4 instead of 8. -+// Use __alignof__ instead to avoid this. -+#define MOJO_ALIGNOF(type) __alignof__(type) -+#elif __cplusplus >= 201103L - #define MOJO_ALIGNOF(type) alignof(type) - #elif defined(__GNUC__) - #define MOJO_ALIGNOF(type) __alignof__(type) diff --git a/community/chromium/musl-hacks.patch b/community/chromium/musl-hacks.patch index eff59ae5bc..d7c61a625b 100644 --- a/community/chromium/musl-hacks.patch +++ b/community/chromium/musl-hacks.patch @@ -1,5 +1,5 @@ ---- base/debug/stack_trace.cc.orig 2018-12-08 14:11:25.303475116 +0100 -+++ base/debug/stack_trace.cc 2018-12-08 18:00:43.874946999 +0100 +--- ./base/debug/stack_trace.cc.orig 2018-12-08 14:11:25.303475116 +0100 ++++ ./base/debug/stack_trace.cc 2018-12-08 18:00:43.874946999 +0100 @@ -229,7 +229,7 @@ } std::string StackTrace::ToStringWithPrefix(const char* prefix_string) const { @@ -9,3 +9,14 @@ OutputToStreamWithPrefix(&stream, prefix_string); #endif return stream.str(); +--- ./net/socket/udp_socket_posix.cc.orig 2019-07-03 13:13:46.034342649 -0400 ++++ ./net/socket/udp_socket_posix.cc 2019-07-03 13:23:53.117081909 -0400 +@@ -1194,7 +1194,7 @@ + msg_iov->push_back({const_cast<char*>(buffer->data()), buffer->length()}); + msgvec->reserve(buffers.size()); + for (size_t j = 0; j < buffers.size(); j++) +- msgvec->push_back({{nullptr, 0, &msg_iov[j], 1, nullptr, 0, 0}, 0}); ++ msgvec->push_back({{nullptr, 0, &msg_iov[j], 1, 0, 0, 0}, 0}); + int result = HANDLE_EINTR(Sendmmsg(fd, &msgvec[0], buffers.size(), 0)); + SendResult send_result(0, 0, std::move(buffers)); + if (result < 0) { diff --git a/community/chromium/musl-sandbox.patch b/community/chromium/musl-sandbox.patch index 34717ec82c..5a7239fd9e 100644 --- a/community/chromium/musl-sandbox.patch +++ b/community/chromium/musl-sandbox.patch @@ -1,17 +1,12 @@ -diff --git sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc -index 68ce32a..bb779c2 100644 ---- sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc -+++ sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc -@@ -137,23 +137,13 @@ namespace sandbox { - // CLONE_VM, nor CLONE_THREAD, which includes all fork() implementations. +diff --git a/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc b/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc +index 348ab6e..4550f9e 100644 +--- ./sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc ++++ ./sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc +@@ -139,21 +139,11 @@ namespace sandbox { + // present (as in newer versions of posix_spawn). ResultExpr RestrictCloneToThreadsAndEPERMFork() { const Arg<unsigned long> flags(0); -+ const int required = CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND | -+ CLONE_THREAD | CLONE_SYSVSEM; -+ const int safe = CLONE_SETTLS | CLONE_PARENT_SETTID | CLONE_CHILD_CLEARTID | -+ CLONE_DETACHED; -+ const BoolExpr thread_clone_ok = (flags&~safe)==required; - +- - // TODO(mdempsky): Extend DSL to support (flags & ~mask1) == mask2. - const uint64_t kAndroidCloneMask = CLONE_VM | CLONE_FS | CLONE_FILES | - CLONE_SIGHAND | CLONE_THREAD | @@ -26,10 +21,21 @@ index 68ce32a..bb779c2 100644 - const BoolExpr android_test = - AnyOf(flags == kAndroidCloneMask, flags == kObsoleteAndroidCloneMask, - flags == kGlibcPthreadFlags); -- ++ const int required = CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND | ++ CLONE_THREAD | CLONE_SYSVSEM; ++ const int safe = CLONE_SETTLS | CLONE_PARENT_SETTID | CLONE_CHILD_CLEARTID | ++ CLONE_DETACHED; ++ const BoolExpr thread_clone_ok = (flags&~safe)==required; + + // The following two flags are the two important flags in any vfork-emulating + // clone call. EPERM any clone call that contains both of them. +@@ -163,7 +153,7 @@ ResultExpr RestrictCloneToThreadsAndEPERMFork() { + AnyOf((flags & (CLONE_VM | CLONE_THREAD)) == 0, + (flags & kImportantCloneVforkFlags) == kImportantCloneVforkFlags); + - return If(IsAndroid() ? android_test : glibc_test, Allow()) + return If(thread_clone_ok, Allow()) - .ElseIf((flags & (CLONE_VM | CLONE_THREAD)) == 0, Error(EPERM)) + .ElseIf(is_fork_or_clone_vfork, Error(EPERM)) .Else(CrashSIGSYSClone()); } diff --git sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc diff --git a/community/chromium/musl-v8-fix-deadlock.patch b/community/chromium/musl-v8-fix-deadlock.patch deleted file mode 100644 index dff0d88d2c..0000000000 --- a/community/chromium/musl-v8-fix-deadlock.patch +++ /dev/null @@ -1,21 +0,0 @@ -Release the mutex before mess with the stack guard - -Upstream report: https://bugs.chromium.org/p/v8/issues/detail?id=8881 - -diff --git a/v8/src/compiler-dispatcher/optimizing-compile-dispatcher.cc b/v8/src/compiler-dispatcher/optimizing-compile-dispatcher.cc -index 09226e1..29a1871 100644 ---- ./v8/src/compiler-dispatcher/optimizing-compile-dispatcher.cc -+++ ./v8/src/compiler-dispatcher/optimizing-compile-dispatcher.cc -@@ -132,8 +132,10 @@ void OptimizingCompileDispatcher::CompileNext(OptimizedCompilationJob* job) { - // The function may have already been optimized by OSR. Simply continue. - // Use a mutex to make sure that functions marked for install - // are always also queued. -- base::MutexGuard access_output_queue_(&output_queue_mutex_); -- output_queue_.push(job); -+ { -+ base::MutexGuard access_output_queue_(&output_queue_mutex_); -+ output_queue_.push(job); -+ } - isolate_->stack_guard()->RequestInstallCode(); - } - diff --git a/community/chromium/nasm.patch b/community/chromium/nasm.patch new file mode 100644 index 0000000000..f5f85bc00f --- /dev/null +++ b/community/chromium/nasm.patch @@ -0,0 +1,13 @@ +diff --git a/third_party/nasm/config/config-linux.h b/third_party/nasm/config/config-linux.h +index 7eb7c20..3bdc2eb 100644 +--- ./third_party/nasm/config/config-linux.h ++++ ./third_party/nasm/config/config-linux.h +@@ -117,7 +117,7 @@ + #define HAVE_ACCESS 1 + + /* Define to 1 if you have the `canonicalize_file_name' function. */ +-#define HAVE_CANONICALIZE_FILE_NAME 1 ++// #define HAVE_CANONICALIZE_FILE_NAME 1 + + /* Define to 1 if you have the `cpu_to_le16' intrinsic function. */ + /* #undef HAVE_CPU_TO_LE16 */ diff --git a/community/chromium/no-execinfo.patch b/community/chromium/no-execinfo.patch index 8610ecc23d..4bfda6638c 100644 --- a/community/chromium/no-execinfo.patch +++ b/community/chromium/no-execinfo.patch @@ -70,14 +70,3 @@ void StackTrace::OutputToStreamWithPrefix(std::ostream* os, const char* prefix_string) const { StreamBacktraceOutputHandler handler(os); ---- third_party/blink/renderer/platform/wtf/assertions.cc.orig 2017-09-11 12:27:06.948854813 +0000 -+++ third_party/blink/renderer/platform/wtf/assertions.cc 2017-09-11 12:29:34.639862433 +0000 -@@ -56,7 +56,7 @@ - #include <windows.h> - #endif - --#if defined(OS_MACOSX) || (defined(OS_LINUX) && !defined(__UCLIBC__)) -+#if defined(OS_MACOSX) || (defined(OS_LINUX) && defined(__GLIBC__)) - #include <cxxabi.h> - #include <dlfcn.h> - #include <execinfo.h> diff --git a/community/chromium/resolver.patch b/community/chromium/resolver.patch index 8664aaf376..da9028f6c7 100644 --- a/community/chromium/resolver.patch +++ b/community/chromium/resolver.patch @@ -1,4 +1,6 @@ ---- ./net/dns/dns_reloader.cc.orig +diff --git a/net/dns/dns_reloader.cc b/net/dns/dns_reloader.cc +index 03e248c..1a7b237 100644 +--- ./net/dns/dns_reloader.cc +++ ./net/dns/dns_reloader.cc @@ -4,8 +4,7 @@ @@ -10,23 +12,11 @@ #include <resolv.h> ---- ./net/dns/host_resolver_proc.cc.orig -+++ ./net/dns/host_resolver_proc.cc -@@ -190,8 +190,7 @@ - // Restrict result set to only this socket type to avoid duplicates. - hints.ai_socktype = SOCK_STREAM; - --#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_OPENBSD) && \ -- !defined(OS_ANDROID) && !defined(OS_FUCHSIA) -+#if defined(__GLIBC__) - DnsReloaderMaybeReload(); - #endif - int err = getaddrinfo(host.c_str(), NULL, &hints, &ai); -diff --git a/net/dns/host_resolver_impl.cc b/net/dns/host_resolver_impl.cc -index bdf16b8..b234edd 100644 ---- ./net/dns/host_resolver_impl.cc -+++ ./net/dns/host_resolver_impl.cc -@@ -2018,8 +2018,7 @@ HostResolverImpl::HostResolverImpl(const Options& options, NetLog* net_log) +diff --git a/net/dns/host_resolver_manager.cc b/net/dns/host_resolver_manager.cc +index 3c75dde..c748d94 100644 +--- ./net/dns/host_resolver_manager.cc ++++ ./net/dns/host_resolver_manager.cc +@@ -2266,8 +2266,7 @@ HostResolverManager::HostResolverManager(const Options& options, NetworkChangeNotifier::AddIPAddressObserver(this); NetworkChangeNotifier::AddConnectionTypeObserver(this); NetworkChangeNotifier::AddDNSObserver(this); @@ -36,3 +26,17 @@ index bdf16b8..b234edd 100644 EnsureDnsReloaderInit(); #endif +diff --git a/net/dns/host_resolver_proc.cc b/net/dns/host_resolver_proc.cc +index 90d9958..71d9b4a 100644 +--- ./net/dns/host_resolver_proc.cc ++++ ./net/dns/host_resolver_proc.cc +@@ -197,8 +197,7 @@ int SystemHostResolverCall(const std::string& host, + base::ScopedBlockingCall scoped_blocking_call(FROM_HERE, + base::BlockingType::WILL_BLOCK); + +-#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_OPENBSD) && \ +- !defined(OS_ANDROID) && !defined(OS_FUCHSIA) ++#if defined(__GLIBC__) + DnsReloaderMaybeReload(); + #endif + int err = getaddrinfo(host.c_str(), nullptr, &hints, &ai); diff --git a/community/chromium/secure_getenv.patch b/community/chromium/secure_getenv.patch index 842a11532d..9ab048b626 100644 --- a/community/chromium/secure_getenv.patch +++ b/community/chromium/secure_getenv.patch @@ -1,16 +1,16 @@ --- ./third_party/angle/third_party/vulkan-loader/src/loader/loader.c.orig +++ ./third_party/angle/third_party/vulkan-loader/src/loader/loader.c -@@ -37,6 +37,9 @@ - #include <CoreFoundation/CoreFoundation.h> - #include <sys/param.h> - #endif +@@ -35,6 +35,9 @@ + #include <stdbool.h> + #include <string.h> + #include <stddef.h> +#if defined(HAVE_GETAUXVAL) +#include <sys/auxv.h> +#endif - #include <sys/types.h> - #if defined(_WIN32) - #include "dirent_on_windows.h" -@@ -240,6 +243,8 @@ + + #if defined(__APPLE__) + #include <CoreFoundation/CoreFoundation.h> +@@ -256,6 +259,8 @@ #elif defined(HAVE___SECURE_GETENV) (void)inst; return __secure_getenv(name); diff --git a/community/chromium/swiftshader.patch b/community/chromium/swiftshader.patch index 75f161593f..5b2deb86fc 100644 --- a/community/chromium/swiftshader.patch +++ b/community/chromium/swiftshader.patch @@ -8,41 +8,6 @@ #include <unistd.h> #include <netdb.h> #include <netinet/in.h> ---- ./third_party/swiftshader/third_party/LLVM/include-linux/llvm/Config/config.h -+++ ./third_party/swiftshader/third_party/LLVM/include-linux/llvm/Config/config.h -@@ -125,7 +125,7 @@ - #define HAVE_ERROR_T 1 - - /* Define to 1 if you have the <execinfo.h> header file. */ --#define HAVE_EXECINFO_H 1 -+/* #undef HAVE_EXECINFO_H */ - - /* Define to 1 if you have the <fcntl.h> header file. */ - #define HAVE_FCNTL_H 1 -@@ -240,10 +240,10 @@ - /* #undef HAVE_MACH_O_DYLD_H */ - - /* Define if mallinfo() is available on this platform. */ --#define HAVE_MALLINFO 1 -+/* #undef HAVE_MALLINFO */ - - /* Define to 1 if you have the <malloc.h> header file. */ --#define HAVE_MALLOC_H 1 -+/* #undef HAVE_MALLOC_H */ - - /* Define to 1 if you have the <malloc/malloc.h> header file. */ - /* #undef HAVE_MALLOC_MALLOC_H */ ---- ./third_party/swiftshader/third_party/LLVM/lib/Support/DynamicLibrary.cpp -+++ ./third_party/swiftshader/third_party/LLVM/lib/Support/DynamicLibrary.cpp -@@ -160,7 +160,7 @@ void* DynamicLibrary::SearchForAddressOfSymbol(const char *symbolName) { - // On linux we have a weird situation. The stderr/out/in symbols are both - // macros and global variables because of standards requirements. So, we - // boldly use the EXPLICIT_SYMBOL macro without checking for a #define first. --#if defined(__linux__) && !defined(__ANDROID__) -+#if defined(__GLIBC__) - { - EXPLICIT_SYMBOL(stderr); - EXPLICIT_SYMBOL(stdout); --- ./third_party/swiftshader/third_party/llvm-subzero/build/Linux/include/llvm/Config/config.h +++ ./third_party/swiftshader/third_party/llvm-subzero/build/Linux/include/llvm/Config/config.h @@ -14,7 +14,7 @@ |