Hello community, here is the log from the commit of package chromium for openSUSE:Factory checked in at 2020-10-18 16:26:51 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/chromium (Old) and /work/SRC/openSUSE:Factory/.chromium.new.3486 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "chromium" Sun Oct 18 16:26:51 2020 rev:271 rq:841866 version:86.0.4240.75 Changes: -------- --- /work/SRC/openSUSE:Factory/chromium/chromium.changes 2020-09-25 16:25:18.975559987 +0200 +++ /work/SRC/openSUSE:Factory/.chromium.new.3486/chromium.changes 2020-10-18 16:29:31.696707321 +0200 @@ -1,0 +2,79 @@ +Wed Oct 14 11:37:13 UTC 2020 - Tomáš Chvátal <tchva...@suse.com> + +- Remove vdpau->vaapi bridge as it breaks a lot: + (fixes welcome by someone else than me) + * chromium-vaapi-fix.patch + +------------------------------------------------------------------- +Wed Oct 14 11:36:22 UTC 2020 - Tomáš Chvátal <tchva...@suse.com> + +- Fix cookiemonster: + * fix-invalid-end-iterator-usage-in-CookieMonster.patch + +------------------------------------------------------------------- +Wed Oct 14 11:06:57 UTC 2020 - Tomáš Chvátal <tchva...@suse.com> + +- Update to 86.0.4240.75 bsc#1177408: + * CVE-2020-15967: Use after free in payments. + * CVE-2020-15968: Use after free in Blink. + * CVE-2020-15969: Use after free in WebRTC. + * CVE-2020-15970: Use after free in NFC. + * CVE-2020-15971: Use after free in printing. + * CVE-2020-15972: Use after free in audio. + * CVE-2020-15990: Use after free in autofill. + * CVE-2020-15991: Use after free in password manager. + * CVE-2020-15973: Insufficient policy enforcement in extensions. + * CVE-2020-15974: Integer overflow in Blink. + * CVE-2020-15975: Integer overflow in SwiftShader. + * CVE-2020-15976: Use after free in WebXR. + * CVE-2020-6557: Inappropriate implementation in networking. + * CVE-2020-15977: Insufficient data validation in dialogs. + * CVE-2020-15978: Insufficient data validation in navigation. + * CVE-2020-15979: Inappropriate implementation in V8. + * CVE-2020-15980: Insufficient policy enforcement in Intents. + * CVE-2020-15981: Out of bounds read in audio. + * CVE-2020-15982: Side-channel information leakage in cache. + * CVE-2020-15983: Insufficient data validation in webUI. + * CVE-2020-15984: Insufficient policy enforcement in Omnibox. + * CVE-2020-15985: Inappropriate implementation in Blink. + * CVE-2020-15986: Integer overflow in media. + * CVE-2020-15987: Use after free in WebRTC. + * CVE-2020-15992: Insufficient policy enforcement in networking. + * CVE-2020-15988: Insufficient policy enforcement in downloads. + * CVE-2020-15989: Uninitialized Use in PDFium. +- Add patches: + * chromium-78-protobuf-RepeatedPtrField-export.patch + * chromium-79-gcc-protobuf-alignas.patch + * chromium-80-QuicStreamSendBuffer-deleted-move-constructor.patch + * chromium-86-ConsumeDurationNumber-constexpr.patch + * chromium-86-ImageMemoryBarrierData-init.patch + * chromium-86-ServiceWorkerRunningInfo-noexcept.patch + * chromium-86-compiler.patch + * chromium-86-nearby-explicit.patch + * chromium-86-nearby-include.patch +- Remove patches: + * chromium-79-gcc-alignas.patch + * chromium-80-gcc-quiche.patch + * chromium-82-gcc-constexpr.patch + * chromium-83-gcc-10.patch + * chromium-84-gcc-include.patch + * chromium-84-mediaalloc.patch + * chromium-85-DelayNode-cast.patch + * chromium-85-FrameWidget-namespace.patch + * chromium-85-NearbyConnection-abstract.patch + * chromium-85-NearbyShareEncryptedMetadataKey-include.patch + * chromium-85-oscillator_node-cast.patch + * chromium-85-ostream-operator.patch + * chromium-85-ozone-include.patch + * chromium-85-sim_hash-include.patch + * chromium-blink-gcc-diagnostic-pragma.patch + * chromium-dma-buf.patch + * chromium-drm.patch + * chromium-quiche-invalid-offsetof.patch + +------------------------------------------------------------------- +Sat Oct 10 17:05:01 UTC 2020 - Andreas Stieger <andreas.stie...@gmx.de> + +- build with system libevent, the gn bug is no longer present + +------------------------------------------------------------------- Old: ---- chromium-79-gcc-alignas.patch chromium-80-gcc-quiche.patch chromium-82-gcc-constexpr.patch chromium-83-gcc-10.patch chromium-84-gcc-include.patch chromium-84-mediaalloc.patch chromium-85-DelayNode-cast.patch chromium-85-FrameWidget-namespace.patch chromium-85-NearbyConnection-abstract.patch chromium-85-NearbyShareEncryptedMetadataKey-include.patch chromium-85-oscillator_node-cast.patch chromium-85-ostream-operator.patch chromium-85-ozone-include.patch chromium-85-sim_hash-include.patch chromium-85.0.4183.121.tar.xz chromium-blink-gcc-diagnostic-pragma.patch chromium-dma-buf.patch chromium-drm.patch chromium-quiche-invalid-offsetof.patch chromium-vaapi-fix.patch New: ---- chromium-78-protobuf-RepeatedPtrField-export.patch chromium-79-gcc-protobuf-alignas.patch chromium-80-QuicStreamSendBuffer-deleted-move-constructor.patch chromium-86-ConsumeDurationNumber-constexpr.patch chromium-86-ImageMemoryBarrierData-init.patch chromium-86-ServiceWorkerRunningInfo-noexcept.patch chromium-86-compiler.patch chromium-86-nearby-explicit.patch chromium-86-nearby-include.patch chromium-86.0.4240.75.tar.xz fix-invalid-end-iterator-usage-in-CookieMonster.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ chromium.spec ++++++ --- /var/tmp/diff_new_pack.qWQ3bD/_old 2020-10-18 16:29:41.328711608 +0200 +++ /var/tmp/diff_new_pack.qWQ3bD/_new 2020-10-18 16:29:41.332711610 +0200 @@ -51,7 +51,7 @@ %endif %bcond_with clang Name: chromium -Version: 85.0.4183.121 +Version: 86.0.4240.75 Release: 0 Summary: Google's open source browser project License: BSD-3-Clause AND LGPL-2.1-or-later @@ -71,38 +71,31 @@ Patch2: chromium-master-prefs-path.patch # PATCH-FIX-OPENSUSE fix_building_widevinecdm_with_chromium.patch - Enable WideVine plugin Patch3: fix_building_widevinecdm_with_chromium.patch -Patch4: chromium-dma-buf.patch -Patch5: chromium-buildname.patch -Patch6: chromium-drm.patch -Patch9: chromium-system-libusb.patch -Patch10: gcc-enable-lto.patch -Patch11: chromium-79-gcc-alignas.patch -Patch12: chromium-80-gcc-quiche.patch -Patch13: chromium-fix-char_traits.patch -Patch14: gpu-timeout.patch -Patch15: build-with-pipewire-0.3.patch -Patch16: chromium-82-gcc-constexpr.patch -Patch20: chromium-83-gcc-10.patch -Patch21: chromium-84-gcc-include.patch +Patch4: chromium-buildname.patch +Patch5: chromium-system-libusb.patch +Patch6: gcc-enable-lto.patch +Patch7: chromium-fix-char_traits.patch +Patch8: gpu-timeout.patch +Patch9: build-with-pipewire-0.3.patch # Do not use unrar code, it is non-free -Patch26: chromium-norar.patch -Patch27: chromium-84-blink-disable-clang-format.patch +Patch10: chromium-norar.patch # revert location on old GCC on 15.1, 15.2 gets it right tho -Patch36: no-location-leap151.patch -Patch37: chromium-84-mediaalloc.patch -Patch40: chromium-blink-gcc-diagnostic-pragma.patch -Patch41: chromium-quiche-invalid-offsetof.patch -Patch43: system-libdrm.patch -Patch44: chromium-85-DelayNode-cast.patch -Patch45: chromium-85-FrameWidget-namespace.patch -Patch46: chromium-85-NearbyConnection-abstract.patch -Patch47: chromium-85-NearbyShareEncryptedMetadataKey-include.patch -Patch48: chromium-85-oscillator_node-cast.patch -Patch49: chromium-85-ostream-operator.patch -Patch50: chromium-85-ozone-include.patch -Patch51: chromium-85-sim_hash-include.patch -Patch52: chromium-disable-parallel-gold.patch -Patch53: chromium-lp151-old-drm.patch +Patch11: no-location-leap151.patch +Patch12: system-libdrm.patch +Patch13: chromium-disable-parallel-gold.patch +Patch14: chromium-lp151-old-drm.patch +Patch15: fix-invalid-end-iterator-usage-in-CookieMonster.patch +# gentoo patchset +Patch50: chromium-78-protobuf-RepeatedPtrField-export.patch +Patch51: chromium-79-gcc-protobuf-alignas.patch +Patch52: chromium-80-QuicStreamSendBuffer-deleted-move-constructor.patch +Patch53: chromium-84-blink-disable-clang-format.patch +Patch54: chromium-86-compiler.patch +Patch55: chromium-86-ConsumeDurationNumber-constexpr.patch +Patch56: chromium-86-ImageMemoryBarrierData-init.patch +Patch57: chromium-86-nearby-explicit.patch +Patch58: chromium-86-nearby-include.patch +Patch59: chromium-86-ServiceWorkerRunningInfo-noexcept.patch # Google seem not too keen on merging this but GPU accel is quite important # https://chromium-review.googlesource.com/c/chromium/src/+/532294 # https://github.com/saiarcot895/chromium-ubuntu-build/tree/master/debian/patches @@ -110,7 +103,6 @@ # (default on) compared to the PR Patch100: chromium-vaapi.patch Patch101: old-libva.patch -Patch102: chromium-vaapi-fix.patch # PATCH-FIX-SUSE: allow prop codecs to be set with chromium branding Patch200: chromium-prop-codecs.patch BuildRequires: SDL-devel @@ -120,7 +112,7 @@ BuildRequires: desktop-file-utils BuildRequires: fdupes BuildRequires: flex -BuildRequires: gn >= 0.1726 +BuildRequires: gn >= 0.1807 BuildRequires: gperf BuildRequires: hicolor-icon-theme # Java used during build @@ -263,11 +255,11 @@ BuildRequires: clang >= 5.0.0 %else %if %{?suse_version} > 1500 -BuildRequires: gcc >= 9 -BuildRequires: gcc-c++ >= 9 +BuildRequires: gcc >= 10 +BuildRequires: gcc-c++ >= 10 %else -BuildRequires: gcc9 -BuildRequires: gcc9-c++ +BuildRequires: gcc10 +BuildRequires: gcc10-c++ %endif %endif @@ -335,7 +327,6 @@ third_party/breakpad third_party/breakpad/breakpad/src/third_party/curl third_party/brotli - third_party/cacheinvalidation third_party/catapult third_party/catapult/common/py_vulcanize/third_party/rcssmin third_party/catapult/common/py_vulcanize/third_party/rjsmin @@ -365,9 +356,15 @@ third_party/devscripts third_party/devtools-frontend third_party/devtools-frontend/src/front_end/third_party/acorn + third_party/devtools-frontend/src/front_end/third_party/chromium third_party/devtools-frontend/src/front_end/third_party/codemirror third_party/devtools-frontend/src/front_end/third_party/fabricjs + third_party/devtools-frontend/src/front_end/third_party/i18n + third_party/devtools-frontend/src/front_end/third_party/intl-messageformat third_party/devtools-frontend/src/front_end/third_party/lighthouse + third_party/devtools-frontend/src/front_end/third_party/lit-html + third_party/devtools-frontend/src/front_end/third_party/lodash-isequal + third_party/devtools-frontend/src/front_end/third_party/marked third_party/devtools-frontend/src/front_end/third_party/wasmparser third_party/devtools-frontend/src/third_party third_party/dom_distiller_js @@ -413,6 +410,7 @@ third_party/minigbm third_party/modp_b64 third_party/nasm + third_party/nearby third_party/node third_party/node/node_modules/polymer-bundler/lib/third_party/UglifyJS2 third_party/one_euro_filter @@ -444,6 +442,7 @@ third_party/rnnoise third_party/s2cellid third_party/schema_org + third_party/securemessage third_party/simplejson third_party/skia third_party/skia/third_party/skcms @@ -462,6 +461,7 @@ third_party/swiftshader/third_party/subzero third_party/swiftshader/third_party/SPIRV-Headers/include/spirv/unified1 third_party/tcmalloc + third_party/ukey2 third_party/usrsctp third_party/vulkan third_party/web-animations-js @@ -478,6 +478,7 @@ third_party/woff2 third_party/wuffs third_party/xcbproto + third_party/zxcvbn-cpp third_party/zlib/google tools/grit/third_party/six url/third_party/mozilla @@ -511,7 +512,6 @@ %endif # needed due to bugs in GN keeplibs+=( - base/third_party/libevent third_party/adobe third_party/speech-dispatcher third_party/usb_ids @@ -573,6 +573,7 @@ flac fontconfig libdrm + libevent libjpeg libpng libxslt @@ -654,10 +655,9 @@ myconf_gn+=" use_system_minigbm=true use_xkbcommon=true" myconf_gn+=" use_ozone=true ozone_auto_platforms=false" myconf_gn+=" ozone_platform=\"x11\" ozone_platform_x11=true ozone_platform_gbm=true" -myconf_gn+=" ozone_platform_wayland=true" +myconf_gn+=" ozone_platform_wayland=true ozone_platform_headless=true" # use_v4l2_codec - uses patches in kernel-headers present on chromeos only myconf_gn+=" use_v4lplugin=true use_v4l2_codec=false" - %endif %if %{with clang} myconf_gn+=" is_clang=true clang_base_path=\"/usr\" clang_use_chrome_plugins=false" ++++++ chromium-78-protobuf-RepeatedPtrField-export.patch ++++++ diff --git a/third_party/protobuf/src/google/protobuf/repeated_field.h b/third_party/protobuf/src/google/protobuf/repeated_field.h index b5b193c..4434854 100644 --- a/third_party/protobuf/src/google/protobuf/repeated_field.h +++ b/third_party/protobuf/src/google/protobuf/repeated_field.h @@ -804,7 +804,7 @@ class StringTypeHandler { // RepeatedPtrField is like RepeatedField, but used for repeated strings or // Messages. template <typename Element> -class RepeatedPtrField final : private internal::RepeatedPtrFieldBase { +class PROTOBUF_EXPORT RepeatedPtrField final : private internal::RepeatedPtrFieldBase { public: RepeatedPtrField(); explicit RepeatedPtrField(Arena* arena); ++++++ chromium-79-gcc-protobuf-alignas.patch ++++++ >From 5d66d5907ac3e76d1e382b8a8e8afe653bd00f4c Mon Sep 17 00:00:00 2001 From: Stephan Hartmann <sth...@googlemail.com> Date: Sun, 31 May 2020 13:59:15 +0000 Subject: [PATCH] Fix GCC build with PROTOBUF_USE_DLLS enabled GCC does not allow mixing __attribute__(()) syntax and alignas() syntax. Re-use approach from chromium base/compiler_specific.h --- .../protobuf/src/google/protobuf/arena.h | 2 +- .../protobuf/src/google/protobuf/port_def.inc | 29 +++++++++++++++++++ .../src/google/protobuf/port_undef.inc | 1 + 3 files changed, 31 insertions(+), 1 deletion(-) diff --git a/third_party/protobuf/src/google/protobuf/arena.h b/third_party/protobuf/src/google/protobuf/arena.h index dedc221..a8515ce 100644 --- a/third_party/protobuf/src/google/protobuf/arena.h +++ b/third_party/protobuf/src/google/protobuf/arena.h @@ -245,7 +245,7 @@ struct ArenaOptions { // well as protobuf container types like RepeatedPtrField and Map. The protocol // is internal to protobuf and is not guaranteed to be stable. Non-proto types // should not rely on this protocol. -class PROTOBUF_EXPORT alignas(8) Arena final { +class PROTOBUF_EXPORT PROTOBUF_ALIGNAS(8) Arena final { public: // Arena constructor taking custom options. See ArenaOptions below for // descriptions of the options available. diff --git a/third_party/protobuf/src/google/protobuf/port_def.inc b/third_party/protobuf/src/google/protobuf/port_def.inc index f1bd85d..6d02b53 100644 --- a/third_party/protobuf/src/google/protobuf/port_def.inc +++ b/third_party/protobuf/src/google/protobuf/port_def.inc @@ -528,6 +528,35 @@ PROTOBUF_EXPORT_TEMPLATE_TEST(DEFAULT, __declspec(dllimport)); #undef IN #endif // _MSC_VER +// Specify memory alignment for structs, classes, etc. +// Use like: +// class PROTOBUF_ALIGNAS(16) MyClass { ... } +// PROTOBUF_ALIGNAS(16) int array[4]; +// +// In most places you can use the C++11 keyword "alignas", which is preferred. +// +// But compilers have trouble mixing __attribute__((...)) syntax with +// alignas(...) syntax. +// +// Doesn't work in clang or gcc: +// struct alignas(16) __attribute__((packed)) S { char c; }; +// Works in clang but not gcc: +// struct __attribute__((packed)) alignas(16) S2 { char c; }; +// Works in clang and gcc: +// struct alignas(16) S3 { char c; } __attribute__((packed)); +// +// There are also some attributes that must be specified *before* a class +// definition: visibility (used for exporting functions/classes) is one of +// these attributes. This means that it is not possible to use alignas() with a +// class that is marked as exported. +#if defined(_MSC_VER) +#define PROTOBUF_ALIGNAS(byte_alignment) __declspec(align(byte_alignment)) +#elif defined(__GNUC__) +#define PROTOBUF_ALIGNAS(byte_alignment) __attribute__((aligned(byte_alignment))) +#else +#define PROTOBUF_ALIGNAS(byte_alignment) alignas(byte_alignment) +#endif + #if defined(__clang__) #pragma clang diagnostic push // TODO(gerbens) ideally we cleanup the code. But a cursory try shows many diff --git a/third_party/protobuf/src/google/protobuf/port_undef.inc b/third_party/protobuf/src/google/protobuf/port_undef.inc index b7e67fe..ba1fffc 100644 --- a/third_party/protobuf/src/google/protobuf/port_undef.inc +++ b/third_party/protobuf/src/google/protobuf/port_undef.inc @@ -80,6 +80,7 @@ #undef PROTOBUF_EXPORT_TEMPLATE_STYLE_MATCH_foj3FJo5StF0OvIzl7oMxA__declspec #undef PROTOBUF_EXPORT_TEMPLATE_STYLE_MATCH_DECLSPEC_dllexport #undef PROTOBUF_EXPORT_TEMPLATE_STYLE_MATCH_DECLSPEC_dllimport +#undef PROTOBUF_ALIGNAS -- 2.26.2 ++++++ chromium-80-QuicStreamSendBuffer-deleted-move-constructor.patch ++++++ >From 00f47df999c9b19e80fdc01db0ae9ca1b6a12b3a Mon Sep 17 00:00:00 2001 From: vasilvv <vasi...@google.com> Date: Wed, 03 Apr 2019 13:58:53 -0700 Subject: [PATCH] GCC: do not delete move constructor of QuicStreamSendBuffer QuicStreamSendBuffer constructor is implicitely required in the initialization of the vector of substreams in QuicCryptoStream. Though clang apparently ignores that, GCC fails to build. BUG=chromium:819294 Originally submitted by José Dapena Paz <jose.dap...@lge.com> at https://quiche-review.googlesource.com/c/quiche/+/2420 PiperOrigin-RevId: 241800134 Change-Id: I4e3c97d6e5895d85340e8c1b740e6196d9104066 --- diff --git a/net/third_party/quiche/src/quic/core/quic_stream_send_buffer.h b/net/third_party/quiche/src/quic/core/quic_stream_send_buffer.h index e34514b..74e9d0d 100644 --- a/net/third_party/quiche/src/quic/core/quic_stream_send_buffer.h +++ b/net/third_party/quiche/src/quic/core/quic_stream_send_buffer.h @@ -62,7 +62,7 @@ public: explicit QuicStreamSendBuffer(QuicBufferAllocator* allocator); QuicStreamSendBuffer(const QuicStreamSendBuffer& other) = delete; - QuicStreamSendBuffer(QuicStreamSendBuffer&& other) = delete; + QuicStreamSendBuffer(QuicStreamSendBuffer&& other) = default; ~QuicStreamSendBuffer(); // Save |data_length| of data starts at |iov_offset| in |iov| to send buffer. ++++++ chromium-86-ConsumeDurationNumber-constexpr.patch ++++++ >From f64e2d2daa64749995253f8ad00679ce74abdc1b Mon Sep 17 00:00:00 2001 From: Jose Dapena Paz <jdap...@igalia.com> Date: Wed, 19 Aug 2020 11:02:00 +0200 Subject: [PATCH] GCC: ConsumeDurationNumber cannot be a constexpr Declaring base::ConsumeDurationNumber as constexpr is not valid, as it uses the BasicStringPiece::begin method, that is not constexpr. build error in GCC: ../../base/time/time.cc: In function ‘constexpr base::Optional<base::{anonymous}::ParsedDecimal> base::{anonymous}::ConsumeDurationNumber(base::StringPiece&)’: ../../base/time/time.cc:67:63: error: call to non-‘constexpr’ function ‘const value_type* base::BasicStringPiece<STRING_TYPE>::begin() const [with STRING_TYPE = std::__cxx11::basic_string<char>; base::BasicStringPiece<STRING_TYPE>::const_iterator = const char*; base::BasicStringPiece<STRING_TYPE>::value_type = char]’ 67 | StringPiece::const_iterator orig_start = number_string.begin(); | ~~~~~~~~~~~~~~~~~~~^~ Bug: 859294 Change-Id: Id987d003f66052848d7083bb33abc3acfd109b73 --- diff --git a/base/time/time.cc b/base/time/time.cc index 1b1a830..7c47419 100644 --- a/base/time/time.cc +++ b/base/time/time.cc @@ -61,8 +61,7 @@ // // Adapted from absl: // https://cs.chromium.org/chromium/src/third_party/abseil-cpp/absl/time/duration.cc?l=807&rcl=2c22e9135f107a4319582ae52e2e3e6b201b6b7c -constexpr Optional<ParsedDecimal> ConsumeDurationNumber( - StringPiece& number_string) { +Optional<ParsedDecimal> ConsumeDurationNumber(StringPiece& number_string) { ParsedDecimal res; StringPiece::const_iterator orig_start = number_string.begin(); // Parse contiguous digits. ++++++ chromium-86-ImageMemoryBarrierData-init.patch ++++++ >From 2879a6ba43b65c33e3c02432b4ae7a7462d24096 Mon Sep 17 00:00:00 2001 From: Stephan Hartmann <sth...@googlemail.com> Date: Fri, 28 Aug 2020 07:23:29 +0000 Subject: [PATCH] GCC: fix ImageMemoryBarrierData initialization GCC can't convert constant string to char[40]. Use const char * instead. Otherwise fails like this: src/libANGLE/renderer/vulkan/vk_helpers.cpp:121:1: error: could not convert '...' from '<brace-enclosed initializer list>' to 'const angle::PackedEnumMap<rx::vk::ImageLayout, rx::vk::{anonymous}::ImageMemoryBarrierData>' --- third_party/angle/src/libANGLE/renderer/vulkan/vk_helpers.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/angle/src/libANGLE/renderer/vulkan/vk_helpers.cpp b/third_party/angle/src/libANGLE/renderer/vulkan/vk_helpers.cpp index af957d7..7fe82ae 100644 --- a/third_party/angle/src/libANGLE/renderer/vulkan/vk_helpers.cpp +++ b/third_party/angle/src/libANGLE/renderer/vulkan/vk_helpers.cpp @@ -73,7 +73,7 @@ enum BarrierType struct ImageMemoryBarrierData { - char name[40]; + const char *name; // The Vk layout corresponding to the ImageLayout key. VkImageLayout layout; -- 2.26.2 ++++++ chromium-86-ServiceWorkerRunningInfo-noexcept.patch ++++++ >From e4b5d6eddf876509c05cb377bc4ce67fae0f3b1c Mon Sep 17 00:00:00 2001 From: Jose Dapena Paz <jdap...@igalia.com> Date: Fri, 21 Aug 2020 07:40:33 +0000 Subject: [PATCH] GCC: default move constructor of ServiceWorkerRunningInfo noexcept requires StrongAlias noexcept too. Fix for this GCC compilation error: ../../content/public/browser/service_worker_running_info.cc:26:1: error: function ‘content::ServiceWorkerRunningInfo::ServiceWorkerRunningInfo(content::ServiceWorkerRunningInfo&&)’ defaulted on its redeclaration with an exception-specification that differs from the implicit exception-specification ‘’ 26 | ServiceWorkerRunningInfo::ServiceWorkerRunningInfo( | ^~~~~~~~~~~~~~~~~~~~~~~~ Problem comes from blink::ServiceWorkerToken move constructor being declared noexcept, but its parent StrongAlias not having noexcept. Fix making StrongAlias move constructor noexcept too. Bug: 819294 Change-Id: I127a435b3d1f52f01a40700457ce6e67d5d67af2 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2359077 Reviewed-by: Daniel Cheng <dch...@chromium.org> Commit-Queue: José Dapena Paz <jdap...@igalia.com> Cr-Commit-Position: refs/heads/master@{#800495} --- diff --git a/base/util/type_safety/strong_alias.h b/base/util/type_safety/strong_alias.h index ea93928..df49749 100644 --- a/base/util/type_safety/strong_alias.h +++ b/base/util/type_safety/strong_alias.h @@ -70,7 +70,8 @@ public: constexpr StrongAlias() = default; constexpr explicit StrongAlias(const UnderlyingType& v) : value_(v) {} - constexpr explicit StrongAlias(UnderlyingType&& v) : value_(std::move(v)) {} + constexpr explicit StrongAlias(UnderlyingType&& v) noexcept + : value_(std::move(v)) {} constexpr UnderlyingType& value() & { return value_; } constexpr const UnderlyingType& value() const& { return value_; } >From 4924144afd81017920885aecf4aedfe5d86ae71c Mon Sep 17 00:00:00 2001 From: Jose Dapena Paz <jdap...@igalia.com> Date: Fri, 21 Aug 2020 18:32:11 +0200 Subject: [PATCH] GCC: pending fix for ServiceWorkerRunningInfo noexcept in move constructor It is not enough to make StrongAlias noexcept. TokenType needs to also provide noexcept move constructor. Bug: 819294 Change-Id: Ib85faa18f66b41053fb71ecee32e818e05685080 --- diff --git a/base/util/type_safety/token_type.h b/base/util/type_safety/token_type.h index 0a12679..2cbfdb7 100644 --- a/base/util/type_safety/token_type.h +++ b/base/util/type_safety/token_type.h @@ -23,6 +23,9 @@ TokenType() : Super(base::UnguessableToken::Create()) {} explicit TokenType(const base::UnguessableToken& token) : Super(token) {} TokenType(const TokenType& token) : Super(token.value()) {} + TokenType(TokenType&& token) noexcept : Super(token.value()) {} + TokenType& operator=(const TokenType& token) = default; + TokenType& operator=(TokenType&& token) noexcept = default; // This object allows default assignment operators for compatibility with // STL containers. ++++++ chromium-86-compiler.patch ++++++ >From f4d0b0eb899005b4b8b6388e1d8bb82cc0018fc8 Mon Sep 17 00:00:00 2001 From: Mike Gilbert <flop...@gentoo.org> Date: Thu, 20 Aug 2020 19:12:21 +0000 Subject: [PATCH] Disable various compiler configs --- build/config/compiler/BUILD.gn | 52 +++++++++++----------------------- 1 file changed, 17 insertions(+), 35 deletions(-) diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn index 06c166f..fe5d340 100644 --- a/build/config/compiler/BUILD.gn +++ b/build/config/compiler/BUILD.gn @@ -254,8 +254,6 @@ config("compiler") { configs += [ # See the definitions below. - ":clang_revision", - ":compiler_cpu_abi", ":compiler_codegen", ":compiler_deterministic", ] @@ -488,17 +486,6 @@ config("compiler") { ldflags += [ "-Wl,-z,keep-text-section-prefix" ] } - if (is_clang && !is_nacl && !use_xcode_clang) { - cflags += [ "-fcrash-diagnostics-dir=" + clang_diagnostic_dir ] - - cflags += [ - # TODO(hans): Remove this once Clang generates better optimized debug info - # by default. https://crbug.com/765793 - "-mllvm", - "-instcombine-lower-dbg-declare=0", - ] - } - # C11/C++11 compiler flags setup. # --------------------------- if (is_linux || is_chromeos || is_android || (is_nacl && is_clang) || @@ -1575,7 +1562,7 @@ config("chromium_code") { defines = [ "_HAS_NODISCARD" ] } } else { - cflags = [ "-Wall" ] + cflags = [] if (treat_warnings_as_errors) { cflags += [ "-Werror" ] @@ -1584,10 +1571,6 @@ config("chromium_code") { # well. ldflags = [ "-Werror" ] } - if (is_clang) { - # Enable extra warnings for chromium_code when we control the compiler. - cflags += [ "-Wextra" ] - } # In Chromium code, we define __STDC_foo_MACROS in order to get the # C99 macros on Mac and Linux. @@ -1596,15 +1579,6 @@ config("chromium_code") { "__STDC_FORMAT_MACROS", ] - if (!is_debug && !using_sanitizer && current_cpu != "s390x" && - current_cpu != "s390" && current_cpu != "ppc64" && - current_cpu != "mips" && current_cpu != "mips64") { - # Non-chromium code is not guaranteed to compile cleanly with - # _FORTIFY_SOURCE. Also, fortified build may fail when optimizations are - # disabled, so only do that for Release build. - defines += [ "_FORTIFY_SOURCE=2" ] - } - if (is_mac) { cflags_objc = [ "-Wobjc-missing-property-synthesis" ] cflags_objcc = [ "-Wobjc-missing-property-synthesis" ] @@ -2002,7 +1976,8 @@ config("default_stack_frames") { } # Default "optimization on" config. -config("optimize") { +config("optimize") { } +config("xoptimize") { if (is_win) { if (chrome_pgo_phase != 2) { # Favor size over speed, /O1 must be before the common flags. @@ -2037,7 +2012,8 @@ config("optimize") { } # Turn off optimizations. -config("no_optimize") { +config("no_optimize") { } +config("xno_optimize") { if (is_win) { cflags = [ "/Od", # Disable optimization. @@ -2077,7 +2053,8 @@ config("no_optimize") { # Turns up the optimization level. On Windows, this implies whole program # optimization and link-time code generation which is very expensive and should # be used sparingly. -config("optimize_max") { +config("optimize_max") { } +config("xoptimize_max") { if (is_nacl && is_nacl_irt) { # The NaCl IRT is a special case and always wants its own config. # Various components do: @@ -2109,7 +2086,8 @@ config("optimize_max") { # # TODO(crbug.com/621335) - rework how all of these configs are related # so that we don't need this disclaimer. -config("optimize_speed") { +config("optimize_speed") { } +config("xoptimize_speed") { if (is_nacl && is_nacl_irt) { # The NaCl IRT is a special case and always wants its own config. # Various components do: @@ -2134,7 +2112,8 @@ config("optimize_speed") { } } -config("optimize_fuzzing") { +config("optimize_fuzzing") { } +config("xoptimize_fuzzing") { cflags = [ "-O1" ] + common_optimize_on_cflags ldflags = common_optimize_on_ldflags visibility = [ ":default_optimization" ] @@ -2251,7 +2230,8 @@ config("win_pdbaltpath") { } # Full symbols. -config("symbols") { +config("symbols") { } +config("xsymbols") { if (is_win) { if (is_clang) { cflags = [ "/Z7" ] # Debug information in the .obj files. @@ -2346,7 +2326,8 @@ config("symbols") { # Minimal symbols. # This config guarantees to hold symbol for stack trace which are shown to user # when crash happens in unittests running on buildbot. -config("minimal_symbols") { +config("minimal_symbols") { } +config("xminimal_symbols") { if (is_win) { # Functions, files, and line tables only. cflags = [] @@ -2399,7 +2380,8 @@ config("minimal_symbols") { # This configuration contains function names only. That is, the compiler is # told to not generate debug information and the linker then just puts function # names in the final debug information. -config("no_symbols") { +config("no_symbols") { } +config("xno_symbols") { if (is_win) { ldflags = [ "/DEBUG" ] -- 2.26.2 ++++++ chromium-86-nearby-explicit.patch ++++++ >From 849e5c6b3a8746d9205102bd3df4e140cead405a Mon Sep 17 00:00:00 2001 From: Stephan Hartmann <sth...@googlemail.com> Date: Sat, 18 Jul 2020 15:11:13 +0000 Subject: [PATCH] GCC: remove explicit from AtomicReference constructor --- .../nearby/src/cpp/platform_v2/public/atomic_reference.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/nearby/src/cpp/platform_v2/public/atomic_reference.h b/third_party/nearby/src/cpp/platform_v2/public/atomic_reference.h index 5742724..bbb8c01 100644 --- a/third_party/nearby/src/cpp/platform_v2/public/atomic_reference.h +++ b/third_party/nearby/src/cpp/platform_v2/public/atomic_reference.h @@ -37,7 +37,7 @@ class AtomicReference<T, std::enable_if_t<sizeof(T) <= sizeof(std::uint32_t) && final { public: using Platform = api::ImplementationPlatform; - explicit AtomicReference(T value) + AtomicReference(T value) : impl_(Platform::CreateAtomicUint32(static_cast<std::uint32_t>(value))) { } ~AtomicReference() = default; -- 2.26.2 ++++++ chromium-86-nearby-include.patch ++++++ >From a5b2ee9dd7dfb186e26ec6c0c06c2ae1a9d27195 Mon Sep 17 00:00:00 2001 From: Stephan Hartmann <sth...@googlemail.com> Date: Sat, 18 Jul 2020 14:15:50 +0000 Subject: [PATCH] IWYU: memcpy is defined in cstring --- third_party/nearby/src/cpp/platform_v2/base/byte_array.h | 1 + 1 file changed, 1 insertion(+) diff --git a/third_party/nearby/src/cpp/platform_v2/base/byte_array.h b/third_party/nearby/src/cpp/platform_v2/base/byte_array.h index ee5d0eb..4b1d79b 100644 --- a/third_party/nearby/src/cpp/platform_v2/base/byte_array.h +++ b/third_party/nearby/src/cpp/platform_v2/base/byte_array.h @@ -17,6 +17,7 @@ #include <array> #include <cstdint> +#include <cstring> #include <string> #include <type_traits> #include <utility> -- 2.26.2 ++++++ chromium-85.0.4183.121.tar.xz -> chromium-86.0.4240.75.tar.xz ++++++ /work/SRC/openSUSE:Factory/chromium/chromium-85.0.4183.121.tar.xz /work/SRC/openSUSE:Factory/.chromium.new.3486/chromium-86.0.4240.75.tar.xz differ: char 26, line 1 ++++++ chromium-master-prefs-path.patch ++++++ --- /var/tmp/diff_new_pack.qWQ3bD/_old 2020-10-18 16:29:41.524711695 +0200 +++ /var/tmp/diff_new_pack.qWQ3bD/_new 2020-10-18 16:29:41.524711695 +0200 @@ -1,14 +1,14 @@ -Index: chromium-68.0.3423.2/chrome/browser/first_run/first_run_internal_linux.cc +Index: chromium-86.0.4240.75/chrome/browser/first_run/first_run_internal_linux.cc =================================================================== ---- chromium-68.0.3423.2.orig/chrome/browser/first_run/first_run_internal_linux.cc -+++ chromium-68.0.3423.2/chrome/browser/first_run/first_run_internal_linux.cc +--- chromium-86.0.4240.75.orig/chrome/browser/first_run/first_run_internal_linux.cc ++++ chromium-86.0.4240.75/chrome/browser/first_run/first_run_internal_linux.cc @@ -20,8 +20,7 @@ bool IsOrganicFirstRun() { - base::FilePath MasterPrefsPath() { - // The standard location of the master prefs is next to the chrome binary. - base::FilePath master_prefs; -- if (!base::PathService::Get(base::DIR_EXE, &master_prefs)) + base::FilePath InitialPrefsPath() { + // The standard location of the initial prefs is next to the chrome binary. + base::FilePath initial_prefs; +- if (!base::PathService::Get(base::DIR_EXE, &initial_prefs)) - return base::FilePath(); -+ master_prefs = base::FilePath("/etc/chromium"); - return master_prefs.AppendASCII(installer::kDefaultMasterPrefs); ++ initial_prefs = base::FilePath("/etc/chromium"); + return initial_prefs.AppendASCII(installer::kDefaultMasterPrefs); } ++++++ chromium-norar.patch ++++++ --- /var/tmp/diff_new_pack.qWQ3bD/_old 2020-10-18 16:29:41.536711700 +0200 +++ /var/tmp/diff_new_pack.qWQ3bD/_new 2020-10-18 16:29:41.536711700 +0200 @@ -1,8 +1,8 @@ -Index: chromium-84.0.4136.5/chrome/common/safe_browsing/BUILD.gn +Index: chromium-86.0.4240.75/chrome/common/safe_browsing/BUILD.gn =================================================================== ---- chromium-84.0.4136.5.orig/chrome/common/safe_browsing/BUILD.gn -+++ chromium-84.0.4136.5/chrome/common/safe_browsing/BUILD.gn -@@ -54,39 +54,6 @@ if (safe_browsing_mode == 1) { +--- chromium-86.0.4240.75.orig/chrome/common/safe_browsing/BUILD.gn ++++ chromium-86.0.4240.75/chrome/common/safe_browsing/BUILD.gn +@@ -43,39 +43,6 @@ if (safe_browsing_mode == 1) { public_deps = [ "//components/safe_browsing/core:csd_proto" ] } @@ -42,7 +42,7 @@ source_set("disk_image_type_sniffer_mac") { sources = [ "disk_image_type_sniffer_mac.cc", -@@ -153,7 +120,6 @@ source_set("safe_browsing") { +@@ -138,7 +105,6 @@ source_set("safe_browsing") { ":archive_analyzer_results", ":binary_feature_extractor", ":download_type_util", @@ -50,10 +50,10 @@ "//components/safe_browsing/core:features", ] -Index: chromium-84.0.4136.5/chrome/common/safe_browsing/DEPS +Index: chromium-86.0.4240.75/chrome/common/safe_browsing/DEPS =================================================================== ---- chromium-84.0.4136.5.orig/chrome/common/safe_browsing/DEPS -+++ chromium-84.0.4136.5/chrome/common/safe_browsing/DEPS +--- chromium-86.0.4240.75.orig/chrome/common/safe_browsing/DEPS ++++ chromium-86.0.4240.75/chrome/common/safe_browsing/DEPS @@ -1,6 +1,5 @@ include_rules = [ "+components/safe_browsing", @@ -61,11 +61,11 @@ - "+third_party/unrar", "+third_party/zlib", ] -Index: chromium-84.0.4136.5/chrome/services/file_util/safe_archive_analyzer.cc +Index: chromium-86.0.4240.75/chrome/services/file_util/safe_archive_analyzer.cc =================================================================== ---- chromium-84.0.4136.5.orig/chrome/services/file_util/safe_archive_analyzer.cc -+++ chromium-84.0.4136.5/chrome/services/file_util/safe_archive_analyzer.cc -@@ -46,10 +46,14 @@ void SafeArchiveAnalyzer::AnalyzeDmgFile +--- chromium-86.0.4240.75.orig/chrome/services/file_util/safe_archive_analyzer.cc ++++ chromium-86.0.4240.75/chrome/services/file_util/safe_archive_analyzer.cc +@@ -45,10 +45,14 @@ void SafeArchiveAnalyzer::AnalyzeDmgFile void SafeArchiveAnalyzer::AnalyzeRarFile(base::File rar_file, base::File temporary_file, AnalyzeRarFileCallback callback) { @@ -80,3 +80,15 @@ + NOTREACHED(); +#endif } +Index: chromium-86.0.4240.75/chrome/services/file_util/BUILD.gn +=================================================================== +--- chromium-86.0.4240.75.orig/chrome/services/file_util/BUILD.gn ++++ chromium-86.0.4240.75/chrome/services/file_util/BUILD.gn +@@ -15,7 +15,6 @@ source_set("file_util") { + "//base", + "//chrome/common/safe_browsing", + "//chrome/common/safe_browsing:archive_analyzer_results", +- "//chrome/common/safe_browsing:rar_analyzer", + "//components/safe_browsing:buildflags", + "//mojo/public/cpp/bindings", + ] ++++++ chromium-vaapi.patch ++++++ --- /var/tmp/diff_new_pack.qWQ3bD/_old 2020-10-18 16:29:41.564711713 +0200 +++ /var/tmp/diff_new_pack.qWQ3bD/_new 2020-10-18 16:29:41.568711715 +0200 @@ -1,8 +1,8 @@ -Index: chromium-83.0.4100.3/chrome/browser/about_flags.cc +Index: chromium-86.0.4240.75/chrome/browser/about_flags.cc =================================================================== ---- chromium-83.0.4100.3.orig/chrome/browser/about_flags.cc -+++ chromium-83.0.4100.3/chrome/browser/about_flags.cc -@@ -2128,7 +2128,7 @@ const FeatureEntry kFeatureEntries[] = { +--- chromium-86.0.4240.75.orig/chrome/browser/about_flags.cc ++++ chromium-86.0.4240.75/chrome/browser/about_flags.cc +@@ -2647,7 +2647,7 @@ const FeatureEntry kFeatureEntries[] = { "disable-accelerated-video-decode", flag_descriptions::kAcceleratedVideoDecodeName, flag_descriptions::kAcceleratedVideoDecodeDescription, @@ -10,8 +10,8 @@ + kOsMac | kOsWin | kOsCrOS | kOsAndroid | kOsLinux, SINGLE_DISABLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode), }, - { -@@ -2560,10 +2560,10 @@ const FeatureEntry kFeatureEntries[] = { + #endif // defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID) +@@ -3112,10 +3112,10 @@ const FeatureEntry kFeatureEntries[] = { flag_descriptions::kWebXrForceRuntimeDescription, kOsDesktop, MULTI_VALUE_TYPE(kWebXrForceRuntimeChoices)}, #endif // ENABLE_VR @@ -24,11 +24,11 @@ SINGLE_DISABLE_VALUE_TYPE(switches::kDisableAcceleratedMjpegDecode)}, #endif // OS_CHROMEOS {"system-keyboard-lock", flag_descriptions::kSystemKeyboardLockName, -Index: chromium-83.0.4100.3/chrome/browser/flag_descriptions.cc +Index: chromium-86.0.4240.75/chrome/browser/flag_descriptions.cc =================================================================== ---- chromium-83.0.4100.3.orig/chrome/browser/flag_descriptions.cc -+++ chromium-83.0.4100.3/chrome/browser/flag_descriptions.cc -@@ -2967,15 +2967,20 @@ const char kMetalDescription[] = +--- chromium-86.0.4240.75.orig/chrome/browser/flag_descriptions.cc ++++ chromium-86.0.4240.75/chrome/browser/flag_descriptions.cc +@@ -3519,15 +3519,20 @@ const char kVideoToolboxVp9DecodingDescr #endif @@ -51,11 +51,11 @@ const char kAggregatedMlAppRankingName[] = "Rank suggested apps with ML."; const char kAggregatedMlAppRankingDescription[] = -Index: chromium-83.0.4100.3/chrome/browser/flag_descriptions.h +Index: chromium-86.0.4240.75/chrome/browser/flag_descriptions.h =================================================================== ---- chromium-83.0.4100.3.orig/chrome/browser/flag_descriptions.h -+++ chromium-83.0.4100.3/chrome/browser/flag_descriptions.h -@@ -1705,11 +1705,15 @@ extern const char kMetalDescription[]; +--- chromium-86.0.4240.75.orig/chrome/browser/flag_descriptions.h ++++ chromium-86.0.4240.75/chrome/browser/flag_descriptions.h +@@ -2028,11 +2028,15 @@ extern const char kVideoToolboxVp9Decodi // Chrome OS ------------------------------------------------------------------ @@ -72,50 +72,15 @@ extern const char kAggregatedMlAppRankingName[]; extern const char kAggregatedMlAppRankingDescription[]; -Index: chromium-83.0.4100.3/gpu/config/software_rendering_list.json +Index: chromium-86.0.4240.75/gpu/config/software_rendering_list.json =================================================================== ---- chromium-83.0.4100.3.orig/gpu/config/software_rendering_list.json -+++ chromium-83.0.4100.3/gpu/config/software_rendering_list.json -@@ -337,7 +337,7 @@ - }, - { - "id": 48, -- "description": "Accelerated video decode is unavailable on Linux", -+ "description": "Accelerated VA-API video decode is not supported on NVIDIA platforms", - "cr_bugs": [137247, 1032907], - "os": { - "type": "linux" -@@ -347,6 +347,7 @@ - "machine_model_name": ["Chromecast"] +--- chromium-86.0.4240.75.orig/gpu/config/software_rendering_list.json ++++ chromium-86.0.4240.75/gpu/config/software_rendering_list.json +@@ -353,6 +353,7 @@ + "gl_renderer": ".*SVGA3D.*" } ], + "vendor_id": "0x10de", "features": [ - "accelerated_video_decode" + "all" ] -Index: chromium-83.0.4100.3/media/gpu/test/BUILD.gn -=================================================================== ---- chromium-83.0.4100.3.orig/media/gpu/test/BUILD.gn -+++ chromium-83.0.4100.3/media/gpu/test/BUILD.gn -@@ -179,7 +179,7 @@ if (use_vaapi || use_v4l2_codec) { - } - } - --if (is_chromeos) { -+if (is_chromeos || use_vaapi) { - static_library("local_gpu_memory_buffer_manager") { - testonly = true - sources = [ -Index: chromium-83.0.4100.3/media/mojo/services/gpu_mojo_media_client.cc -=================================================================== ---- chromium-83.0.4100.3.orig/media/mojo/services/gpu_mojo_media_client.cc -+++ chromium-83.0.4100.3/media/mojo/services/gpu_mojo_media_client.cc -@@ -167,7 +167,7 @@ GpuMojoMediaClient::GetSupportedVideoDec - *d3d11_supported_configs_; - } - --#elif BUILDFLAG(USE_CHROMEOS_MEDIA_ACCELERATION) -+#elif defined(OS_CHROMEOS) && BUILDFLAG(USE_CHROMEOS_MEDIA_ACCELERATION) - if (IsNewAcceleratedVideoDecoderUsed(gpu_preferences_)) { - if (!cros_supported_configs_) { - cros_supported_configs_ = ++++++ fix-invalid-end-iterator-usage-in-CookieMonster.patch ++++++ >From 53478caee862624fc6d73516f8d64253854b146f Mon Sep 17 00:00:00 2001 From: Piotr Tworek <ptwo...@vewd.com> Date: Mon, 31 Aug 2020 21:03:58 +0000 Subject: [PATCH] Fix invalid "end" iterator usage in CookieMonster. Commit 229623d76e8baf714c8569c9f4efc5de266cef8b has introduced the following code in cookie_monster.cc. // If this is the first cookie in |cookies_| with this key, increment the // |num_keys_| counter. bool different_prev = inserted == cookies_.begin() || std::prev(inserted)->first != key; bool different_next = inserted == cookies_.end() || std::next(inserted)->first != key; if (different_prev && different_next) ++num_keys_; The "inserted" iterator is something that has been returned from std::multimap::insert. At first glance it looks reasonable. The code tries to determine if there are already similar elements with the same key in the map. Unfortunately the expression calculating the value of different_next can potentially use the end iterator to the map. The "inserted == cookies_.end()" part of the expression will always evaluate to false since the newly inserted element has to be in the map and cookies_.end() points to the first element outside the map. If the inserted happens to be the last element in the map the second part of the expression will grab the end iterator by calling std::next(inserted) and then will try to use it leading to invalid memory access. Given the fact that cookies_ is a std::multimap we should not even need to calculate the value of different_next. It should always be true. "If the container has elements with equivalent key, inserts at the upper bound of that range.(since C++11)" See: https://en.cppreference.com/w/cpp/container/multimap/insert Bug: 1120240 Change-Id: I8928c294ac4daf72349a2331b31b017c1d015da0 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2368872 Reviewed-by: Maksim Orlovich <morlov...@chromium.org> Commit-Queue: Piotr Tworek <ptwo...@vewd.com> Cr-Commit-Position: refs/heads/master@{#803260} --- net/cookies/cookie_monster.cc | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/net/cookies/cookie_monster.cc b/net/cookies/cookie_monster.cc index 265deed0e52..140b61a81dc 100644 --- a/net/cookies/cookie_monster.cc +++ b/net/cookies/cookie_monster.cc @@ -1151,9 +1151,14 @@ CookieMonster::CookieMap::iterator CookieMonster::InternalInsertCookie( // |num_keys_| counter. bool different_prev = inserted == cookies_.begin() || std::prev(inserted)->first != key; - bool different_next = - inserted == cookies_.end() || std::next(inserted)->first != key; - if (different_prev && different_next) + // According to std::multiqueue documentation: + // "If the container has elements with equivalent key, inserts at the upper + // bound of that range. (since C++11)" + // This means that "inserted" iterator either points to the last element in + // the map, or the element succeeding it has to have different key. + DCHECK(std::next(inserted) == cookies_.end() || + std::next(inserted)->first != key); + if (different_prev) ++num_keys_; return inserted; @@ -1381,7 +1386,7 @@ void CookieMonster::InternalDeleteCookie(CookieMap::iterator it, bool different_prev = it == cookies_.begin() || std::prev(it)->first != it->first; bool different_next = - it == cookies_.end() || std::next(it)->first != it->first; + std::next(it) == cookies_.end() || std::next(it)->first != it->first; if (different_prev && different_next) --num_keys_; ++++++ no-location-leap151.patch ++++++ --- /var/tmp/diff_new_pack.qWQ3bD/_old 2020-10-18 16:29:41.636711745 +0200 +++ /var/tmp/diff_new_pack.qWQ3bD/_new 2020-10-18 16:29:41.636711745 +0200 @@ -1,25 +1,20 @@ -Index: chromium-83.0.4103.116/base/location.h +Index: chromium-86.0.4240.75/base/location.h =================================================================== ---- chromium-83.0.4103.116.orig/base/location.h -+++ chromium-83.0.4103.116/base/location.h -@@ -18,12 +18,7 @@ - - namespace base { - --#if defined(__has_builtin) --// Clang allows detection of these builtins. --#define SUPPORTS_LOCATION_BUILTINS \ -- (__has_builtin(__builtin_FUNCTION) && __has_builtin(__builtin_FILE) && \ -- __has_builtin(__builtin_LINE)) +--- chromium-86.0.4240.75.orig/base/location.h ++++ chromium-86.0.4240.75/base/location.h +@@ -23,7 +23,7 @@ namespace base { + #define SUPPORTS_LOCATION_BUILTINS \ + (__has_builtin(__builtin_FUNCTION) && __has_builtin(__builtin_FILE) && \ + __has_builtin(__builtin_LINE)) -#elif defined(COMPILER_GCC) && __GNUC__ >= 7 -+#if defined(COMPILER_GCC) && __GNUC__ >= 10 ++#elif defined(COMPILER_GCC) && __GNUC__ >= 10 // GCC has supported these for a long time, but they point at the function // declaration in the case of default arguments, rather than at the call site. #define SUPPORTS_LOCATION_BUILTINS 1 -Index: chromium-83.0.4103.116/base/location.cc +Index: chromium-86.0.4240.75/base/location.cc =================================================================== ---- chromium-83.0.4103.116.orig/base/location.cc -+++ chromium-83.0.4103.116/base/location.cc +--- chromium-86.0.4240.75.orig/base/location.cc ++++ chromium-86.0.4240.75/base/location.cc @@ -92,7 +92,7 @@ NOINLINE Location Location::Current(cons #else // static @@ -29,18 +24,3 @@ } #endif -Index: chromium-83.0.4103.116/media/base/media_serializers.h -=================================================================== ---- chromium-83.0.4103.116.orig/media/base/media_serializers.h -+++ chromium-83.0.4103.116/media/base/media_serializers.h -@@ -377,8 +377,8 @@ template <> - struct MediaSerializer<base::Location> { - static base::Value Serialize(const base::Location& value) { - base::Value result(base::Value::Type::DICTIONARY); -- FIELD_SERIALIZE("file", value.file_name()); -- FIELD_SERIALIZE("line", value.line_number()); -+ FIELD_SERIALIZE("file", value.file_name() ? value.file_name() : "unknown"); -+ FIELD_SERIALIZE("line", value.line_number() ? value.line_number() : 0); - return result; - } - };