diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2020-04-20 06:25:55 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2020-04-20 14:35:51 +0000 |
commit | 31b7a849b45f82dbe9784f3d6c15dea098af7041 (patch) | |
tree | 02e636fa4ad132e6a32ca5d555bb221956957c66 /community/chromium | |
parent | 3070ca7ff0d0e5a4417f40cd226896705a9751cc (diff) | |
download | aports-31b7a849b45f82dbe9784f3d6c15dea098af7041.tar.bz2 aports-31b7a849b45f82dbe9784f3d6c15dea098af7041.tar.xz |
community/chromium: upgrade to 81.0.4044.113
Diffstat (limited to 'community/chromium')
12 files changed, 175 insertions, 809 deletions
diff --git a/community/chromium/APKBUILD b/community/chromium/APKBUILD index 70b982e3b8..0845de1b1b 100644 --- a/community/chromium/APKBUILD +++ b/community/chromium/APKBUILD @@ -1,8 +1,8 @@ # Contributor: Carlo Landmeter <clandmeter@gmail.com> # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=chromium -pkgver=80.0.3987.149 -pkgrel=1 +pkgver=81.0.4044.113 +pkgrel=0 pkgdesc="Chromium web browser" url="https://www.chromium.org/Home" arch="x86_64 aarch64 armv7" @@ -83,13 +83,6 @@ source="https://commondatastorage.googleapis.com/chromium-browser-official/chrom chromium.desktop google-api.keys - upstream-cros-search-service-Include-cmath-for-std-pow.patch - upstream-fix-building-with-unbundled-libxml.patch - upstream-move-RemoteTreeNode-declaration.patch - upstream-rebuild-Linux-frame-button-cache-when-activation.patch - upstream-rename-Relayout-in-DesktopWindowTreeHostPlatform.patch - upstream-sync-enable-USSPasswords-by-default.patch - default-pthread-stacksize.patch musl-fixes.patch musl-fixes-breakpad.patch @@ -101,7 +94,6 @@ source="https://commondatastorage.googleapis.com/chromium-browser-official/chrom resolver.patch swiftshader.patch create-extra-view-redefinition.patch - llvm-remove-unsupported-compiler-warnings.patch chromium-use-alpine-target.patch media-base.patch @@ -113,8 +105,6 @@ source="https://commondatastorage.googleapis.com/chromium-browser-official/chrom gcc-arm.patch aarch64-fixes.patch elf-arm.patch - - gn_bootstrap_ninja.patch " # secfixes: @@ -130,12 +120,8 @@ else fi prepare() { - local i - for i in $source; do - case $i in - *.patch) msg $i; patch -p0 -i "$srcdir"/$i;; - esac - done + patch_args="-p0" + default_prepare # https://groups.google.com/a/chromium.org/d/topic/chromium-packagers/9JX1N2nf4PU/discussion touch chrome/test/data/webui/i18n_process_css_test.html @@ -178,11 +164,6 @@ prepare() { -delete done - # workaround missing files for arm - for i in safe_conversions_arm_impl.h safe_math_arm_impl.h; do - ln -s ../../../../base/numerics/$i tools/gn/base/numerics/$i - done - msg "Replacing gn files" python2 build/linux/unbundle/replace_gn_files.py --system-libraries \ $use_system @@ -334,21 +315,15 @@ chromedriver() { mv "$pkgdir"/usr/bin/chromedriver "$subpkgdir"/usr/bin } -sha512sums="5abbf8ff754937a3af566474457b5cd9bbcac0e8b1a52fd95180fcf69b12515278423887668512b3136de72ebe15048c4bd79572511f68189d1e86ace4ca30cb chromium-80.0.3987.149.tar.xz +sha512sums="dfdf71fb8c98baf722aded7815f773850368b0bc7cb74d8c994c0c3f7dcf0157a0969ba501774a107a00c1fe18d08f90fcf8ea957ffb19bed5007d188ffa2010 chromium-81.0.4044.113.tar.xz a3bb959c65944ae2fb765725cedcffd743a58bc0c2cd1f1999d15fe79801d00f3474b08b4ed7b48859ed921eb57093d0ad09d90f201d729ed9b8a419a591ed29 pstables-2.8.h b9a810416dd7a8ffc3a5ced85ad9acebda1665bd08a57eec7b189698cc5f74d2c3fd69044e20fcb83297a43214b2772a1312b2c6122ea0eb716abacf39524d60 chromium-launcher.sh f6d962b9e4c22dd42183df3db5d3202dab33eccecafb1bf63ca678147289581262db1e5e64cbe8f9c212beefb0a6717bb8d311e497f56b55fe95b8bab2db493f chromium.conf e182c998a43d22d1c76a86c561619afd1fca8c2be668265ad5e2f81a3806f7a154272cc027a2f8b370fb69446892c69e5967a4be76082325c14245ee7915234c chromium.desktop 2d8237a940ea691bd10b08315429677a587f7ef9692a0cca53bfd066eae82998a6c71f402a8669e9de39f94d7f3280745d1628ea6eac5d76ca7116844d4e0dac google-api.keys -75b93ccb6730ba6f516edef179a497275db623f4a8270d2cc9cd26548e0e41e6ee2d600438af8cbd7be3ebc9ad562cac2f58792eb4d2d2be2cf59f45a0253811 upstream-cros-search-service-Include-cmath-for-std-pow.patch -7e700b6c33188f562bdb77aea795abd44d6d0a874c65192d2f81584cb34ca142b4d1117626a7cfd209729865a82d605aaf81390af6fa406ed3b1423511815131 upstream-fix-building-with-unbundled-libxml.patch -902d7b08a25323551c1ca671cd2c1889bce0a9b017d4bc8f4abb7ccc654a3cbfb7b2b0652e17f182e018c1d1e3b35328a428e394691c38408e637613a9c76bbc upstream-move-RemoteTreeNode-declaration.patch -ad0e7e32e5eadbc935abd8f01a360e04133e387c6dc669ca350eaa586cce901682afeb2a61abd8c6380bcc919a76e16a9f1fe516c780bb0af78ed1c9d4327bc2 upstream-rebuild-Linux-frame-button-cache-when-activation.patch -082bc4340b49c12b519e217f0580ce94cb9bf35901f94ae19f9069530efce3ff3f03b39338724f3f517c3deb724e84d7c95f83b07419b847e245459056c465e2 upstream-rename-Relayout-in-DesktopWindowTreeHostPlatform.patch -59c9bf861caf06e6fe2f69214f55f73753008930716f35a0d5c2cc18f0b5178f7cb104922031a58f4831fcefebd31c9921706f3dbda32ba029487555d52d2254 upstream-sync-enable-USSPasswords-by-default.patch b726ef2ecfe7d471e60d67de1e05847d214df6093b41bb2055652a9028327af19a8b10e7175467240f4dfec9e3ae97a6c4666bfd2cd6cb436c54656a085653ae default-pthread-stacksize.patch -5c61e97621606a43ea91ab64b7432943cceeb8af951f10f6db07d9cb8f8d925e5f5e4c55618d0075e68397464e2315b5c47564e9c4c046652c5636a496f4a335 musl-fixes.patch -ecb4bf5653bf3d987970d6c708f179bfc4b7d370b59d412bdf20d1f993585ee2f619caf202e7f239cb47111c8a72557c364cf60b7dd17e172e6629792eea8f29 musl-fixes-breakpad.patch +0321c55b51af6265c39836d9e4ea5e2dde4efa9702a10a0c8fd77461f6933b349802c155df6d39072cd3b2963fdb1a4de4bfa1da1d94a95186d6395fcae8510b musl-fixes.patch +893211a39e5b5b2e1dabcac9b232d34c6048304b706029ebb25023718a1c73d9afd889e811002351befa9db5f3b4814b25c5911a3230a9729696e2b15f2bf35b musl-fixes-breakpad.patch d78479bdea1c847d6e1506421a3eb716031cd24aa979f0e653c0406b507a5a89924d15e6c603e291f1b17751fb0788571f42699214fd1462334c0daabd584ffe musl-hacks.patch 919f13a2cd65673f267321cf95c5410e65bc5264d6704d0791b25d39111282bedb425bd9824dde3b67422cfb874c86a9383ded686e39cfd4aac239edaf41cfc8 musl-libc++.patch 8d57d524978852ded41394793d611083d82241ecbc64808bbf5759d7bf0db0fe92af84935cf9e556d555f8d9963c847611413fa68634202f817b671be414c224 musl-sandbox.patch @@ -357,14 +332,12 @@ d78479bdea1c847d6e1506421a3eb716031cd24aa979f0e653c0406b507a5a89924d15e6c603e291 b1edab2a782a0fd554d0fcee893374282ceca797e9595f1b4dd1c4dbeb65a5d6c368f2000f8d44baea3a53880621fa33c456b663d72960e94f2e05f9ec4f7965 resolver.patch f4265df7532625070c51ac43466e3e0f21e696f90c3b6040ef62a21defa7666203ff8219d9c9a5bebc011024aff300fbcbd941cebd0df59c4bc068d8f290221e swiftshader.patch aa5e2b73196ea8db15ff995964032d3afcda9acf3f06bd3b196d9abfec022c462284a703e713b0ab7e613a384e8eaa271413025f18948443f58151974984670b create-extra-view-redefinition.patch -ae600a6a8cfc6cb0daf6e330623d84d460992ecedc0702ed0820fb7d0c59c73df5aa0c8c451bc768e82d4cabc1f386b740def2e6152b719b0fe8afd2a99a49a0 llvm-remove-unsupported-compiler-warnings.patch cf9970ef403ff7a68bf08c0ba5e681eec459fcb1afb6859e5a80f4874f1b9a656377b4540eeb5208ddec570efa206f147e32718c687fa29ca3acc4fde6e8cbe8 chromium-use-alpine-target.patch 599f5ef338b5797e04436bdc88921c31365d2dea2613d40053be6e774f654e2889efb0c0bd55c2c5044a6805510fbc337da555971169a75d584fac93e18256ac media-base.patch -fca59f9728aa05253688b2ba8d6a610832bc28bd3057636c95e64759d5b006c80e84c549b6037f7dad90d9b8770bd79658b1474274141fa114a48e8a6f0f17c8 musl-crashpad.patch +2e5a83826239849d096aead033eb519338b84e6fbbf58abfcd7cfe40d0b3070b66bcc825ec84406484d73d1a333f1b9d23a8ab44987ab5c8b187076c84cd668b musl-crashpad.patch 556cc2ba28184a75745f13c673605327f5be590be179eb3f941dc0abded854a814e5da1432a28fb8d4dcdcd66ffd4c94ee1a8824d2cd93b632f48e9310dbc3fa musl-v8-monotonic-pthread-cont_timedwait.patch 7957aae04e8ef3badbc98c982ba1acb1b9ef5e665440116c704512f11554d7b64ba3643b7ff7d00476a6686324033b0cf762deb78ce798619226380953b9dc9c nasm.patch 56a357668c0928bc488ccec8f53fd37fccbaefe0a185ceaf067c8c39e0fae3d2b61ca010ccabc785bec0f2e86b19f37cebb3ac344225aa8d7651c822e48c6064 gcc-fno-delete-null-pointer-checks.patch 4a7ea09356823392f75ce188973422c8978fd84f238ed0f533376c50030210323b27e8401749bfb8ebe7d02d29c4b6067259f0a1fa55f0916e9c82c29ff3a420 gcc-arm.patch 7f81d97cce25d5530a2cb84105247e3707e344a285b0ac73c2f9275eae4bcc5aea6ff27307ec6607f95c13e9e724fab0e15e6fb8a33b3a9bfe0b3dbfdfb33ae6 aarch64-fixes.patch -bddf4ddaed63fbea15083d7a9e19173aa204fcdce9b4fdde2f673df71c79e56c313325a090af86e3df03034188c83c40e96b497f1f83057ed6bbbe8343490d4a elf-arm.patch -834e732959dd4a1c5ec847185c8f025307c7f2b79d9e87079a7bea0cbc0b7324cb660e302a462879309e95220117acac1d31c8eb276c78b5c400b2db2d59fda8 gn_bootstrap_ninja.patch" +bddf4ddaed63fbea15083d7a9e19173aa204fcdce9b4fdde2f673df71c79e56c313325a090af86e3df03034188c83c40e96b497f1f83057ed6bbbe8343490d4a elf-arm.patch" diff --git a/community/chromium/gn_bootstrap_ninja.patch b/community/chromium/gn_bootstrap_ninja.patch deleted file mode 100644 index 88dc0a6500..0000000000 --- a/community/chromium/gn_bootstrap_ninja.patch +++ /dev/null @@ -1,32 +0,0 @@ -Patch by Michael Forney <mforney@mforney.org> - -Already merged https://chromium-review.googlesource.com/c/chromium/src/+/1975453 - ---- tools/gn/bootstrap/bootstrap.py -+++ tools/gn/bootstrap/bootstrap.py -@@ -70,6 +70,7 @@ - out_dir = os.path.join(SRC_ROOT, build_rel) - gn_path = options.output or os.path.join(out_dir, 'gn') - gn_build_dir = os.path.join(out_dir, 'gn_build') -+ ninja_binary = os.environ.get('NINJA', 'ninja') - - # TODO(thomasanderson): Remove this once Ubuntu Trusty reaches EOL, or when - # Chromium's infrastructure is upgraded from Trusty to Xenial, whichever comes -@@ -90,7 +91,7 @@ - os.environ.get('CFLAGS', '').split() + - os.environ.get('CXXFLAGS', '').split()), - ]) + '\n') -- subprocess.check_call(['ninja', '-C', libcxx_dir]) -+ subprocess.check_call([ninja_binary, '-C', libcxx_dir]) - shutil.copy2(os.path.join(gn_build_dir, 'libc++.gn.so'), out_dir) - - def append_to_env(var, vals): -@@ -120,7 +121,7 @@ - shutil.copy2( - os.path.join(BOOTSTRAP_DIR, 'last_commit_position.h'), gn_build_dir) - subprocess.check_call( -- ['ninja', '-C', gn_build_dir, 'gn', '-w', 'dupbuild=err']) -+ [ninja_binary, '-C', gn_build_dir, '-w', 'dupbuild=err', 'gn']) - shutil.copy2(os.path.join(gn_build_dir, 'gn'), gn_path) - - if not options.skip_generate_buildfiles: diff --git a/community/chromium/llvm-remove-unsupported-compiler-warnings.patch b/community/chromium/llvm-remove-unsupported-compiler-warnings.patch deleted file mode 100644 index 78cfa4a18c..0000000000 --- a/community/chromium/llvm-remove-unsupported-compiler-warnings.patch +++ /dev/null @@ -1,49 +0,0 @@ -Author: Olivier Tilloy <olivier.tilloy@canonical.com> -Description: Do not use warning flags that require a newer Clang - -Index: dev/build/config/compiler/BUILD.gn -=================================================================== ---- build/config/compiler/BUILD.gn -+++ build/config/compiler/BUILD.gn -@@ -708,14 +708,6 @@ - ldflags += [ "-Wl,--no-rosegment" ] - } - -- # This flag enforces that member pointer base types are complete. It helps -- # prevent us from running into problems in the Microsoft C++ ABI (see -- # https://crbug.com/847724). -- if (is_clang && !is_nacl && target_os != "chromeos" && !use_xcode_clang && -- (is_win || use_custom_libcxx)) { -- cflags += [ "-fcomplete-member-pointers" ] -- } -- - # Pass the same C/C++ flags to the objective C/C++ compiler. - cflags_objc += cflags_c - cflags_objcc += cflags_cc -@@ -1516,26 +1508,6 @@ - if (current_toolchain == host_toolchain || !use_xcode_clang) { - # Flags NaCl (Clang 3.7) and Xcode 9.2 (Clang clang-900.0.39.2) do not - # recognize. -- cflags += [ -- # Ignore warnings about MSVC optimization pragmas. -- # TODO(thakis): Only for no_chromium_code? http://crbug.com/912662 -- "-Wno-ignored-pragma-optimize", -- -- # TODO(https://crbug.com/989932): Evaluate and possibly enable. -- "-Wno-implicit-int-float-conversion", -- -- # TODO(https://crbug.com/999886): Clean up, enable. -- "-Wno-final-dtor-non-final-class", -- -- # TODO(https://crbug.com/1016947) Clean up, enable. -- "-Wno-bitwise-conditional-parentheses", -- -- # TODO(https://crbug.com/1016945) Clean up, enable. -- "-Wno-builtin-assume-aligned-alignment", -- -- # TODO(https://crbug.com/1028110): Evaluate and possible enable. -- "-Wno-deprecated-copy", -- ] - - if (is_fuchsia) { - cflags += [ diff --git a/community/chromium/musl-crashpad.patch b/community/chromium/musl-crashpad.patch index 1e19a99d42..387deea911 100644 --- a/community/chromium/musl-crashpad.patch +++ b/community/chromium/musl-crashpad.patch @@ -1,3 +1,5 @@ +diff --git a/third_party/crashpad/crashpad/util/linux/ptracer.cc b/third_party/crashpad/crashpad/util/linux/ptracer.cc +index c6c9229..a5336b6 100644 --- ./third_party/crashpad/crashpad/util/linux/ptracer.cc +++ ./third_party/crashpad/crashpad/util/linux/ptracer.cc @@ -26,6 +26,7 @@ @@ -7,4 +9,17 @@ +#include <asm/ptrace-abi.h> #endif - #if defined(ARCH_CPU_ARM_FAMILY) + namespace crashpad { +diff --git a/third_party/crashpad/crashpad/util/linux/thread_info.h b/third_party/crashpad/crashpad/util/linux/thread_info.h +index 5b55c24..08cec52 100644 +--- ./third_party/crashpad/crashpad/util/linux/thread_info.h ++++ ./third_party/crashpad/crashpad/util/linux/thread_info.h +@@ -273,7 +273,7 @@ union FloatContext { + "Size mismatch"); + #elif defined(ARCH_CPU_ARMEL) + static_assert(sizeof(f32_t::fpregs) == sizeof(user_fpregs), "Size mismatch"); +-#if !defined(__GLIBC__) ++#if defined(OS_ANDROID) + static_assert(sizeof(f32_t::vfp) == sizeof(user_vfp), "Size mismatch"); + #endif + #elif defined(ARCH_CPU_ARM64) diff --git a/community/chromium/musl-fixes-breakpad.patch b/community/chromium/musl-fixes-breakpad.patch index a86535abec..886bde71d0 100644 --- a/community/chromium/musl-fixes-breakpad.patch +++ b/community/chromium/musl-fixes-breakpad.patch @@ -29,39 +29,6 @@ #elif defined(__aarch64__) static void FillCPUContext(RawContextCPU *out, const ucontext_t *uc, const struct fpsimd_context* fpregs); ---- ./third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h -+++ ./third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h -@@ -48,7 +48,7 @@ - #if defined(__aarch64__) - typedef struct fpsimd_context fpstate_t; - #elif !defined(__ARM_EABI__) && !defined(__mips__) --typedef struct _libc_fpstate fpstate_t; -+typedef struct _fpstate fpstate_t; - #endif - - // These entries store a list of memory regions that the client wants included ---- ./third_party/breakpad/breakpad/src/common/linux/elf_core_dump.h -+++ ./third_party/breakpad/breakpad/src/common/linux/elf_core_dump.h -@@ -36,6 +36,7 @@ - #include <elf.h> - #include <link.h> - #include <stddef.h> -+#include <limits.h> - - #include "common/memory_range.h" - -@@ -51,9 +52,9 @@ - typedef ElfW(Phdr) Phdr; - typedef ElfW(Word) Word; - typedef ElfW(Addr) Addr; --#if __WORDSIZE == 32 -+#if ULONG_MAX == 0xffffffff - static const int kClass = ELFCLASS32; --#elif __WORDSIZE == 64 -+#elif ULONG_MAX == 0xffffffffffffffff - static const int kClass = ELFCLASS64; - #else - #error "Unsupported __WORDSIZE for ElfCoreDump." --- ./third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc +++ ./third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc @@ -490,7 +490,9 @@ diff --git a/community/chromium/musl-fixes.patch b/community/chromium/musl-fixes.patch index be2dcb4e60..2e4fdb1c1b 100644 --- a/community/chromium/musl-fixes.patch +++ b/community/chromium/musl-fixes.patch @@ -1,6 +1,20 @@ ---- ./third_party/lss/linux_syscall_support.h +--- ./third_party/lss/linux_syscall_support.h.orig +++ ./third_party/lss/linux_syscall_support.h -@@ -1239,6 +1239,12 @@ +@@ -139,11 +139,13 @@ + */ + #pragma push_macro("stat64") + #pragma push_macro("fstat64") ++#pragma push_macro("fstatat64") + #pragma push_macro("lstat64") + #pragma push_macro("pread64") + #pragma push_macro("pwrite64") + #undef stat64 + #undef fstat64 ++#undef fstatat64 + #undef lstat64 + #undef pread64 + #undef pwrite64 +@@ -1244,6 +1246,12 @@ #ifndef __NR_fallocate #define __NR_fallocate 285 #endif @@ -13,10 +27,64 @@ /* End of x86-64 definitions */ #elif defined(__mips__) #if _MIPS_SIM == _MIPS_SIM_ABI32 ---- ./sandbox/linux/suid/process_util.h +@@ -4520,6 +4528,7 @@ + * corresponding #pragma push_macro near the top of this file. */ + #pragma pop_macro("stat64") + #pragma pop_macro("fstat64") ++#pragma pop_macro("fstatat64") + #pragma pop_macro("lstat64") + #pragma pop_macro("pread64") + #pragma pop_macro("pwrite64") +--- ./third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h.orig ++++ ./third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h +@@ -37,6 +37,10 @@ + #include "common/memory.h" + #include "google_breakpad/common/minidump_format.h" + ++#if !defined(__GLIBC__) ++ #define _libc_fpstate _fpstate ++#endif ++ + namespace google_breakpad { + + // Wraps platform-dependent implementations of accessors to ucontext_t structs. +--- ./third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h.orig ++++ ./third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h +@@ -48,7 +48,7 @@ + #if defined(__aarch64__) + typedef struct fpsimd_context fpstate_t; + #elif !defined(__ARM_EABI__) && !defined(__mips__) +-typedef struct _libc_fpstate fpstate_t; ++typedef struct _fpstate fpstate_t; + #endif + + // These entries store a list of memory regions that the client wants included +--- ./third_party/breakpad/breakpad/src/common/linux/elf_core_dump.h.orig ++++ ./third_party/breakpad/breakpad/src/common/linux/elf_core_dump.h +@@ -36,6 +36,7 @@ + #include <elf.h> + #include <link.h> + #include <stddef.h> ++#include <limits.h> + + #include "common/memory_range.h" + +@@ -51,9 +52,9 @@ + typedef ElfW(Phdr) Phdr; + typedef ElfW(Word) Word; + typedef ElfW(Addr) Addr; +-#if __WORDSIZE == 32 ++#if ULONG_MAX == 0xffffffff + static const int kClass = ELFCLASS32; +-#elif __WORDSIZE == 64 ++#elif ULONG_MAX == 0xffffffffffffffff + static const int kClass = ELFCLASS64; + #else + #error "Unsupported __WORDSIZE for ElfCoreDump." +--- ./sandbox/linux/suid/process_util.h.orig +++ ./sandbox/linux/suid/process_util.h -@@ -12,6 +12,14 @@ - #include <stdint.h> +@@ -11,6 +11,14 @@ + #include <stdbool.h> #include <sys/types.h> +// Some additional functions @@ -30,20 +98,20 @@ // This adjusts /proc/process/oom_score_adj so the Linux OOM killer // will prefer certain process types over others. The range for the // adjustment is [-1000, 1000], with [0, 1000] being user accessible. ---- ./sandbox/linux/seccomp-bpf/trap.cc -+++ ./sandbox/linux/seccomp-bpf/trap.cc -@@ -168,7 +168,7 @@ - // most versions of glibc don't include this information in siginfo_t. So, - // we need to explicitly copy it into a arch_sigsys structure. - struct arch_sigsys sigsys; +--- ./sandbox/linux/seccomp-bpf/trap.cc.orig 2020-04-12 08:26:40.184159217 -0400 ++++ ./sandbox/linux/seccomp-bpf/trap.cc 2020-04-12 08:46:16.737191222 -0400 +@@ -174,7 +174,7 @@ + // If the version of glibc doesn't include this information in + // siginfo_t (older than 2.17), we need to explicitly copy it + // into an arch_sigsys structure. - memcpy(&sigsys, &info->_sifields, sizeof(sigsys)); -+ memcpy(&sigsys, &info->__si_fields, sizeof(sigsys)); ++ memcpy(&sigsys, &info->__sifields, sizeof(sigsys)); + #endif #if defined(__mips__) - // When indirect syscall (syscall(__NR_foo, ...)) is made on Mips, the ---- ./third_party/ffmpeg/libavutil/cpu.c +--- ./third_party/ffmpeg/libavutil/cpu.c.orig +++ ./third_party/ffmpeg/libavutil/cpu.c -@@ -41,7 +41,6 @@ +@@ -38,7 +38,6 @@ #include <sys/param.h> #endif #include <sys/types.h> @@ -51,9 +119,10 @@ #endif #if HAVE_UNISTD_H #include <unistd.h> +diff --git a/chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc b/chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc --- chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc +++ chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc -@@ -46,7 +46,9 @@ +@@ -39,7 +39,9 @@ #endif // defined(OS_ANDROID) && defined(__arm__) #if defined(OS_LINUX) && !defined(OS_CHROMEOS) @@ -63,7 +132,7 @@ #include "base/linux_util.h" #include "base/strings/string_split.h" -@@ -365,7 +367,7 @@ void RecordLinuxDistro() { +@@ -295,7 +297,7 @@ void RecordLinuxDistro() { #endif // defined(OS_LINUX) && !defined(OS_CHROMEOS) void RecordLinuxGlibcVersion() { @@ -72,9 +141,30 @@ base::Version version(gnu_get_libc_version()); UMALinuxGlibcVersion glibc_version_result = UMA_LINUX_GLIBC_NOT_PARSEABLE; ---- ./base/logging.cc +--- services/device/serial/serial_io_handler_posix.cc.orig 2019-07-03 10:57:32.568171835 -0400 ++++ services/device/serial/serial_io_handler_posix.cc 2019-07-03 10:57:16.867983031 -0400 +@@ -6,6 +6,7 @@ + + #include <sys/ioctl.h> + #include <termios.h> ++#include <asm-generic/ioctls.h> + + #include <algorithm> + #include <utility> +diff --git a/third_party/ots/include/opentype-sanitiser.h b/third_party/ots/include/opentype-sanitiser.h +--- third_party/ots/include/opentype-sanitiser.h ++++ third_party/ots/include/opentype-sanitiser.h +@@ -20,6 +20,7 @@ typedef unsigned __int64 uint64_t; + #define htonl(x) _byteswap_ulong (x) + #define htons(x) _byteswap_ushort (x) + #else ++#include <sys/types.h> + #include <arpa/inet.h> + #include <stdint.h> + #endif +--- ./base/logging.cc.orig +++ ./base/logging.cc -@@ -621,8 +621,7 @@ +@@ -545,8 +545,7 @@ LogMessage::~LogMessage() { size_t stack_start = stream_.tellp(); @@ -83,34 +173,10 @@ +#if !defined(OFFICIAL_BUILD) && !defined(OS_NACL) && defined(__GLIBC__) if (severity_ == LOG_FATAL && !base::debug::BeingDebugged()) { // Include a stack trace on a fatal, unless a debugger is attached. - base::debug::StackTrace stack_trace; ---- ./net/dns/dns_config_service_posix.cc -+++ ./net/dns/dns_config_service_posix.cc -@@ -150,7 +150,7 @@ - #if !defined(OS_ANDROID) - ConfigParsePosixResult result; - // TODO(fuchsia): Use res_ninit() when it's implemented on Fuchsia. --#if defined(OS_OPENBSD) || defined(OS_FUCHSIA) -+#if defined(OS_OPENBSD) || defined(OS_FUCHSIA) || defined(_GNU_SOURCE) - // Note: res_ninit in glibc always returns 0 and sets RES_INIT. - // res_init behaves the same way. - memset(&_res, 0, sizeof(_res)); ---- base/native_library_posix.cc -+++ base/native_library_posix.cc -@@ -12,6 +12,10 @@ - #include "base/strings/utf_string_conversions.h" - #include "base/threading/scoped_blocking_call.h" - -+#ifndef RTLD_DEEPBIND -+#define RTLD_DEEPBIND 0 -+#endif -+ - namespace base { - - std::string NativeLibraryLoadError::ToString() const { ---- ./third_party/blink/renderer/platform/wtf/stack_util.cc + base::debug::StackTrace trace; +--- ./third_party/blink/renderer/platform/wtf/stack_util.cc.orig +++ ./third_party/blink/renderer/platform/wtf/stack_util.cc -@@ -29,7 +29,7 @@ +@@ -28,7 +28,7 @@ // FIXME: On Mac OSX and Linux, this method cannot estimate stack size // correctly for the main thread. @@ -118,8 +184,8 @@ +#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \ defined(OS_FUCHSIA) // pthread_getattr_np() can fail if the thread is not invoked by - // pthread_create() (e.g., the main thread of blink_unittests). -@@ -97,7 +97,7 @@ + // pthread_create() (e.g., the main thread of webkit_unit_tests). +@@ -96,7 +96,7 @@ } void* GetStackStart() { @@ -128,65 +194,44 @@ defined(OS_FUCHSIA) pthread_attr_t attr; int error; ---- third_party/lss/linux_syscall_support.h -+++ third_party/lss/linux_syscall_support.h -@@ -132,15 +132,18 @@ - - /* The Android NDK's <sys/stat.h> #defines these macros as aliases - * to their non-64 counterparts. To avoid naming conflict, remove them. */ --#ifdef __ANDROID__ -+#if defined(fstat64) - /* These are restored by the corresponding #pragma pop_macro near - * the end of this file. */ - # pragma push_macro("stat64") - # pragma push_macro("fstat64") -+# pragma push_macro("fstatat64") - # pragma push_macro("lstat64") - # undef stat64 - # undef fstat64 -+# undef fstatat64 - # undef lstat64 -+# define __RESTORE_MACRO 1 +--- ./net/dns/dns_config_service_posix.cc.orig ++++ ./net/dns/dns_config_service_posix.cc +@@ -122,7 +122,7 @@ + ConfigParsePosixResult result; + config->unhandled_options = false; + // TODO(fuchsia): Use res_ninit() when it's implemented on Fuchsia. +-#if defined(OS_OPENBSD) || defined(OS_FUCHSIA) ++#if defined(OS_OPENBSD) || defined(OS_FUCHSIA) || defined(_GNU_SOURCE) + // Note: res_ninit in glibc always returns 0 and sets RES_INIT. + // res_init behaves the same way. + memset(&_res, 0, sizeof(_res)); +--- third_party/swiftshader/third_party/llvm-subzero/lib/Support/Unix/Signals.inc.orig 2019-06-18 11:51:17.000000000 -0400 ++++ third_party/swiftshader/third_party/llvm-subzero/lib/Support/Unix/Signals.inc 2019-07-03 12:32:50.938758186 -0400 +@@ -25,7 +25,7 @@ + #include "llvm/Support/raw_ostream.h" + #include <algorithm> + #include <string> +-#if HAVE_EXECINFO_H ++#if HAVE_EXECINFO_H && defined(__GLIBC__) + # include <execinfo.h> // For backtrace(). #endif - - #if defined(__ANDROID__) && defined(__x86_64__) -@@ -4517,12 +4518,14 @@ - # endif + #if HAVE_SIGNAL_H +@@ -52,6 +52,7 @@ + #include <unwind.h> + #else + #undef HAVE__UNWIND_BACKTRACE ++#undef HAVE_BACKTRACE #endif - --#ifdef __ANDROID__ -+#ifdef __RESTORE_MACRO - /* These restore the original values of these macros saved by the - * corresponding #pragma push_macro near the top of this file. */ - # pragma pop_macro("stat64") - # pragma pop_macro("fstat64") -+# pragma pop_macro("fstatat64") - # pragma pop_macro("lstat64") -+#undef __RESTORE_MACRO #endif - #if defined(__cplusplus) && !defined(SYS_CPLUSPLUS) ---- third_party/crashpad/crashpad/util/linux/ptracer.cc -+++ third_party/crashpad/crashpad/util/linux/ptracer.cc -@@ -28,6 +28,10 @@ - #include <asm/ldt.h> - #endif +--- third_party/nasm/nasmlib/realpath.c.orig 2019-07-03 12:23:05.021949895 -0400 ++++ third_party/nasm/nasmlib/realpath.c 2019-07-03 12:24:24.246862665 -0400 +@@ -49,7 +49,7 @@ -+#if defined(ARCH_CPU_ARM_FAMILY) -+#include <asm/ptrace.h> -+#endif -+ - namespace crashpad { - - namespace { ---- third_party/crashpad/crashpad/util/linux/thread_info.h -+++ third_party/crashpad/crashpad/util/linux/thread_info.h -@@ -273,7 +273,7 @@ - "Size mismatch"); - #elif defined(ARCH_CPU_ARMEL) - static_assert(sizeof(f32_t::fpregs) == sizeof(user_fpregs), "Size mismatch"); --#if !defined(__GLIBC__) -+#if !defined(__linux__) - static_assert(sizeof(f32_t::vfp) == sizeof(user_vfp), "Size mismatch"); - #endif - #elif defined(ARCH_CPU_ARM64) + #include "nasmlib.h" + +-#ifdef HAVE_CANONICALIZE_FILE_NAME ++#if defined(__GLIBC__) + + /* + * GNU-specific, but avoids the realpath(..., NULL) diff --git a/community/chromium/upstream-cros-search-service-Include-cmath-for-std-pow.patch b/community/chromium/upstream-cros-search-service-Include-cmath-for-std-pow.patch deleted file mode 100644 index 200478e607..0000000000 --- a/community/chromium/upstream-cros-search-service-Include-cmath-for-std-pow.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 8273f4d3130e06fd8b6bef87b07c936304b971d9 Mon Sep 17 00:00:00 2001 -From: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com> -Date: Tue, 10 Dec 2019 20:59:57 +0000 -Subject: [PATCH] [cros search service]: Include <cmath> for std::pow() - -IWYU. Follow up to commit 2b2ea3c09b ("[cros search service] Move shared -string matching functions to //chrome"), which broke the libstdc++ build: - - ../../chrome/common/string_matching/fuzzy_tokenized_string_match.cc:199:14: error: no member named 'pow' in namespace 'std' - std::pow(partial_match_penalty_rate, long_start - current - 1); - ~~~~~^ - -Bug: 957519 -Change-Id: I66f61cb4f93cfa0bfa3d1b00ba391ddd8f31a7fb -Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1960310 -Auto-Submit: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com> -Reviewed-by: Jia Meng <jiameng@chromium.org> -Commit-Queue: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com> -Cr-Commit-Position: refs/heads/master@{#723499} ---- - chrome/common/string_matching/fuzzy_tokenized_string_match.cc | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/chrome/common/string_matching/fuzzy_tokenized_string_match.cc b/chrome/common/string_matching/fuzzy_tokenized_string_match.cc -index 8351fa701e4..884ef638c61 100644 ---- chrome/common/string_matching/fuzzy_tokenized_string_match.cc -+++ chrome/common/string_matching/fuzzy_tokenized_string_match.cc -@@ -5,6 +5,7 @@ - #include "chrome/common/string_matching/fuzzy_tokenized_string_match.h" - - #include <algorithm> -+#include <cmath> - #include <iterator> - - #include "base/i18n/case_conversion.h" diff --git a/community/chromium/upstream-fix-building-with-unbundled-libxml.patch b/community/chromium/upstream-fix-building-with-unbundled-libxml.patch deleted file mode 100644 index 68e8bf44d1..0000000000 --- a/community/chromium/upstream-fix-building-with-unbundled-libxml.patch +++ /dev/null @@ -1,127 +0,0 @@ -From d3afade220ddb307e16a6dd4f2b0ec88b2af91e7 Mon Sep 17 00:00:00 2001 -From: Stephan Hartmann <stha09@googlemail.com> -Date: Tue, 28 Jan 2020 18:16:54 +0000 -Subject: [PATCH] Fix building with unbundled libxml - -Add new targets to libxml.gn that were added in - https://chromium-review.googlesource.com/c/chromium/src/+/1894877 -Adjust includes to use system libxml headers too - -Bug: 1043042 -Change-Id: I948c063e212e49b9e7f42fed2b8bf7f4af042ca7 -Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2007110 -Reviewed-by: Robert Sesek <rsesek@chromium.org> -Reviewed-by: Daniel Cheng <dcheng@chromium.org> -Reviewed-by: Nico Weber <thakis@chromium.org> -Commit-Queue: Robert Sesek <rsesek@chromium.org> -Cr-Commit-Position: refs/heads/master@{#735957} ---- - build/linux/unbundle/libxml.gn | 41 ++++++++++++++++++++-- - third_party/libxml/chromium/libxml_utils.h | 4 +-- - third_party/libxml/chromium/xml_reader.cc | 3 +- - third_party/libxml/chromium/xml_writer.cc | 3 +- - 4 files changed, 45 insertions(+), 6 deletions(-) - -diff --git build/linux/unbundle/libxml.gn build/linux/unbundle/libxml.gn -index c481bd3547b..3587881eea8 100644 ---- build/linux/unbundle/libxml.gn -+++ build/linux/unbundle/libxml.gn -@@ -8,11 +8,48 @@ pkg_config("system_libxml") { - packages = [ "libxml-2.0" ] - } - --static_library("libxml") { -+source_set("libxml") { -+ public_configs = [ ":system_libxml" ] -+} -+ -+static_library("libxml_utils") { -+ # Do not expand this visibility list without first consulting with the -+ # Security Team. -+ visibility = [ -+ ":xml_reader", -+ ":xml_writer", -+ "//base/test:test_support", -+ "//services/data_decoder:xml_parser_fuzzer", -+ ] - sources = [ - "chromium/libxml_utils.cc", - "chromium/libxml_utils.h", - ] -- - public_configs = [ ":system_libxml" ] - } -+ -+static_library("xml_reader") { -+ # Do not expand this visibility list without first consulting with the -+ # Security Team. -+ visibility = [ -+ "//base/test:test_support", -+ "//components/policy/core/common:unit_tests", -+ "//services/data_decoder:*", -+ "//tools/traffic_annotation/auditor:auditor_sources", -+ ] -+ sources = [ -+ "chromium/xml_reader.cc", -+ "chromium/xml_reader.h", -+ ] -+ deps = [ ":libxml_utils" ] -+} -+ -+static_library("xml_writer") { -+ # The XmlWriter is considered safe to use from any target. -+ visibility = [ "*" ] -+ sources = [ -+ "chromium/xml_writer.cc", -+ "chromium/xml_writer.h", -+ ] -+ deps = [ ":libxml_utils" ] -+} -diff --git third_party/libxml/chromium/libxml_utils.h third_party/libxml/chromium/libxml_utils.h -index ff969fab540..8b2383f9c8b 100644 ---- third_party/libxml/chromium/libxml_utils.h -+++ third_party/libxml/chromium/libxml_utils.h -@@ -5,9 +5,9 @@ - #ifndef THIRD_PARTY_LIBXML_CHROMIUM_LIBXML_UTILS_H_ - #define THIRD_PARTY_LIBXML_CHROMIUM_LIBXML_UTILS_H_ - --#include <string> -+#include <libxml/xmlreader.h> - --#include "third_party/libxml/src/include/libxml/xmlreader.h" -+#include <string> - - // libxml uses a global error function pointer for reporting errors. - // A ScopedXmlErrorFunc object lets you change the global error pointer -diff --git third_party/libxml/chromium/xml_reader.cc third_party/libxml/chromium/xml_reader.cc -index 92464f4cbcc..899ccefb7c8 100644 ---- third_party/libxml/chromium/xml_reader.cc -+++ third_party/libxml/chromium/xml_reader.cc -@@ -4,10 +4,11 @@ - - #include "third_party/libxml/chromium/xml_reader.h" - -+#include <libxml/xmlreader.h> -+ - #include <vector> - - #include "third_party/libxml/chromium/libxml_utils.h" --#include "third_party/libxml/src/include/libxml/xmlreader.h" - - using internal::XmlStringToStdString; - -diff --git third_party/libxml/chromium/xml_writer.cc third_party/libxml/chromium/xml_writer.cc -index 51fce8ebeb1..7c58031fe2d 100644 ---- third_party/libxml/chromium/xml_writer.cc -+++ third_party/libxml/chromium/xml_writer.cc -@@ -4,8 +4,9 @@ - - #include "third_party/libxml/chromium/xml_writer.h" - -+#include <libxml/xmlwriter.h> -+ - #include "third_party/libxml/chromium/libxml_utils.h" --#include "third_party/libxml/src/include/libxml/xmlwriter.h" - - XmlWriter::XmlWriter() : writer_(nullptr), buffer_(nullptr) {} - diff --git a/community/chromium/upstream-move-RemoteTreeNode-declaration.patch b/community/chromium/upstream-move-RemoteTreeNode-declaration.patch deleted file mode 100644 index 81b7b0038a..0000000000 --- a/community/chromium/upstream-move-RemoteTreeNode-declaration.patch +++ /dev/null @@ -1,237 +0,0 @@ -From cdf3e81ff49b200213d67d65558f2919222b60ab Mon Sep 17 00:00:00 2001 -From: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com> -Date: Mon, 16 Dec 2019 11:39:11 +0000 -Subject: [PATCH] BookmarkModelMerger: Move RemoteTreeNode declaration to - header. - -This fixes the build with libstdc++ after commit 8f5dad93e58 ("Fix CHECK -failure due to untracked local nodes"): - -/usr/lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/bits/stl_pair.h:215:11: error: field has incomplete type 'sync_bookmarks::BookmarkModelMerger::RemoteTreeNode' - _T2 second; /// @c second is a copy of the second object - ^ -/usr/lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/ext/aligned_buffer.h:91:28: note: in instantiation of template class 'std::pair<const std::__cxx11::basic_string<char>, sync_bookmarks::BookmarkModelMerger::RemoteTreeNode>' requested here - : std::aligned_storage<sizeof(_Tp), __alignof__(_Tp)> - ^ -/usr/lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/bits/hashtable_policy.h:233:43: note: in instantiation of template class '__gnu_cxx::__aligned_buffer<std::pair<const std::__cxx11::basic_string<char>, sync_bookmarks::BookmarkModelMerger::RemoteTreeNode> >' requested here - __gnu_cxx::__aligned_buffer<_Value> _M_storage; - ^ -/usr/lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/bits/hashtable_policy.h:264:39: note: in instantiation of template class 'std::__detail::_Hash_node_value_base<std::pair<const std::__cxx11::basic_string<char>, sync_bookmarks::BookmarkModelMerger::RemoteTreeNode> >' requested here - struct _Hash_node<_Value, true> : _Hash_node_value_base<_Value> - ^ -/usr/lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/bits/hashtable_policy.h:2028:25: note: in instantiation of template class 'std::__detail::_Hash_node<std::pair<const std::__cxx11::basic_string<char>, sync_bookmarks::BookmarkModelMerger::RemoteTreeNode>, true>' requested here - rebind_traits<typename __node_type::value_type>; - ^ -/usr/lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/bits/hashtable.h:184:15: note: in instantiation of template class 'std::__detail::_Hashtable_alloc<std::allocator<std::__detail::_Hash_node<std::pair<const std::__cxx11::basic_string<char>, sync_bookmarks::BookmarkModelMerger::RemoteTreeNode>, true> > > -' requested here - private __detail::_Hashtable_alloc< - ^ -/usr/lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/bits/unordered_map.h:105:18: note: in instantiation of template class 'std::_Hashtable<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, sync_bookmarks::BookmarkModelMerger::RemoteTreeNode>, std::allocator<std::pair<con -st std::__cxx11::basic_string<char>, sync_bookmarks::BookmarkModelMerger::RemoteTreeNode> >, std::__detail::_Select1st, std::equal_to<std::__cxx11::basic_string<char> >, std::hash<std::string>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__deta -il::_Hashtable_traits<true, false, true> >' requested here - _Hashtable _M_h; - ^ -../../components/sync_bookmarks/bookmark_model_merger.h:146:22: note: in instantiation of template class 'std::unordered_map<std::__cxx11::basic_string<char>, sync_bookmarks::BookmarkModelMerger::RemoteTreeNode, std::hash<std::string>, std::equal_to<std::__cxx11::basic_string<char> >, std::allocator<std::pair<con -st std::__cxx11::basic_string<char>, sync_bookmarks::BookmarkModelMerger::RemoteTreeNode> > >' requested here - const RemoteForest remote_forest_; - ^ -../../components/sync_bookmarks/bookmark_model_merger.h:53:9: note: forward declaration of 'sync_bookmarks::BookmarkModelMerger::RemoteTreeNode' - class RemoteTreeNode; - ^ - -Essentially, the problem is that libstdc++'s std::unordered_map<T, U> -implementation requires both T and U to be fully declared. I raised the -problem in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92770, and GCC's -position is that we are relying on undefined behavior according to the C++ -standard (https://eel.is/c++draft/requirements#res.on.functions-2.5). - -Bug: 957519 -Change-Id: Ife7e435e516932a795bfbe05b2c910c3272878f0 -Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1960156 -Commit-Queue: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com> -Reviewed-by: Mikel Astiz <mastiz@chromium.org> -Auto-Submit: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com> -Cr-Commit-Position: refs/heads/master@{#725070} ---- - .../sync_bookmarks/bookmark_model_merger.cc | 89 +++++++------------ - .../sync_bookmarks/bookmark_model_merger.h | 48 +++++++++- - 2 files changed, 80 insertions(+), 57 deletions(-) - -diff --git a/components/sync_bookmarks/bookmark_model_merger.cc b/components/sync_bookmarks/bookmark_model_merger.cc -index eae153eff95..579848ee664 100644 ---- components/sync_bookmarks/bookmark_model_merger.cc -+++ components/sync_bookmarks/bookmark_model_merger.cc -@@ -5,7 +5,6 @@ - #include "components/sync_bookmarks/bookmark_model_merger.h" - - #include <algorithm> --#include <memory> - #include <set> - #include <string> - #include <utility> -@@ -205,66 +204,44 @@ UpdatesPerParentId GroupValidUpdatesByParentId( - - } // namespace - --class BookmarkModelMerger::RemoteTreeNode final { -- public: -- // Constructs a tree given |update| as root and recursively all descendants by -- // traversing |*updates_per_parent_id|. |update| and |updates_per_parent_id| -- // must not be null. All updates |*updates_per_parent_id| must represent valid -- // updates. Updates corresponding from descendant nodes are moved away from -- // |*updates_per_parent_id|. -- static RemoteTreeNode BuildTree( -- std::unique_ptr<syncer::UpdateResponseData> update, -- UpdatesPerParentId* updates_per_parent_id); -- -- ~RemoteTreeNode() = default; -- -- // Allow moves, useful during construction. -- RemoteTreeNode(RemoteTreeNode&&) = default; -- RemoteTreeNode& operator=(RemoteTreeNode&&) = default; -- -- const syncer::EntityData& entity() const { return *update_->entity; } -- int64_t response_version() const { return update_->response_version; } -- -- // Direct children nodes, sorted by ascending unique position. These are -- // guaranteed to be valid updates (e.g. IsValidBookmarkSpecifics()). -- const std::vector<RemoteTreeNode>& children() const { return children_; } -- -- // Recursively emplaces all GUIDs (this node and descendants) into -- // |*guid_to_remote_node_map|, which must not be null. -- void EmplaceSelfAndDescendantsByGUID( -- std::unordered_map<std::string, const RemoteTreeNode*>* -- guid_to_remote_node_map) const { -- DCHECK(guid_to_remote_node_map); -- -- const std::string& guid = entity().specifics.bookmark().guid(); -- if (!guid.empty()) { -- DCHECK(base::IsValidGUID(guid)); -- -- // Duplicate GUIDs have been sorted out before. -- bool success = guid_to_remote_node_map->emplace(guid, this).second; -- DCHECK(success); -- } -+BookmarkModelMerger::RemoteTreeNode::RemoteTreeNode() = default; - -- for (const RemoteTreeNode& child : children_) { -- child.EmplaceSelfAndDescendantsByGUID(guid_to_remote_node_map); -- } -- } -+BookmarkModelMerger::RemoteTreeNode::~RemoteTreeNode() = default; -+ -+BookmarkModelMerger::RemoteTreeNode::RemoteTreeNode( -+ BookmarkModelMerger::RemoteTreeNode&&) = default; -+BookmarkModelMerger::RemoteTreeNode& BookmarkModelMerger::RemoteTreeNode:: -+operator=(BookmarkModelMerger::RemoteTreeNode&&) = default; -+ -+void BookmarkModelMerger::RemoteTreeNode::EmplaceSelfAndDescendantsByGUID( -+ std::unordered_map<std::string, const RemoteTreeNode*>* -+ guid_to_remote_node_map) const { -+ DCHECK(guid_to_remote_node_map); -+ -+ const std::string& guid = entity().specifics.bookmark().guid(); -+ if (!guid.empty()) { -+ DCHECK(base::IsValidGUID(guid)); - -- private: -- static bool UniquePositionLessThan(const RemoteTreeNode& lhs, -- const RemoteTreeNode& rhs) { -- const syncer::UniquePosition a_pos = -- syncer::UniquePosition::FromProto(lhs.entity().unique_position); -- const syncer::UniquePosition b_pos = -- syncer::UniquePosition::FromProto(rhs.entity().unique_position); -- return a_pos.LessThan(b_pos); -+ // Duplicate GUIDs have been sorted out before. -+ bool success = guid_to_remote_node_map->emplace(guid, this).second; -+ DCHECK(success); - } - -- RemoteTreeNode() = default; -+ for (const RemoteTreeNode& child : children_) { -+ child.EmplaceSelfAndDescendantsByGUID(guid_to_remote_node_map); -+ } -+} - -- std::unique_ptr<syncer::UpdateResponseData> update_; -- std::vector<RemoteTreeNode> children_; --}; -+// static -+bool BookmarkModelMerger::RemoteTreeNode::UniquePositionLessThan( -+ const RemoteTreeNode& lhs, -+ const RemoteTreeNode& rhs) { -+ const syncer::UniquePosition a_pos = -+ syncer::UniquePosition::FromProto(lhs.entity().unique_position); -+ const syncer::UniquePosition b_pos = -+ syncer::UniquePosition::FromProto(rhs.entity().unique_position); -+ return a_pos.LessThan(b_pos); -+} - - // static - BookmarkModelMerger::RemoteTreeNode -diff --git a/components/sync_bookmarks/bookmark_model_merger.h b/components/sync_bookmarks/bookmark_model_merger.h -index 9b592000dc5..bf0783ecf8e 100644 ---- components/sync_bookmarks/bookmark_model_merger.h -+++ components/sync_bookmarks/bookmark_model_merger.h -@@ -5,6 +5,7 @@ - #ifndef COMPONENTS_SYNC_BOOKMARKS_BOOKMARK_MODEL_MERGER_H_ - #define COMPONENTS_SYNC_BOOKMARKS_BOOKMARK_MODEL_MERGER_H_ - -+#include <memory> - #include <string> - #include <unordered_map> - #include <vector> -@@ -50,7 +51,52 @@ class BookmarkModelMerger { - - private: - // Internal representation of a remote tree, composed of nodes. -- class RemoteTreeNode; -+ class RemoteTreeNode final { -+ private: -+ using UpdatesPerParentId = -+ std::unordered_map<base::StringPiece, -+ syncer::UpdateResponseDataList, -+ base::StringPieceHash>; -+ -+ public: -+ // Constructs a tree given |update| as root and recursively all descendants -+ // by traversing |*updates_per_parent_id|. |update| and -+ // |updates_per_parent_id| must not be null. All updates -+ // |*updates_per_parent_id| must represent valid updates. Updates -+ // corresponding from descendant nodes are moved away from -+ // |*updates_per_parent_id|. -+ static RemoteTreeNode BuildTree( -+ std::unique_ptr<syncer::UpdateResponseData> update, -+ UpdatesPerParentId* updates_per_parent_id); -+ -+ ~RemoteTreeNode(); -+ -+ // Allow moves, useful during construction. -+ RemoteTreeNode(RemoteTreeNode&&); -+ RemoteTreeNode& operator=(RemoteTreeNode&&); -+ -+ const syncer::EntityData& entity() const { return *update_->entity; } -+ int64_t response_version() const { return update_->response_version; } -+ -+ // Direct children nodes, sorted by ascending unique position. These are -+ // guaranteed to be valid updates (e.g. IsValidBookmarkSpecifics()). -+ const std::vector<RemoteTreeNode>& children() const { return children_; } -+ -+ // Recursively emplaces all GUIDs (this node and descendants) into -+ // |*guid_to_remote_node_map|, which must not be null. -+ void EmplaceSelfAndDescendantsByGUID( -+ std::unordered_map<std::string, const RemoteTreeNode*>* -+ guid_to_remote_node_map) const; -+ -+ private: -+ static bool UniquePositionLessThan(const RemoteTreeNode& lhs, -+ const RemoteTreeNode& rhs); -+ -+ RemoteTreeNode(); -+ -+ std::unique_ptr<syncer::UpdateResponseData> update_; -+ std::vector<RemoteTreeNode> children_; -+ }; - - // A forest composed of multiple trees where the root of each tree represents - // a permanent node, keyed by server-defined unique tag of the root. diff --git a/community/chromium/upstream-rebuild-Linux-frame-button-cache-when-activation.patch b/community/chromium/upstream-rebuild-Linux-frame-button-cache-when-activation.patch deleted file mode 100644 index e334cde056..0000000000 --- a/community/chromium/upstream-rebuild-Linux-frame-button-cache-when-activation.patch +++ /dev/null @@ -1,62 +0,0 @@ -From d10f885b9327399be9348b780967ebd6b7f2c4bc Mon Sep 17 00:00:00 2001 -From: Tom Anderson <thomasanderson@chromium.org> -Date: Fri, 7 Feb 2020 22:44:54 +0000 -Subject: [PATCH] Rebuild Linux frame button cache when activation state - changes - -This fixes an issue where the frame buttons would always render in an -inactive state on Linux (see repro steps in bug 1049258). - -Bug: 1049258 -R=sky -CC=pkasting - -Change-Id: Ic5af33199003e1d1cdf6cedf506e32388ea11fa9 -Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2044538 -Auto-Submit: Thomas Anderson <thomasanderson@chromium.org> -Commit-Queue: Scott Violet <sky@chromium.org> -Reviewed-by: Scott Violet <sky@chromium.org> -Cr-Commit-Position: refs/heads/master@{#739585} ---- - .../ui/views/frame/desktop_linux_browser_frame_view.cc | 6 +++--- - .../desktop_aura/desktop_window_tree_host_platform.cc | 3 +++ - 2 files changed, 6 insertions(+), 3 deletions(-) - -diff --git a/chrome/browser/ui/views/frame/desktop_linux_browser_frame_view.cc b/chrome/browser/ui/views/frame/desktop_linux_browser_frame_view.cc -index 954e776057f..4f579955675 100644 ---- chrome/browser/ui/views/frame/desktop_linux_browser_frame_view.cc -+++ chrome/browser/ui/views/frame/desktop_linux_browser_frame_view.cc -@@ -22,13 +22,13 @@ DesktopLinuxBrowserFrameView::DesktopLinuxBrowserFrameView( - : OpaqueBrowserFrameView(frame, browser_view, layout), - nav_button_provider_(std::move(nav_button_provider)) {} - --DesktopLinuxBrowserFrameView::~DesktopLinuxBrowserFrameView() {} -+DesktopLinuxBrowserFrameView::~DesktopLinuxBrowserFrameView() = default; - - void DesktopLinuxBrowserFrameView::Layout() { - // Calling MaybeUpdateCachedFrameButtonImages() from Layout() is sufficient to - // catch all cases that could update the appearance, since -- // DesktopWindowTreeHostPlatform::OnWindowStateChanged() does a layout any -- // time any properties change. -+ // DesktopWindowTreeHostPlatform::On{Window,Activation}StateChanged() does a -+ // layout any time the maximized and activation state changes, respectively. - MaybeUpdateCachedFrameButtonImages(); - OpaqueBrowserFrameView::Layout(); - } -diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc -index 9c695d8e5b1..9662f19aa90 100644 ---- ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc -+++ ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc -@@ -677,9 +677,12 @@ void DesktopWindowTreeHostPlatform::OnCloseRequest() { - } - - void DesktopWindowTreeHostPlatform::OnActivationChanged(bool active) { -+ if (is_active_ == active) -+ return; - is_active_ = active; - aura::WindowTreeHostPlatform::OnActivationChanged(active); - desktop_native_widget_aura_->HandleActivationChanged(active); -+ ScheduleRelayout(); - } - - base::Optional<gfx::Size> diff --git a/community/chromium/upstream-rename-Relayout-in-DesktopWindowTreeHostPlatform.patch b/community/chromium/upstream-rename-Relayout-in-DesktopWindowTreeHostPlatform.patch deleted file mode 100644 index 554919b59d..0000000000 --- a/community/chromium/upstream-rename-Relayout-in-DesktopWindowTreeHostPlatform.patch +++ /dev/null @@ -1,64 +0,0 @@ -From 5a2cd2409c7d65c019ad9f4595a4e85315857ac4 Mon Sep 17 00:00:00 2001 -From: Tom Anderson <thomasanderson@chromium.org> -Date: Mon, 3 Feb 2020 23:18:46 +0000 -Subject: [PATCH] Rename Relayout() in DesktopWindowTreeHostPlatform to - ScheduleRelayout() - -R=sky - -Bug: None -Change-Id: I680cafd25935e59a280e3b2baac754d3d5f13a35 -Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2036553 -Auto-Submit: Thomas Anderson <thomasanderson@chromium.org> -Reviewed-by: Scott Violet <sky@chromium.org> -Commit-Queue: Thomas Anderson <thomasanderson@chromium.org> -Cr-Commit-Position: refs/heads/master@{#737974} ---- - .../desktop_aura/desktop_window_tree_host_platform.cc | 6 +++--- - .../widget/desktop_aura/desktop_window_tree_host_platform.h | 2 +- - 2 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc -index 6c00d49eb3f..9c695d8e5b1 100644 ---- ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc -+++ ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc -@@ -556,7 +556,7 @@ void DesktopWindowTreeHostPlatform::SetFullscreen(bool fullscreen) { - DCHECK_EQ(fullscreen, IsFullscreen()); - - if (IsFullscreen() == fullscreen) -- Relayout(); -+ ScheduleRelayout(); - // Else: the widget will be relaid out either when the window bounds change - // or when |platform_window|'s fullscreen state changes. - } -@@ -669,7 +669,7 @@ void DesktopWindowTreeHostPlatform::OnWindowStateChanged( - // Now that we have different window properties, we may need to relayout the - // window. (The windows code doesn't need this because their window change is - // synchronous.) -- Relayout(); -+ ScheduleRelayout(); - } - - void DesktopWindowTreeHostPlatform::OnCloseRequest() { -@@ -712,7 +712,7 @@ gfx::Rect DesktopWindowTreeHostPlatform::ToPixelRect( - return gfx::ToEnclosingRect(rect_in_pixels); - } - --void DesktopWindowTreeHostPlatform::Relayout() { -+void DesktopWindowTreeHostPlatform::ScheduleRelayout() { - Widget* widget = native_widget_delegate_->AsWidget(); - NonClientView* non_client_view = widget->non_client_view(); - // non_client_view may be NULL, especially during creation. -diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_platform.h b/ui/views/widget/desktop_aura/desktop_window_tree_host_platform.h -index 89beb8d2245..75a401e02a7 100644 ---- ui/views/widget/desktop_aura/desktop_window_tree_host_platform.h -+++ ui/views/widget/desktop_aura/desktop_window_tree_host_platform.h -@@ -129,7 +129,7 @@ class VIEWS_EXPORT DesktopWindowTreeHostPlatform - gfx::Rect ToPixelRect(const gfx::Rect& rect_in_dip) const; - - private: -- void Relayout(); -+ void ScheduleRelayout(); - - Widget* GetWidget(); - const Widget* GetWidget() const; diff --git a/community/chromium/upstream-sync-enable-USSPasswords-by-default.patch b/community/chromium/upstream-sync-enable-USSPasswords-by-default.patch deleted file mode 100644 index 5f3131c900..0000000000 --- a/community/chromium/upstream-sync-enable-USSPasswords-by-default.patch +++ /dev/null @@ -1,28 +0,0 @@ -From eb997db5527c01fd12c321a6abc52b7cff882e50 Mon Sep 17 00:00:00 2001 -From: Mohamed Amir Yosef <mamir@chromium.org> -Date: Thu, 9 Jan 2020 21:22:19 +0000 -Subject: [PATCH] [Sync] Enable USSPasswords by default - -Change-Id: I021cd952d7a2917a8fb7203cabdac612251193df -Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1963804 -Auto-Submit: Mohamed Amir Yosef <mamir@chromium.org> -Reviewed-by: Mikel Astiz <mastiz@chromium.org> -Commit-Queue: Mohamed Amir Yosef <mamir@chromium.org> -Cr-Commit-Position: refs/heads/master@{#729902} ---- - components/sync/driver/sync_driver_switches.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/components/sync/driver/sync_driver_switches.cc b/components/sync/driver/sync_driver_switches.cc -index ddff8b91419..999384aa68a 100644 ---- components/sync/driver/sync_driver_switches.cc -+++ components/sync/driver/sync_driver_switches.cc -@@ -55,7 +55,7 @@ const base::Feature kStopSyncInPausedState{"StopSyncInPausedState", - - // Enable USS implementation of Passwords datatype. - const base::Feature kSyncUSSPasswords{"SyncUSSPasswords", -- base::FEATURE_DISABLED_BY_DEFAULT}; -+ base::FEATURE_ENABLED_BY_DEFAULT}; - - // Enable USS implementation of Nigori datatype. - const base::Feature kSyncUSSNigori{"SyncUSSNigori", |