diff --git a/srcpkgs/chromium/files/musl-patches/no-mallinfo.patch b/srcpkgs/chromium/files/musl-patches/no-mallinfo.patch index 288f8670c06..23ede1699bf 100644 --- a/srcpkgs/chromium/files/musl-patches/no-mallinfo.patch +++ b/srcpkgs/chromium/files/musl-patches/no-mallinfo.patch @@ -9,18 +9,16 @@ struct mallinfo info = mallinfo(); DCHECK_GE(info.arena + info.hblkhd, info.uordblks); -diff --git a/base/process/process_metrics_posix.cc b/base/process/process_metrics_posix.cc -index 0eb5c1f..8af7799 100644 ---- base/process/process_metrics_posix.cc -+++ base/process/process_metrics_posix.cc -@@ -94,14 +94,14 @@ size_t ProcessMetrics::GetMallocUsage() { +--- base/process/process_metrics_posix.cc.orig 2019-10-24 11:10:48.553159245 -0400 ++++ base/process/process_metrics_posix.cc 2019-10-24 11:14:29.025025854 -0400 +@@ -110,14 +110,14 @@ malloc_statistics_t stats = {0}; malloc_zone_statistics(nullptr, &stats); return stats.size_in_use; -#elif defined(OS_LINUX) || defined(OS_ANDROID) +#elif defined(__GLIBC__) || defined(OS_ANDROID) struct mallinfo minfo = mallinfo(); - #if defined(USE_TCMALLOC) + #if BUILDFLAG(USE_TCMALLOC) return minfo.uordblks; #else return minfo.hblkhd + minfo.arena; diff --git a/srcpkgs/chromium/files/musl-patches/resolver.patch b/srcpkgs/chromium/files/musl-patches/resolver.patch index a115bb39fef..da1edb3e472 100644 --- a/srcpkgs/chromium/files/musl-patches/resolver.patch +++ b/srcpkgs/chromium/files/musl-patches/resolver.patch @@ -1,9 +1,9 @@ ---- net/dns/host_resolver_manager.cc.orig 2019-07-03 11:19:00.047692874 -0400 -+++ net/dns/host_resolver_manager.cc 2019-07-03 11:20:24.438679210 -0400 -@@ -2266,8 +2266,7 @@ - NetworkChangeNotifier::AddIPAddressObserver(this); +--- net/dns/host_resolver_manager.cc.orig 2019-10-24 11:20:16.353541895 -0400 ++++ net/dns/host_resolver_manager.cc 2019-10-24 11:22:37.799381010 -0400 +@@ -2386,8 +2386,7 @@ NetworkChangeNotifier::AddConnectionTypeObserver(this); - NetworkChangeNotifier::AddDNSObserver(this); + if (system_dns_config_notifier_) + system_dns_config_notifier_->AddObserver(this); -#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_OPENBSD) && \ - !defined(OS_ANDROID) +#if defined(__GLIBC__) diff --git a/srcpkgs/chromium/patches/chromium-enable-vaapi.patch b/srcpkgs/chromium/patches/chromium-enable-vaapi.patch index 01c253de5ff..caad6969432 100644 --- a/srcpkgs/chromium/patches/chromium-enable-vaapi.patch +++ b/srcpkgs/chromium/patches/chromium-enable-vaapi.patch @@ -40,7 +40,7 @@ Index: dev/chrome/browser/about_flags.cc =================================================================== --- chrome/browser/about_flags.cc +++ chrome/browser/about_flags.cc -@@ -1527,7 +1527,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -1772,7 +1772,7 @@ const FeatureEntry kFeatureEntries[] = { "disable-accelerated-video-decode", flag_descriptions::kAcceleratedVideoDecodeName, flag_descriptions::kAcceleratedVideoDecodeDescription, @@ -49,7 +49,7 @@ Index: dev/chrome/browser/about_flags.cc SINGLE_DISABLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode), }, { -@@ -1993,10 +1993,10 @@ const FeatureEntry kFeatureEntries[] = { +@@ -2245,10 +2245,10 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(service_manager::features::kXRSandbox)}, #endif // !defined(OS_ANDROID) #endif // ENABLE_VR @@ -66,7 +66,7 @@ Index: dev/chrome/browser/flag_descriptions.cc =================================================================== --- chrome/browser/flag_descriptions.cc +++ chrome/browser/flag_descriptions.cc -@@ -2880,9 +2880,7 @@ const char kMacSystemMediaPermissionsInf +@@ -3110,9 +3110,7 @@ const char kMacSystemMediaPermissionsInf #endif @@ -77,7 +77,7 @@ Index: dev/chrome/browser/flag_descriptions.cc const char kAcceleratedMjpegDecodeName[] = "Hardware-accelerated mjpeg decode for captured frame"; -@@ -2890,6 +2888,12 @@ const char kAcceleratedMjpegDecodeDescri +@@ -3120,6 +3118,12 @@ const char kAcceleratedMjpegDecodeDescri "Enable hardware-accelerated mjpeg decode for captured frame where " "available."; @@ -87,14 +87,14 @@ Index: dev/chrome/browser/flag_descriptions.cc + +#if defined(OS_CHROMEOS) + - const char kAppServiceAshName[] = "App Service Ash"; - const char kAppServiceAshDescription[] = - "Use the App Service to provide data to the Ash UI, such as the shelf and " + const char kAggregatedMlAppRankingName[] = "Rank suggested apps with ML."; + const char kAggregatedMlAppRankingDescription[] = + "Use the aggregated ML model to rank the suggested apps."; Index: dev/chrome/browser/flag_descriptions.h =================================================================== --- chrome/browser/flag_descriptions.h +++ chrome/browser/flag_descriptions.h -@@ -1715,13 +1715,17 @@ extern const char kPermissionPromptPersi +@@ -1838,13 +1838,17 @@ extern const char kPermissionPromptPersi #endif // defined(OS_MACOSX) @@ -112,8 +112,8 @@ Index: dev/chrome/browser/flag_descriptions.h + +#if defined(OS_CHROMEOS) + - extern const char kAppServiceAshName[]; - extern const char kAppServiceAshDescription[]; + extern const char kAggregatedMlAppRankingName[]; + extern const char kAggregatedMlAppRankingDescription[]; Index: dev/content/gpu/BUILD.gn =================================================================== @@ -140,7 +140,7 @@ Index: dev/gpu/config/software_rendering_list.json =================================================================== --- gpu/config/software_rendering_list.json +++ gpu/config/software_rendering_list.json -@@ -369,17 +369,6 @@ +@@ -333,17 +333,6 @@ ] }, { @@ -162,7 +162,7 @@ Index: dev/media/base/media_switches.cc =================================================================== --- media/base/media_switches.cc +++ media/base/media_switches.cc -@@ -544,7 +544,7 @@ bool IsVideoCaptureAcceleratedJpegDecodi +@@ -619,7 +619,7 @@ bool IsVideoCaptureAcceleratedJpegDecodi switches::kUseFakeMjpegDecodeAccelerator)) { return true; } @@ -171,32 +171,11 @@ Index: dev/media/base/media_switches.cc return true; #endif return false; -Index: dev/media/filters/BUILD.gn -=================================================================== ---- media/filters/BUILD.gn -+++ media/filters/BUILD.gn -@@ -5,6 +5,7 @@ - import("//build/config/jumbo.gni") - import("//media/media_options.gni") - import("//third_party/libaom/options.gni") -+import("//media/gpu/args.gni") - - jumbo_source_set("filters") { - # Do not expand the visibility here without double-checking with OWNERS, this -@@ -196,7 +197,7 @@ jumbo_source_set("filters") { - deps += [ "//media/base/android" ] - } - -- if (current_cpu != "arm" && is_linux) { -+ if (use_vaapi) { - sources += [ - "h264_bitstream_buffer.cc", - "h264_bitstream_buffer.h", Index: dev/media/gpu/BUILD.gn =================================================================== --- media/gpu/BUILD.gn +++ media/gpu/BUILD.gn -@@ -531,6 +531,7 @@ if (use_v4l2_codec || use_vaapi || is_ma +@@ -541,6 +541,7 @@ if (use_v4l2_codec || use_vaapi || is_ma if (use_ozone) { deps += [ "//ui/ozone" ] } @@ -208,7 +187,7 @@ Index: dev/media/gpu/gpu_video_decode_accelerator_factory.cc =================================================================== --- media/gpu/gpu_video_decode_accelerator_factory.cc +++ media/gpu/gpu_video_decode_accelerator_factory.cc -@@ -171,6 +171,8 @@ GpuVideoDecodeAcceleratorFactory::Create +@@ -185,6 +185,8 @@ GpuVideoDecodeAcceleratorFactory::Create vda = (this->*create_vda_function)(workarounds, gpu_preferences, media_log); if (vda && vda->Initialize(config, client)) return vda; @@ -217,7 +196,7 @@ Index: dev/media/gpu/gpu_video_decode_accelerator_factory.cc } return nullptr; -@@ -229,6 +231,7 @@ GpuVideoDecodeAcceleratorFactory::Create +@@ -243,6 +245,7 @@ GpuVideoDecodeAcceleratorFactory::Create const gpu::GpuDriverBugWorkarounds& workarounds, const gpu::GpuPreferences& gpu_preferences, MediaLog* media_log) const { @@ -249,7 +228,7 @@ Index: dev/media/gpu/vaapi/vaapi_video_decode_accelerator.cc =================================================================== --- media/gpu/vaapi/vaapi_video_decode_accelerator.cc +++ media/gpu/vaapi/vaapi_video_decode_accelerator.cc -@@ -64,6 +64,7 @@ void ReportToUMA(VAVDADecoderFailure fai +@@ -63,6 +63,7 @@ void ReportToUMA(VAVDADecoderFailure fai VAVDA_DECODER_FAILURES_MAX + 1); } @@ -257,7 +236,7 @@ Index: dev/media/gpu/vaapi/vaapi_video_decode_accelerator.cc // Returns true if the CPU is an Intel Gemini Lake or later (including Kaby // Lake) Cpu platform id's are referenced from the following file in kernel // source arch/x86/include/asm/intel-family.h -@@ -76,6 +77,7 @@ bool IsGeminiLakeOrLater() { +@@ -75,6 +76,7 @@ bool IsGeminiLakeOrLater() { cpuid.model() >= kGeminiLakeModelId; return is_geminilake_or_later; } @@ -265,7 +244,7 @@ Index: dev/media/gpu/vaapi/vaapi_video_decode_accelerator.cc } // namespace -@@ -632,6 +634,10 @@ void VaapiVideoDecodeAccelerator::Assign +@@ -637,6 +639,10 @@ void VaapiVideoDecodeAccelerator::Assign va_surface_format_ = GetVaFormatForVideoCodecProfile(profile_); std::vector va_surface_ids; @@ -276,7 +255,7 @@ Index: dev/media/gpu/vaapi/vaapi_video_decode_accelerator.cc // If we aren't in BufferAllocationMode::kNone, we have to allocate a // |vpp_vaapi_wrapper_| for VaapiPicture to DownloadFromSurface() the VA's // internal decoded frame. -@@ -645,15 +651,20 @@ void VaapiVideoDecodeAccelerator::Assign +@@ -650,6 +656,7 @@ void VaapiVideoDecodeAccelerator::Assign NotifyError(PLATFORM_FAILURE); } } @@ -284,8 +263,9 @@ Index: dev/media/gpu/vaapi/vaapi_video_decode_accelerator.cc for (size_t i = 0; i < buffers.size(); ++i) { // If we aren't in BufferAllocationMode::kNone, this |picture| is - // only used as a copy destination. Therefore, the VaapiWrapper used and - // owned by |picture| is |vpp_vaapi_wrapper_|. +@@ -661,9 +668,13 @@ void VaapiVideoDecodeAccelerator::Assign + PictureBuffer buffer = buffers[i]; + buffer.set_size(requested_pic_size_); std::unique_ptr picture = vaapi_picture_factory_->Create( +#if defined(OS_LINUX) && !defined(OS_ANDROID) && !defined(OS_CHROMEOS) + vaapi_wrapper_, @@ -294,10 +274,10 @@ Index: dev/media/gpu/vaapi/vaapi_video_decode_accelerator.cc ? vaapi_wrapper_ : vpp_vaapi_wrapper_, +#endif - make_context_current_cb_, bind_image_cb_, buffers[i]); + make_context_current_cb_, bind_image_cb_, buffer); RETURN_AND_NOTIFY_ON_FAILURE(picture, "Failed creating a VaapiPicture", PLATFORM_FAILURE, ); -@@ -1078,6 +1089,9 @@ VaapiVideoDecodeAccelerator::GetSupporte +@@ -1089,6 +1100,9 @@ VaapiVideoDecodeAccelerator::GetSupporte VaapiVideoDecodeAccelerator::BufferAllocationMode VaapiVideoDecodeAccelerator::DecideBufferAllocationMode() { @@ -307,7 +287,7 @@ Index: dev/media/gpu/vaapi/vaapi_video_decode_accelerator.cc // TODO(crbug.com/912295): Enable a better BufferAllocationMode for IMPORT // |output_mode_| as well. if (output_mode_ == VideoDecodeAccelerator::Config::OutputMode::IMPORT) -@@ -1113,6 +1127,7 @@ VaapiVideoDecodeAccelerator::DecideBuffe +@@ -1124,6 +1138,7 @@ VaapiVideoDecodeAccelerator::DecideBuffe return BufferAllocationMode::kReduced; return BufferAllocationMode::kSuperReduced; @@ -319,7 +299,7 @@ Index: dev/media/gpu/vaapi/vaapi_wrapper.cc =================================================================== --- media/gpu/vaapi/vaapi_wrapper.cc +++ media/gpu/vaapi/vaapi_wrapper.cc -@@ -324,6 +324,11 @@ void VADisplayState::PreSandboxInitializ +@@ -325,6 +325,11 @@ void VADisplayState::PreSandboxInitializ base::File::FLAG_OPEN | base::File::FLAG_READ | base::File::FLAG_WRITE); if (drm_file.IsValid()) VADisplayState::Get()->SetDrmFd(drm_file.GetPlatformFile()); @@ -331,7 +311,7 @@ Index: dev/media/gpu/vaapi/vaapi_wrapper.cc } VADisplayState::VADisplayState() -@@ -351,10 +356,6 @@ bool VADisplayState::Initialize() { +@@ -352,10 +357,6 @@ bool VADisplayState::Initialize() { } bool VADisplayState::InitializeOnce() { @@ -342,7 +322,7 @@ Index: dev/media/gpu/vaapi/vaapi_wrapper.cc switch (gl::GetGLImplementation()) { case gl::kGLImplementationEGLGLES2: va_display_ = vaGetDisplayDRM(drm_fd_.get()); -@@ -362,10 +363,10 @@ bool VADisplayState::InitializeOnce() { +@@ -363,10 +364,10 @@ bool VADisplayState::InitializeOnce() { case gl::kGLImplementationDesktopGL: #if defined(USE_X11) va_display_ = vaGetDisplay(gfx::GetXDisplay()); @@ -356,7 +336,7 @@ Index: dev/media/gpu/vaapi/vaapi_wrapper.cc break; // Cannot infer platform from GL, try all available displays case gl::kGLImplementationNone: -@@ -398,8 +399,19 @@ bool VADisplayState::InitializeOnce() { +@@ -399,8 +400,19 @@ bool VADisplayState::InitializeOnce() { int major_version, minor_version; VAStatus va_res = vaInitialize(va_display_, &major_version, &minor_version); if (va_res != VA_STATUS_SUCCESS) { @@ -378,7 +358,7 @@ Index: dev/media/gpu/vaapi/vaapi_wrapper.cc } va_initialized_ = true; -@@ -407,7 +419,7 @@ bool VADisplayState::InitializeOnce() { +@@ -408,7 +420,7 @@ bool VADisplayState::InitializeOnce() { va_vendor_string_ = vaQueryVendorString(va_display_); DLOG_IF(WARNING, va_vendor_string_.empty()) << "Vendor string empty or error reading."; @@ -387,7 +367,7 @@ Index: dev/media/gpu/vaapi/vaapi_wrapper.cc << va_vendor_string_; // The VAAPI version is determined from what is loaded on the system by -@@ -742,7 +754,7 @@ bool VASupportedProfiles::AreAttribsSupp +@@ -740,7 +752,7 @@ bool VASupportedProfiles::AreAttribsSupp if (attribs[i].type != required_attribs[i].type || (attribs[i].value & required_attribs[i].value) != required_attribs[i].value) { diff --git a/srcpkgs/chromium/patches/harfbuzz-subset.patch b/srcpkgs/chromium/patches/harfbuzz-subset.patch deleted file mode 100644 index 6f228b774d4..00000000000 --- a/srcpkgs/chromium/patches/harfbuzz-subset.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 27e25336b8316ff3ec4e464058682ed85801fd06 Mon Sep 17 00:00:00 2001 -From: Raphael Kubo da Costa -Date: Mon, 29 Jul 2019 10:54:28 +0000 -Subject: [PATCH] Also link against libharfbuzz-subset when use_system_harfbuzz is true - -When building HarfBuzz as part of Chromium, there is a single source set -with all the files we need in the build. - -Upstream HarfBuzz, on the other hand, produces a few different libraries: -harfbuzz, harfbuzz-icu and harfbuzz-subset. When |use_system_harfbuzz| is -true, we were only looking for (and using) harfbuzz.pc with pkg-config even -though we also use symbols from libharfbuzz-subset.so. This resulted in -errors when linking: - - ld: obj/skia/skia/SkPDFSubsetFont.o: in function `SkPDFSubsetFont(sk_sp, SkPDFGlyphUse const&, SkPDF::Metadata::Subsetter, char const*, int)': - SkPDFSubsetFont.cpp:(.text._Z15SkPDFSubsetFont5sk_spI6SkDataERK13SkPDFGlyphUseN5SkPDF8Metadata9SubsetterEPKci+0x48a): undefined reference to `hb_subset_input_create_or_fail' - ld: SkPDFSubsetFont.cpp:(.text._Z15SkPDFSubsetFont5sk_spI6SkDataERK13SkPDFGlyphUseN5SkPDF8Metadata9SubsetterEPKci+0x4af): undefined reference to `hb_subset_input_glyph_set' - ld: SkPDFSubsetFont.cpp:(.text._Z15SkPDFSubsetFont5sk_spI6SkDataERK13SkPDFGlyphUseN5SkPDF8Metadata9SubsetterEPKci+0x5d7): undefined reference to `hb_subset_input_set_retain_gids' - ld: SkPDFSubsetFont.cpp:(.text._Z15SkPDFSubsetFont5sk_spI6SkDataERK13SkPDFGlyphUseN5SkPDF8Metadata9SubsetterEPKci+0x5e4): undefined reference to `hb_subset_input_set_drop_hints' - ld: SkPDFSubsetFont.cpp:(.text._Z15SkPDFSubsetFont5sk_spI6SkDataERK13SkPDFGlyphUseN5SkPDF8Metadata9SubsetterEPKci+0x5f3): undefined reference to `hb_subset' - ld: SkPDFSubsetFont.cpp:(.text._Z15SkPDFSubsetFont5sk_spI6SkDataERK13SkPDFGlyphUseN5SkPDF8Metadata9SubsetterEPKci+0x66f): undefined reference to `hb_subset_input_destroy' - -as reported in -https://groups.google.com/a/chromium.org/d/msg/chromium-packagers/UyJsVJ5QqWo/jSv5z7-rEQAJ - -Change-Id: I997af075c7b7263cd7cc71a63db5b0f93bd1ab59 -Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1715288 -Auto-Submit: Raphael Kubo da Costa -Commit-Queue: Dominik Röttsches -Reviewed-by: Dominik Röttsches -Cr-Commit-Position: refs/heads/master@{#681760} ---- - -diff --git a/third_party/harfbuzz-ng/BUILD.gn b/third_party/harfbuzz-ng/BUILD.gn -index 37d8e33..72013eb1d 100644 ---- third_party/harfbuzz-ng/BUILD.gn -+++ third_party/harfbuzz-ng/BUILD.gn -@@ -16,7 +16,10 @@ - "//third_party:freetype_harfbuzz", - "//third_party/freetype:freetype_source", - ] -- packages = [ "harfbuzz" ] -+ packages = [ -+ "harfbuzz", -+ "harfbuzz-subset", -+ ] - } - } else { - config("harfbuzz_config") { diff --git a/srcpkgs/chromium/patches/linked-hash-set.patch b/srcpkgs/chromium/patches/linked-hash-set.patch deleted file mode 100644 index 24b13d8a5c0..00000000000 --- a/srcpkgs/chromium/patches/linked-hash-set.patch +++ /dev/null @@ -1,130 +0,0 @@ -From 74138b9febd37eac0fc26b8efb110014a83a52c6 Mon Sep 17 00:00:00 2001 -From: Jeremy Roman -Date: Wed, 07 Aug 2019 13:26:48 +0000 -Subject: [PATCH] WTF: Make LinkedHashSet understand values for which memset initialization would be bad. - -Includes a unit test which fails before, and uses this to fix FontCacheKeyTraits. - -Bug: 980025 -Change-Id: If41f97444c7fd37b9b95d6dadaf3da5689079e9e -Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1739948 -Reviewed-by: Kentaro Hara -Reviewed-by: Yutaka Hirano -Commit-Queue: Jeremy Roman -Cr-Commit-Position: refs/heads/master@{#684731} ---- - -diff --git a/third_party/blink/renderer/platform/fonts/font_cache_key.h b/third_party/blink/renderer/platform/fonts/font_cache_key.h -index 0efc8fb..90063cb 100644 ---- third_party/blink/renderer/platform/fonts/font_cache_key.h -+++ third_party/blink/renderer/platform/fonts/font_cache_key.h -@@ -133,6 +133,10 @@ - - struct FontCacheKeyTraits : WTF::SimpleClassHashTraits { - STATIC_ONLY(FontCacheKeyTraits); -+ -+ // std::string's empty state need not be zero in all implementations, -+ // and it is held within FontFaceCreationParams. -+ static const bool kEmptyValueIsZero = false; - }; - - } // namespace blink -diff --git a/third_party/blink/renderer/platform/wtf/linked_hash_set.h b/third_party/blink/renderer/platform/wtf/linked_hash_set.h -index b35b6e9..77e524c 100644 ---- third_party/blink/renderer/platform/wtf/linked_hash_set.h -+++ third_party/blink/renderer/platform/wtf/linked_hash_set.h -@@ -146,6 +146,11 @@ - LinkedHashSetNodeBase* next) - : LinkedHashSetNodeBase(prev, next), value_(value) {} - -+ LinkedHashSetNode(ValueArg&& value, -+ LinkedHashSetNodeBase* prev, -+ LinkedHashSetNodeBase* next) -+ : LinkedHashSetNodeBase(prev, next), value_(std::move(value)) {} -+ - LinkedHashSetNode(LinkedHashSetNode&& other) - : LinkedHashSetNodeBase(std::move(other)), - value_(std::move(other.value_)) {} -@@ -445,10 +450,13 @@ - - // The slot is empty when the next_ field is zero so it's safe to zero - // the backing. -- static const bool kEmptyValueIsZero = true; -+ static const bool kEmptyValueIsZero = ValueTraits::kEmptyValueIsZero; - - static const bool kHasIsEmptyValueFunction = true; - static bool IsEmptyValue(const Node& node) { return !node.next_; } -+ static Node EmptyValue() { -+ return Node(ValueTraits::EmptyValue(), nullptr, nullptr); -+ } - - static const int kDeletedValue = -1; - -diff --git a/third_party/blink/renderer/platform/wtf/list_hash_set_test.cc b/third_party/blink/renderer/platform/wtf/list_hash_set_test.cc -index 4c3f899..cd1be00 100644 ---- third_party/blink/renderer/platform/wtf/list_hash_set_test.cc -+++ third_party/blink/renderer/platform/wtf/list_hash_set_test.cc -@@ -487,6 +487,7 @@ - }; - - struct Complicated { -+ Complicated() : Complicated(0) {} - Complicated(int value) : simple_(value) { objects_constructed_++; } - - Complicated(const Complicated& other) : simple_(other.simple_) { -@@ -495,9 +496,6 @@ - - Simple simple_; - static int objects_constructed_; -- -- private: -- Complicated() = delete; - }; - - int Complicated::objects_constructed_ = 0; -@@ -731,4 +729,45 @@ - - } // anonymous namespace - -+// A unit type which objects to its state being initialized wrong. -+struct InvalidZeroValue { -+ InvalidZeroValue() = default; -+ InvalidZeroValue(WTF::HashTableDeletedValueType) : deleted_(true) {} -+ ~InvalidZeroValue() { CHECK(ok_); } -+ bool IsHashTableDeletedValue() const { return deleted_; } -+ -+ bool ok_ = true; -+ bool deleted_ = false; -+}; -+ -+template <> -+struct HashTraits : SimpleClassHashTraits { -+ static const bool kEmptyValueIsZero = false; -+}; -+ -+template <> -+struct DefaultHash { -+ struct Hash { -+ static unsigned GetHash(const InvalidZeroValue&) { return 0; } -+ static bool Equal(const InvalidZeroValue&, const InvalidZeroValue&) { -+ return true; -+ } -+ }; -+}; -+ -+template -+class ListOrLinkedHashSetInvalidZeroTest : public testing::Test {}; -+ -+using InvalidZeroValueSetTypes = -+ testing::Types, -+ ListHashSet, -+ LinkedHashSet>; -+TYPED_TEST_SUITE(ListOrLinkedHashSetInvalidZeroTest, InvalidZeroValueSetTypes); -+ -+TYPED_TEST(ListOrLinkedHashSetInvalidZeroTest, InvalidZeroValue) { -+ using Set = TypeParam; -+ Set set; -+ set.insert(InvalidZeroValue()); -+} -+ - } // namespace WTF diff --git a/srcpkgs/chromium/patches/llvm-remove-unsupported-compiler-warnings.patch b/srcpkgs/chromium/patches/llvm-remove-unsupported-compiler-warnings.patch new file mode 100644 index 00000000000..4de8aea9f57 --- /dev/null +++ b/srcpkgs/chromium/patches/llvm-remove-unsupported-compiler-warnings.patch @@ -0,0 +1,40 @@ +--- build/config/compiler/BUILD.gn 2019-10-24 11:01:40.459910040 -0400 ++++ build/config/compiler/BUILD.gn 2019-10-24 11:04:19.690063743 -0400 +@@ -1492,37 +1492,6 @@ + # Currently goma can not handle case sensitiveness for windows well. + cflags += [ "-Wno-nonportable-include-path" ] + } +- +- 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/995200): Clean up and enable. +- "-Wno-xor-used-as-pow", +- +- # TODO(https://crbug.com/999871): Decide if we want to clean up the +- # codebase or just disable this. Doesn't seem super useful, but +- # also fires in only 4 files. +- "-Wno-c99-designator", +- +- # This is a side effect of -Wc99-designator; easier to clean up. +- "-Wno-reorder-init-list", +- +- # TODO(https://crbug.com/999886): Clean up, enable. +- "-Wno-final-dtor-non-final-class", +- ] +- cflags_c += [ +- # TODO(https://crbug.com/995993): Clean up and enable. +- "-Wno-implicit-fallthrough", +- ] +- } + } + } + } diff --git a/srcpkgs/chromium/patches/one_euro_filter.patch b/srcpkgs/chromium/patches/one_euro_filter.patch deleted file mode 100644 index 357babf1668..00000000000 --- a/srcpkgs/chromium/patches/one_euro_filter.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- third_party/one_euro_filter/src/one_euro_filter.h.orig 2019-09-29 21:21:03.958633609 -0400 -+++ third_party/one_euro_filter/src/one_euro_filter.h 2019-09-29 21:21:54.128270940 -0400 -@@ -3,6 +3,8 @@ - - #include "low_pass_filter.h" - -+#include -+ - namespace one_euro_filter { - namespace test { - class OneEuroFilterTest; diff --git a/srcpkgs/chromium/patches/upstream-add-missing-include-for-unique_ptr.patch b/srcpkgs/chromium/patches/upstream-add-missing-include-for-unique_ptr.patch new file mode 100644 index 00000000000..3b9455f386e --- /dev/null +++ b/srcpkgs/chromium/patches/upstream-add-missing-include-for-unique_ptr.patch @@ -0,0 +1,30 @@ +From bbfe2665923225b4a7c436ba2b6c7e5f695f2e52 Mon Sep 17 00:00:00 2001 +From: David Landell +Date: Fri, 13 Sep 2019 12:24:13 +0000 +Subject: [PATCH] Add missing include for unique_ptr +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Change-Id: I614d2f42868d563eb6a92dfb2aae08286e20d687 +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1803137 +Reviewed-by: Henrik Boström +Commit-Queue: Henrik Boström +Cr-Commit-Position: refs/heads/master@{#696355} +--- + third_party/blink/public/platform/web_rtc_rtp_source.h | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/third_party/blink/public/platform/web_rtc_rtp_source.h b/third_party/blink/public/platform/web_rtc_rtp_source.h +index 959440f7a5..c3fd5421aa 100644 +--- third_party/blink/public/platform/web_rtc_rtp_source.h ++++ third_party/blink/public/platform/web_rtc_rtp_source.h +@@ -5,6 +5,8 @@ + #ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_RTC_RTP_SOURCE_H_ + #define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_RTC_RTP_SOURCE_H_ + ++#include ++ + #include "base/optional.h" + #include "third_party/blink/public/platform/web_common.h" + diff --git a/srcpkgs/chromium/patches/upstream-dns_util-make-DohUpgradeEntry-non-const.patch b/srcpkgs/chromium/patches/upstream-dns_util-make-DohUpgradeEntry-non-const.patch new file mode 100644 index 00000000000..4fa4bedc1f0 --- /dev/null +++ b/srcpkgs/chromium/patches/upstream-dns_util-make-DohUpgradeEntry-non-const.patch @@ -0,0 +1,86 @@ +From f4c3c329588b78af63aad8b401da767242b86709 Mon Sep 17 00:00:00 2001 +From: Raphael Kubo da Costa +Date: Mon, 16 Sep 2019 17:05:42 +0000 +Subject: [PATCH] dns_util: Make DohUpgradeEntry non-const when used with + std::vector<> + +This fixes the build with libstdc++ (with most other standard libraries +other than libc++, in fact) after commit f93a48e3 ("Allow upgrade to DoH +during automatic mode"): + +../../../../../../usr/bin/../lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/bits/stl_vector.h:351:7: error: static_assert failed due to requirement 'is_same::type, const DohUpgradeEntry>::value' "std::vector must have a non-const, non-volatile value_type" + static_assert(is_same::type, _Tp>::value, + ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +../../base/no_destructor.h:77:28: note: in instantiation of template class 'std::vector >' requested here + alignas(T) char storage_[sizeof(T)]; + ^ +../../net/dns/dns_util.cc:147:7: note: in instantiation of template class 'base::NoDestructor > >' requested here + upgradable_servers({ + ^ +../../net/dns/dns_util.cc:230:36: error: invalid range expression of type 'const std::vector >'; no viable 'begin' function available + for (const auto& upgrade_entry : upgradable_servers) { + ^ ~~~~~~~~~~~~~~~~~~ + +The C++ standard forbids containers of const elements. Callers of +GetDohUpgradeList() use it in a safe way anyway, and most of +DohUpgradeEntry's members are const. + +Bug: 957519 +Change-Id: I826a51823edb1184c0fae27105101e2894efe568 +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1805636 +Auto-Submit: Raphael Kubo da Costa +Commit-Queue: Eric Orth +Reviewed-by: Eric Orth +Cr-Commit-Position: refs/heads/master@{#696834} +--- + net/dns/dns_util.cc | 13 +++++-------- + 1 file changed, 5 insertions(+), 8 deletions(-) + +diff --git a/net/dns/dns_util.cc b/net/dns/dns_util.cc +index d83ff7c150..14997c48b2 100644 +--- net/dns/dns_util.cc ++++ net/dns/dns_util.cc +@@ -139,11 +139,11 @@ struct DohUpgradeEntry { + const DnsConfig::DnsOverHttpsServerConfig dns_over_https_config; + }; + +-const std::vector& GetDohUpgradeList() { ++const std::vector& GetDohUpgradeList() { + // The provider names in these entries should be kept in sync with the + // DohProviderId histogram suffix list in + // tools/metrics/histograms/histograms.xml. +- static const base::NoDestructor> ++ static const base::NoDestructor> + upgradable_servers({ + DohUpgradeEntry( + "CleanBrowsingAdult", +@@ -222,8 +222,7 @@ const std::vector& GetDohUpgradeList() { + std::vector GetDohUpgradeEntriesFromNameservers( + const std::vector& dns_servers, + const std::vector& excluded_providers) { +- const std::vector& upgradable_servers = +- GetDohUpgradeList(); ++ const std::vector& upgradable_servers = GetDohUpgradeList(); + std::vector entries; + + for (const auto& server : dns_servers) { +@@ -417,8 +416,7 @@ std::vector + GetDohUpgradeServersFromDotHostname( + const std::string& dot_server, + const std::vector& excluded_providers) { +- const std::vector& upgradable_servers = +- GetDohUpgradeList(); ++ const std::vector& upgradable_servers = GetDohUpgradeList(); + std::vector doh_servers; + + if (dot_server.empty()) +@@ -451,8 +449,7 @@ GetDohUpgradeServersFromNameservers( + + std::string GetDohProviderIdForHistogramFromDohConfig( + const DnsConfig::DnsOverHttpsServerConfig& doh_server) { +- const std::vector& upgradable_servers = +- GetDohUpgradeList(); ++ const std::vector& upgradable_servers = GetDohUpgradeList(); + for (const auto& upgrade_entry : upgradable_servers) { + if (doh_server.server_template == + upgrade_entry.dns_over_https_config.server_template) { diff --git a/srcpkgs/chromium/patches/upstream-fix-shutdown-crash-in-ProfileManager.patch b/srcpkgs/chromium/patches/upstream-fix-shutdown-crash-in-ProfileManager.patch new file mode 100644 index 00000000000..553ca34a7db --- /dev/null +++ b/srcpkgs/chromium/patches/upstream-fix-shutdown-crash-in-ProfileManager.patch @@ -0,0 +1,45 @@ +From e73aed9a5ef15102f29ac31b70290faf5c90f9fe Mon Sep 17 00:00:00 2001 +From: Evan Stade +Date: Wed, 16 Oct 2019 16:01:32 +0000 +Subject: [PATCH] Fix shutdown crash in ProfileManager. + +OnProfileMarkedForPermanentDeletion should move from +ProfileManagerObserver to ProfileObserver, which would also +fix this bug. However, changing the order of members is the +quickest and most cherry-pick-able way to avoid the crash. + +Bug: 1005244 +Change-Id: If2db68c846dd418cd02864b57b9b543687fa1e03 +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1863518 +Auto-Submit: Evan Stade +Reviewed-by: David Roger +Commit-Queue: Evan Stade +Cr-Commit-Position: refs/heads/master@{#706467} +--- + chrome/browser/profiles/profile_manager.h | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/chrome/browser/profiles/profile_manager.h b/chrome/browser/profiles/profile_manager.h +index b60df76d59..7d02af7f8f 100644 +--- chrome/browser/profiles/profile_manager.h ++++ chrome/browser/profiles/profile_manager.h +@@ -410,6 +410,10 @@ class ProfileManager : public content::NotificationObserver, + const base::FilePath& profile_dir); + #endif // !defined(OS_ANDROID) + ++ // Destroy after |profile_info_cache_| since Profile destruction may trigger ++ // some observers to unregister themselves. ++ base::ObserverList observers_; ++ + // Object to cache various information about profiles. Contains information + // about every profile which has been created for this instance of Chrome, + // if it has not been explicitly deleted. It must be destroyed after +@@ -451,8 +455,6 @@ class ProfileManager : public content::NotificationObserver, + // Controls whether to initialize some services. Only disabled for testing. + bool do_final_services_init_ = true; + +- base::ObserverList observers_; +- + // TODO(chrome/browser/profiles/OWNERS): Usage of this in profile_manager.cc + // should likely be turned into DCHECK_CURRENTLY_ON(BrowserThread::UI) for + // consistency with surrounding code in the same file but that wasn't trivial diff --git a/srcpkgs/chromium/template b/srcpkgs/chromium/template index 3eaad048059..a811b1ec7a9 100644 --- a/srcpkgs/chromium/template +++ b/srcpkgs/chromium/template @@ -1,15 +1,15 @@ # Template file for 'chromium' pkgname=chromium # See http://www.chromium.org/developers/calendar for the latest version -version=77.0.3865.120 -revision=2 +version=78.0.3904.70 +revision=1 archs="i686 x86_64*" short_desc="Google's attempt at creating a safer, faster, and more stable browser" maintainer="Enno Boland " license="BSD-3-Clause" homepage="https://www.chromium.org/" distfiles="https://commondatastorage.googleapis.com/chromium-browser-official/${pkgname}-${version}.tar.xz" -checksum=d792f9b09b1dcfd64e68f47a611c540dd1383dd9abd78ca1e06b2a7e2ff06af8 +checksum=ddc5794097d65ba19c1ae359c2057b08921e7b38b7afe9d5ec45f5e8b9a87462 lib32disabled=yes nodebug=yes