Hello community, here is the log from the commit of package chromium for openSUSE:Factory checked in at 2019-10-30 14:44:31 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/chromium (Old) and /work/SRC/openSUSE:Factory/.chromium.new.2990 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "chromium" Wed Oct 30 14:44:31 2019 rev:233 rq:743815 version:78.0.3904.70 Changes: -------- --- /work/SRC/openSUSE:Factory/chromium/chromium.changes 2019-09-23 12:38:29.461599364 +0200 +++ /work/SRC/openSUSE:Factory/.chromium.new.2990/chromium.changes 2019-10-30 14:45:21.634025484 +0100 @@ -1,0 +2,85 @@ +Fri Oct 25 10:50:35 UTC 2019 - Tomáš Chvátal <[email protected]> + +- Disable LTO for now as it consumes ~20GB of RAM, we will reenable + the feature later when some memory consumption fixes land in + GCC + +------------------------------------------------------------------- +Thu Oct 24 12:43:15 UTC 2019 - Tomáš Chvátal <[email protected]> + +- Adjust LDFLAGS settings for LTO to take memory-constraints into + consideration + +------------------------------------------------------------------- +Wed Oct 23 12:53:22 UTC 2019 - Tomáš Chvátal <[email protected]> + +- Update to 78.0.3904.70 bsc#1154806: + * CVE-2019-13699: Use-after-free in media + * CVE-2019-13700: Buffer overrun in Blink + * CVE-2019-13701: URL spoof in navigation + * CVE-2019-13702: Privilege elevation in Installer + * CVE-2019-13703: URL bar spoofing + * CVE-2019-13704: CSP bypass + * CVE-2019-13705: Extension permission bypass + * CVE-2019-13706: Out-of-bounds read in PDFium + * CVE-2019-13707: File storage disclosure + * CVE-2019-13708: HTTP authentication spoof + * CVE-2019-13709: File download protection bypass + * CVE-2019-13710: File download protection bypass + * CVE-2019-13711: Cross-context information leak + * CVE-2019-15903: Buffer overflow in expat + * CVE-2019-13713: Cross-origin data leak + * CVE-2019-13714: CSS injection + * CVE-2019-13715: Address bar spoofing + * CVE-2019-13716: Service worker state error + * CVE-2019-13717: Notification obscured + * CVE-2019-13718: IDN spoof + * CVE-2019-13719: Notification obscured + * Various fixes from internal audits, fuzzing and other initiatives +- Add patches: + * chromium-78-gcc-enum-range.patch + * chromium-78-gcc-noexcept.patch + * chromium-78-gcc-std-vector.patch + * chromium-78-icon.patch + * chromium-78-include.patch + * chromium-78-noexcept.patch + * chromium-78-pm-crash.patch + * chromium-78-protobuf-export.patch +- Remove patches: + * chromium-77-blink-include.patch + * chromium-77-fix-gn-gen.patch + * chromium-77-gcc-abstract.patch + * chromium-77-gcc-include.patch + * chromium-77-gcc-no-opt-safe-math.patch + * chromium-77-no-cups.patch + * chromium-77-std-string.patch + * chromium-77-system-hb.patch + * chromium-77.0.3865.120.tar.xz + * chromium-77.0.3865.75-certificate-transparency.patch +- Rebase patches: + * chromium-system-icu.patch + * chromium-unbundle-zlib.patch + * chromium-vaapi-fix.patch + * chromium-vaapi.patch + * old-libva.patch +At revision 0ad55cb9e188d5926db26003b443eec9. + + + +------------------------------------------------------------------- +Fri Oct 18 09:37:21 UTC 2019 - Stasiek Michalski <[email protected]> + +- Use internal resources for icon and appdata + +------------------------------------------------------------------- +Fri Oct 11 08:05:49 UTC 2019 - Tomáš Chvátal <[email protected]> + +- Update to 77.0.3865.120 bsc#1153660: + * CVE-2019-13693: Use-after-free in IndexedDB + * CVE-2019-13694: Use-after-free in WebRTC + * CVE-2019-13695: Use-after-free in audio + * CVE-2019-13696: Use-after-free in V8 + * CVE-2019-13697: Cross-origin size leak. + * Various fixes from internal audits, fuzzing and other initiatives + +------------------------------------------------------------------- Old: ---- chromium-77-blink-include.patch chromium-77-fix-gn-gen.patch chromium-77-gcc-abstract.patch chromium-77-gcc-include.patch chromium-77-gcc-no-opt-safe-math.patch chromium-77-no-cups.patch chromium-77-std-string.patch chromium-77-system-hb.patch chromium-77.0.3865.75-certificate-transparency.patch chromium-77.0.3865.90.tar.xz chromium-browser.appdata.xml chromium-icons.tar.bz2 New: ---- chromium-78-gcc-enum-range.patch chromium-78-gcc-noexcept.patch chromium-78-gcc-std-vector.patch chromium-78-icon.patch chromium-78-include.patch chromium-78-noexcept.patch chromium-78-pm-crash.patch chromium-78-protobuf-export.patch chromium-78.0.3904.70.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ chromium.spec ++++++ --- /var/tmp/diff_new_pack.XCpM0i/_old 2019-10-30 14:45:37.694042558 +0100 +++ /var/tmp/diff_new_pack.XCpM0i/_new 2019-10-30 14:45:37.706042571 +0100 @@ -46,7 +46,7 @@ %endif %ifarch x86_64 %if %{?suse_version} > 1500 -%bcond_without lto +%bcond_with lto %else %bcond_with lto %endif @@ -57,21 +57,18 @@ %bcond_with clang %bcond_with wayland Name: chromium -Version: 77.0.3865.90 +Version: 78.0.3904.70 Release: 0 Summary: Google's open source browser project License: BSD-3-Clause AND LGPL-2.1-or-later -Group: Productivity/Networking/Web/Browsers URL: https://www.chromium.org/ Source0: https://commondatastorage.googleapis.com/chromium-browser-official/%{rname}-%{version}.tar.xz +# Toolchain definitions Source30: master_preferences Source100: chromium-browser.sh Source101: chromium-browser.desktop Source102: chromium-browser.xml Source103: chromium.default -Source104: chromium-icons.tar.bz2 -# PATCH-FEATURE-UPSTREAM https://bugs.chromium.org/p/chromium/issues/detail?id=654190 -Source105: chromium-browser.appdata.xml Patch0: chromium-libusb_interrupt_event_handler.patch # PATCH-FIX-OPENSUSE Make the 1-click-install ymp file always download [bnc#836059] Patch1: exclude_ymp.patch @@ -85,18 +82,17 @@ Patch7: chromium-sandbox-pie.patch Patch8: chromium-system-icu.patch Patch9: chromium-system-libusb.patch -Patch13: gcc-enable-lto.patch -Patch14: chromium-77-fix-gn-gen.patch -Patch15: chromium-unbundle-zlib.patch -Patch16: chromium-77-gcc-include.patch -Patch17: chromium-77-gcc-abstract.patch -Patch18: chromium-77-system-hb.patch -Patch19: chromium-77-blink-include.patch +Patch10: gcc-enable-lto.patch +Patch11: chromium-unbundle-zlib.patch +Patch12: chromium-78-noexcept.patch +Patch13: chromium-78-gcc-enum-range.patch +Patch14: chromium-78-gcc-noexcept.patch +Patch15: chromium-78-gcc-std-vector.patch +Patch16: chromium-78-icon.patch +Patch17: chromium-78-include.patch +Patch18: chromium-78-pm-crash.patch +Patch19: chromium-78-protobuf-export.patch Patch20: chromium-77-clang.patch -Patch21: chromium-77-gcc-no-opt-safe-math.patch -Patch22: chromium-77-no-cups.patch -Patch23: chromium-77-std-string.patch -Patch24: chromium-77.0.3865.75-certificate-transparency.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 @@ -239,7 +235,7 @@ BuildRequires: pkgconfig(libtcmalloc) %endif %if %{with system_harfbuzz} -BuildRequires: pkgconfig(harfbuzz) > 2.4.0 +BuildRequires: pkgconfig(harfbuzz) > 2.3.0 %endif %if %{with system_libxml} BuildRequires: pkgconfig(libxml-2.0) >= 2.9.5 @@ -277,7 +273,6 @@ %package -n chromedriver Summary: WebDriver for Google Chrome/Chromium License: BSD-3-Clause -Group: Development/Tools/Other Requires: %{name} = %{version} %description -n chromedriver @@ -294,7 +289,7 @@ # Remove bundled libs keeplibs=( base/third_party/cityhash - base/third_party/dmg_fp + base/third_party/double_conversion base/third_party/dynamic_annotations base/third_party/nspr base/third_party/icu @@ -344,6 +339,8 @@ third_party/catapult/common/py_vulcanize/third_party/rjsmin third_party/catapult/third_party/beautifulsoup4 third_party/catapult/third_party/html5lib-python + third_party/catapult/third_party/beautifulsoup4 + third_party/catapult/third_party/html5lib-python third_party/catapult/third_party/polymer third_party/catapult/third_party/six third_party/catapult/tracing/third_party/d3 @@ -363,6 +360,8 @@ third_party/cros_system_api third_party/dav1d third_party/dawn + third_party/depot_tools + third_party/depot_tools/third_party/six third_party/devscripts third_party/dom_distiller_js third_party/emoji-segmenter @@ -426,6 +425,7 @@ third_party/pffft third_party/ply third_party/polymer + third_party/private-join-and-compute third_party/protobuf third_party/protobuf/third_party/six third_party/pyjson5 @@ -433,6 +433,7 @@ third_party/rnnoise third_party/s2cellid third_party/sfntly + third_party/simplejson third_party/skia third_party/skia/third_party/gif third_party/skia/third_party/skcms @@ -467,6 +468,7 @@ third_party/widevine third_party/woff2 third_party/zlib/google + tools/grit/third_party/six url/third_party/mozilla v8/src/third_party/siphash v8/src/third_party/valgrind @@ -519,16 +521,12 @@ cp -a %{_includedir}/libusb-1.0/libusb.h third_party/libusb/src/libusb/libusb.h %build -# GN sets lto on its own and we need just ldflag options, not cflags -%if %{with lto} -export LDFLAGS="%{_lto_cflags}" -%endif -%define _lto_cflags %{nil} %if %{with clang} export CC=clang export CXX=clang++ %else # REDUCE DEBUG as it gets TOO large +%define _lto_cflags %{nil} ARCH_FLAGS="`echo %{optflags} | sed -e 's/^-g / /g' -e 's/ -g / /g' -e 's/ -g$//g'`" export CXXFLAGS="${ARCH_FLAGS} -fpermissive -Wno-return-type" # extra flags to reduce warnings that aren't very useful @@ -558,6 +556,9 @@ %endif # do not eat all memory %limit_build -m 2600 +%if %{with lto} +export LDFLAGS="-flto=%{jobs}" +%endif # Set system libraries to be used gn_system_libraries=( @@ -762,17 +763,21 @@ cp -a chrome %{buildroot}%{_libdir}/chromium/chromium popd -mkdir -p %{buildroot}%{_datadir}/icons/ -pushd %{buildroot}%{_datadir}/icons/ -tar -xjf %{SOURCE104} -mv oxygen hicolor -popd +mkdir -p %{buildroot}%{_datadir}/icons/hicolor/256x256/apps +cp -a chrome/app/theme/chromium/product_logo_256.png %{buildroot}%{_datadir}/icons/hicolor/256x256/apps/chromium-browser.png +mkdir -p %{buildroot}%{_datadir}/icons/hicolor/128x128/apps +cp -a chrome/app/theme/chromium/product_logo_128.png %{buildroot}%{_datadir}/icons/hicolor/128x128/apps/chromium-browser.png +mkdir -p %{buildroot}%{_datadir}/icons/hicolor/64x64/apps +cp -a chrome/app/theme/chromium/product_logo_64.png %{buildroot}%{_datadir}/icons/hicolor/64x64/apps/chromium-browser.png +mkdir -p %{buildroot}%{_datadir}/icons/hicolor/48x48/apps +cp -a chrome/app/theme/chromium/product_logo_48.png %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/chromium-browser.png +mkdir -p %{buildroot}%{_datadir}/icons/hicolor/24x24/apps +cp -a chrome/app/theme/chromium/product_logo_24.png %{buildroot}%{_datadir}/icons/hicolor/24x24/apps/chromium-browser.png mkdir -p %{buildroot}%{_datadir}/applications/ desktop-file-install --dir %{buildroot}%{_datadir}/applications %{SOURCE101} -mkdir -p %{buildroot}%{_datadir}/appdata/ -cp -a %{SOURCE105} %{buildroot}%{_datadir}/appdata/ +install -D -m0644 chrome/installer/linux/common/chromium-browser/chromium-browser.appdata.xml %{buildroot}%{_datadir}/metainfo/chromium-browser.appdata.xml mkdir -p %{buildroot}%{_datadir}/gnome-control-center/default-apps/ cp -a %{SOURCE102} %{buildroot}%{_datadir}/gnome-control-center/default-apps/ @@ -827,8 +832,8 @@ %{_libdir}/chromium/swiftshader/*.so %endif %{_datadir}/applications/*.desktop -%dir %{_datadir}/appdata/ -%{_datadir}/appdata/chromium-browser.appdata.xml +%dir %{_datadir}/metainfo/ +%{_datadir}/metainfo/chromium-browser.appdata.xml %{_datadir}/gnome-control-center/default-apps/chromium-browser.xml %{_datadir}/icons/hicolor/ %{_libexecdir}/chrome_sandbox ++++++ chromium-78-gcc-enum-range.patch ++++++ >From 9662ec844017690d5fd56bf0f05ef6a540dd29c1 Mon Sep 17 00:00:00 2001 From: Tom Anderson <[email protected]> Date: Mon, 09 Sep 2019 19:06:01 +0000 Subject: [PATCH] Fix GCC build error Fixes this error: [ 375s] In file included from ../../base/task/common/intrusive_heap.h:8, [ 375s] from ../../base/task/thread_pool/task_source.h:17, [ 375s] from ../../base/task/thread_pool/task_tracker.h:27, [ 375s] from ./../../base/task/thread_pool/service_thread.cc:14, [ 375s] from gen/base/base_jumbo_28.cc:5: [ 375s] ../../base/containers/intrusive_heap.h:152:36: error: enumerator value '-1' is outside the range of underlying type 'size_t' {aka 'long unsigned int'} [ 375s] 152 | enum : size_t { kInvalidIndex = -1 }; [ 375s] | Change-Id: I6044fb704931b2f8416f6b19a247ae297cd7b0d6 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1792763 Commit-Queue: Thomas Anderson <[email protected]> Commit-Queue: Lei Zhang <[email protected]> Reviewed-by: Lei Zhang <[email protected]> Auto-Submit: Thomas Anderson <[email protected]> Cr-Commit-Position: refs/heads/master@{#694853} --- diff --git a/base/containers/intrusive_heap.h b/base/containers/intrusive_heap.h index 53d3909..d7626bb 100644 --- a/base/containers/intrusive_heap.h +++ b/base/containers/intrusive_heap.h @@ -131,6 +131,7 @@ #include <algorithm> #include <functional> +#include <limits> #include <type_traits> #include <utility> #include <vector> @@ -149,7 +150,7 @@ // in place. class BASE_EXPORT HeapHandle { public: - enum : size_t { kInvalidIndex = -1 }; + enum : size_t { kInvalidIndex = std::numeric_limits<size_t>::max() }; constexpr HeapHandle() = default; constexpr HeapHandle(const HeapHandle& other) = default; ++++++ chromium-78-gcc-noexcept.patch ++++++ >From d16cda8fc3476cc534a756873cc8aa2692a57054 Mon Sep 17 00:00:00 2001 From: Jose Dapena Paz <[email protected]> Date: Thu, 22 Aug 2019 13:13:36 +0200 Subject: [PATCH] GCC: declare noexcept move constructor/assign operators of V8StackTraceId blink::BlinkCloneableMessage declares default implementation of move operator/assign operator that requires v8_inspector::V8StackTraceId to declare its move constructor/assign operator too. Bug: chromium:819294 Change-Id: Iaf626ee8245efcba372a17cdf2de448e691d41d6 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1796062 Commit-Queue: José Dapena Paz <[email protected]> Reviewed-by: Yang Guo <[email protected]> Cr-Commit-Position: refs/heads/master@{#63799} --- diff --git a/v8/include/v8-inspector.h b/v8/include/v8-inspector.h index ce5b777..ed4cdec 100644 --- a/v8/include/v8-inspector.h +++ b/v8/include/v8-inspector.h @@ -231,7 +231,10 @@ struct V8_EXPORT V8StackTraceId { std::pair<int64_t, int64_t> debugger_id; V8StackTraceId(); + V8StackTraceId(const V8StackTraceId&) = default; V8StackTraceId(uintptr_t id, const std::pair<int64_t, int64_t> debugger_id); + V8StackTraceId& operator=(const V8StackTraceId&) = default; + V8StackTraceId& operator=(V8StackTraceId&&) noexcept = default; ~V8StackTraceId() = default; bool IsInvalid() const; ++++++ chromium-78-gcc-std-vector.patch ++++++ >From f4c3c329588b78af63aad8b401da767242b86709 Mon Sep 17 00:00:00 2001 From: Raphael Kubo da Costa <[email protected]> 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<typename remove_cv<const DohUpgradeEntry>::type, const DohUpgradeEntry>::value' "std::vector must have a non-const, non-volatile value_type" static_assert(is_same<typename remove_cv<_Tp>::type, _Tp>::value, ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../base/no_destructor.h:77:28: note: in instantiation of template class 'std::vector<const net::(anonymous namespace)::DohUpgradeEntry, std::allocator<const net::(anonymous namespace)::DohUpgradeEntry> >' requested here alignas(T) char storage_[sizeof(T)]; ^ ../../net/dns/dns_util.cc:147:7: note: in instantiation of template class 'base::NoDestructor<std::vector<const net::(anonymous namespace)::DohUpgradeEntry, std::allocator<const net::(anonymous namespace)::DohUpgradeEntry> > >' requested here upgradable_servers({ ^ ../../net/dns/dns_util.cc:230:36: error: invalid range expression of type 'const std::vector<const net::(anonymous namespace)::DohUpgradeEntry, std::allocator<const net::(anonymous namespace)::DohUpgradeEntry> >'; 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. (Added gcc specific workaround) Bug: 957519 Change-Id: I826a51823edb1184c0fae27105101e2894efe568 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1805636 Auto-Submit: Raphael Kubo da Costa <[email protected]> Commit-Queue: Eric Orth <[email protected]> Reviewed-by: Eric Orth <[email protected]> Cr-Commit-Position: refs/heads/master@{#696834} --- diff --git a/net/dns/dns_util.cc b/net/dns/dns_util.cc index d83ff7c..14997c4 100644 --- a/net/dns/dns_util.cc +++ b/net/dns/dns_util.cc @@ -139,12 +139,12 @@ struct DohUpgradeEntry { const DnsConfig::DnsOverHttpsServerConfig dns_over_https_config; }; -const std::vector<const DohUpgradeEntry>& GetDohUpgradeList() { +const std::vector<DohUpgradeEntry>& 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<std::vector<const DohUpgradeEntry>> - upgradable_servers({ + static const base::NoDestructor<std::vector<DohUpgradeEntry>> + upgradable_servers(std::initializer_list<DohUpgradeEntry>{ DohUpgradeEntry( "CleanBrowsingAdult", {"185.228.168.10", "185.228.169.11", "2a0d:2a00:1::1", @@ -222,8 +222,7 @@ const std::vector<const DohUpgradeEntry>& GetDohUpgradeList() { std::vector<const DohUpgradeEntry*> GetDohUpgradeEntriesFromNameservers( const std::vector<IPEndPoint>& dns_servers, const std::vector<std::string>& excluded_providers) { - const std::vector<const DohUpgradeEntry>& upgradable_servers = - GetDohUpgradeList(); + const std::vector<DohUpgradeEntry>& upgradable_servers = GetDohUpgradeList(); std::vector<const DohUpgradeEntry*> entries; for (const auto& server : dns_servers) { @@ -417,8 +416,7 @@ std::vector<DnsConfig::DnsOverHttpsServerConfig> GetDohUpgradeServersFromDotHostname( const std::string& dot_server, const std::vector<std::string>& excluded_providers) { - const std::vector<const DohUpgradeEntry>& upgradable_servers = - GetDohUpgradeList(); + const std::vector<DohUpgradeEntry>& upgradable_servers = GetDohUpgradeList(); std::vector<DnsConfig::DnsOverHttpsServerConfig> doh_servers; if (dot_server.empty()) @@ -451,8 +449,7 @@ GetDohUpgradeServersFromNameservers( std::string GetDohProviderIdForHistogramFromDohConfig( const DnsConfig::DnsOverHttpsServerConfig& doh_server) { - const std::vector<const DohUpgradeEntry>& upgradable_servers = - GetDohUpgradeList(); + const std::vector<DohUpgradeEntry>& upgradable_servers = GetDohUpgradeList(); for (const auto& upgrade_entry : upgradable_servers) { if (doh_server.server_template == upgrade_entry.dns_over_https_config.server_template) { ++++++ chromium-78-icon.patch ++++++ diff --git a/ui/platform_window/x11/x11_window.cc b/ui/platform_window/x11/x11_window.cc index 7a3a6eb..7c01534 100644 --- a/ui/platform_window/x11/x11_window.cc +++ b/ui/platform_window/x11/x11_window.cc @@ -67,6 +67,7 @@ ui::XWindow::Configuration ConvertInitPropertiesToXWindowConfig( config.wm_role_name = properties.wm_role_name; config.activatable = properties.activatable; config.visual_id = properties.x_visual_id; + config.icon = properties.icon; return config; } ++++++ chromium-77-blink-include.patch -> chromium-78-include.patch ++++++ --- /work/SRC/openSUSE:Factory/chromium/chromium-77-blink-include.patch 2019-09-13 15:00:53.349283772 +0200 +++ /work/SRC/openSUSE:Factory/.chromium.new.2990/chromium-78-include.patch 2019-10-30 14:44:35.369976296 +0100 @@ -1,28 +1,40 @@ -From 5baf7df7f4c5971dab552897eeef94b194650ce5 Mon Sep 17 00:00:00 2001 -From: Dave Tapuska <[email protected]> -Date: Mon, 12 Aug 2019 22:30:13 +0000 -Subject: [PATCH] Fix build failure due to missing include for std::numeric_limits usage. +From bbfe2665923225b4a7c436ba2b6c7e5f695f2e52 Mon Sep 17 00:00:00 2001 +From: David Landell <[email protected]> +Date: Fri, 13 Sep 2019 12:24:13 +0000 +Subject: [PATCH] Add missing include for unique_ptr -Some configurations fail to build, limits should have been included. - -BUG=992832 - -Change-Id: I894ba0543bfcef101c93259e39a31d12ae6d035c -Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1747981 -Commit-Queue: Dave Tapuska <[email protected]> -Reviewed-by: Mostyn Bramley-Moore <[email protected]> -Cr-Commit-Position: refs/heads/master@{#686214} +Change-Id: I614d2f42868d563eb6a92dfb2aae08286e20d687 +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1803137 +Reviewed-by: Henrik Boström <[email protected]> +Commit-Queue: Henrik Boström <[email protected]> +Cr-Commit-Position: refs/heads/master@{#696355} --- -diff --git a/third_party/blink/renderer/platform/exported/web_time_range.cc b/third_party/blink/renderer/platform/exported/web_time_range.cc -index 384566a..68d83e1 100644 ---- a/third_party/blink/renderer/platform/exported/web_time_range.cc -+++ b/third_party/blink/renderer/platform/exported/web_time_range.cc -@@ -31,6 +31,7 @@ - #include "third_party/blink/public/platform/web_time_range.h" - - #include <cmath> -+#include <limits> +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 959440f..c3fd542 100644 +--- a/third_party/blink/public/platform/web_rtc_rtp_source.h ++++ b/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_ - namespace blink { ++#include <memory> ++ + #include "base/optional.h" + #include "third_party/blink/public/platform/web_common.h" +Missing include due to reverting ProfileManagerObserver +--- + +diff --git a/chrome/browser/web_applications/extensions/bookmark_app_util.cc b/chrome/browser/web_applications/extensions/bookmark_app_util.cc +index ee4b70a..b31e5f5 100644 +--- a/chrome/browser/web_applications/extensions/bookmark_app_util.cc ++++ b/chrome/browser/web_applications/extensions/bookmark_app_util.cc +@@ -7,6 +7,7 @@ + #include "base/strings/string_piece.h" + #include "base/values.h" + #include "chrome/browser/extensions/extension_service.h" ++#include "chrome/browser/profiles/profile.h" + #include "chrome/browser/web_applications/components/app_registrar.h" + #include "chrome/browser/web_applications/components/web_app_provider_base.h" + #include "chrome/common/chrome_features.h" ++++++ chromium-78-noexcept.patch ++++++ ++++ 1547 lines (skipped) ++++++ chromium-78-pm-crash.patch ++++++ >From e73aed9a5ef15102f29ac31b70290faf5c90f9fe Mon Sep 17 00:00:00 2001 From: Evan Stade <[email protected]> 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 <[email protected]> Reviewed-by: David Roger <[email protected]> Commit-Queue: Evan Stade <[email protected]> Cr-Commit-Position: refs/heads/master@{#706467} --- diff --git a/chrome/browser/profiles/profile_manager.h b/chrome/browser/profiles/profile_manager.h index b60df76d..7d02af7 100644 --- a/chrome/browser/profiles/profile_manager.h +++ b/chrome/browser/profiles/profile_manager.h @@ -409,6 +409,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<ProfileManagerObserver> 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 @@ -450,8 +454,6 @@ class ProfileManager : public content::NotificationObserver, // Controls whether to initialize some services. Only disabled for testing. bool do_final_services_init_ = true; - base::ObserverList<ProfileManagerObserver> 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 ++++++ chromium-78-protobuf-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-77.0.3865.90.tar.xz -> chromium-78.0.3904.70.tar.xz ++++++ /work/SRC/openSUSE:Factory/chromium/chromium-77.0.3865.90.tar.xz /work/SRC/openSUSE:Factory/.chromium.new.2990/chromium-78.0.3904.70.tar.xz differ: char 25, line 1 ++++++ chromium-system-icu.patch ++++++ --- /var/tmp/diff_new_pack.XCpM0i/_old 2019-10-30 14:45:38.258043158 +0100 +++ /var/tmp/diff_new_pack.XCpM0i/_new 2019-10-30 14:45:38.258043158 +0100 @@ -12,8 +12,8 @@ // Freezed trie tree, see character_property_data_generator.cc. extern const int32_t kSerializedCharacterDataSize; -diff --git a/build/linux/unbundle/icu.gn b/build/linux/unbundle/icu.gn -index 4450e40..9ca36dd 100644 +Index: chromium-76.0.3800.0/build/linux/unbundle/icu.gn +=================================================================== --- a/build/linux/unbundle/icu.gn +++ b/build/linux/unbundle/icu.gn @@ -96,6 +96,7 @@ shim_headers("icui18n_shim") { ++++++ chromium-unbundle-zlib.patch ++++++ --- /var/tmp/diff_new_pack.XCpM0i/_old 2019-10-30 14:45:38.314043217 +0100 +++ /var/tmp/diff_new_pack.XCpM0i/_new 2019-10-30 14:45:38.314043217 +0100 @@ -7,19 +7,16 @@ third_party/perfetto/gn/BUILD.gn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/third_party/perfetto/gn/BUILD.gn b/third_party/perfetto/gn/BUILD.gn -index c951f5f..297eee3 100644 ---- a/third_party/perfetto/gn/BUILD.gn -+++ b/third_party/perfetto/gn/BUILD.gn -@@ -200,7 +200,7 @@ group("zlib") { - "//buildtools:zlib", - ] - } else if (build_with_chromium) { -- public_configs = [ "//third_party/zlib:zlib_config" ] -+ public_configs = [ "//third_party/zlib:system_zlib" ] - public_deps = [ - "//third_party/zlib", - ] --- -2.21.0 - +Index: chromium-78.0.3904.44/third_party/perfetto/gn/BUILD.gn +=================================================================== +--- chromium-78.0.3904.44.orig/third_party/perfetto/gn/BUILD.gn ++++ chromium-78.0.3904.44/third_party/perfetto/gn/BUILD.gn +@@ -276,7 +276,7 @@ if (enable_perfetto_trace_processor || e + "//buildtools:zlib", + ] + } else { +- public_configs = [ "//third_party/zlib:zlib_config" ] ++ public_configs = [ "//third_party/zlib:system_zlib" ] + public_deps = [ + "//third_party/zlib", + ] ++++++ chromium-vaapi-fix.patch ++++++ --- /var/tmp/diff_new_pack.XCpM0i/_old 2019-10-30 14:45:38.366043273 +0100 +++ /var/tmp/diff_new_pack.XCpM0i/_new 2019-10-30 14:45:38.370043277 +0100 @@ -9,10 +9,10 @@ media/gpu/vaapi/vaapi_wrapper.cc | 24 +++++++++++++++---- 3 files changed, 42 insertions(+), 5 deletions(-) -Index: chromium-77.0.3865.90/media/gpu/gpu_video_decode_accelerator_factory.cc +Index: chromium-78.0.3887.7/media/gpu/gpu_video_decode_accelerator_factory.cc =================================================================== ---- chromium-77.0.3865.90.orig/media/gpu/gpu_video_decode_accelerator_factory.cc -+++ chromium-77.0.3865.90/media/gpu/gpu_video_decode_accelerator_factory.cc +--- chromium-78.0.3887.7.orig/media/gpu/gpu_video_decode_accelerator_factory.cc ++++ chromium-78.0.3887.7/media/gpu/gpu_video_decode_accelerator_factory.cc @@ -171,6 +171,8 @@ GpuVideoDecodeAcceleratorFactory::Create vda = (this->*create_vda_function)(workarounds, gpu_preferences, media_log); if (vda && vda->Initialize(config, client)) @@ -22,10 +22,10 @@ } return nullptr; -Index: chromium-77.0.3865.90/media/gpu/vaapi/vaapi_video_decode_accelerator.cc +Index: chromium-78.0.3887.7/media/gpu/vaapi/vaapi_video_decode_accelerator.cc =================================================================== ---- chromium-77.0.3865.90.orig/media/gpu/vaapi/vaapi_video_decode_accelerator.cc -+++ chromium-77.0.3865.90/media/gpu/vaapi/vaapi_video_decode_accelerator.cc +--- chromium-78.0.3887.7.orig/media/gpu/vaapi/vaapi_video_decode_accelerator.cc ++++ chromium-78.0.3887.7/media/gpu/vaapi/vaapi_video_decode_accelerator.cc @@ -63,6 +63,9 @@ void ReportToUMA(VAVDADecoderFailure fai VAVDA_DECODER_FAILURES_MAX + 1); } @@ -45,7 +45,7 @@ } // namespace #define RETURN_AND_NOTIFY_ON_FAILURE(result, log, error_code, ret) \ -@@ -631,6 +636,13 @@ void VaapiVideoDecodeAccelerator::Assign +@@ -635,6 +640,13 @@ void VaapiVideoDecodeAccelerator::Assign va_surface_format_ = GetVaFormatForVideoCodecProfile(profile_); std::vector<VASurfaceID> va_surface_ids; @@ -59,7 +59,7 @@ // 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. -@@ -644,15 +656,20 @@ void VaapiVideoDecodeAccelerator::Assign +@@ -648,6 +660,7 @@ void VaapiVideoDecodeAccelerator::Assign NotifyError(PLATFORM_FAILURE); } } @@ -67,8 +67,9 @@ 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_|. +@@ -659,9 +672,13 @@ void VaapiVideoDecodeAccelerator::Assign + PictureBuffer buffer = buffers[i]; + buffer.set_size(requested_pic_size_); std::unique_ptr<VaapiPicture> picture = vaapi_picture_factory_->Create( + #if defined(OS_LINUX) && !defined(OS_ANDROID) && !defined(OS_CHROMEOS) + vaapi_wrapper_, @@ -77,10 +78,10 @@ ? 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, ); -@@ -1077,6 +1094,9 @@ VaapiVideoDecodeAccelerator::GetSupporte +@@ -1086,6 +1103,9 @@ VaapiVideoDecodeAccelerator::GetSupporte VaapiVideoDecodeAccelerator::BufferAllocationMode VaapiVideoDecodeAccelerator::DecideBufferAllocationMode() { @@ -90,7 +91,7 @@ // TODO(crbug.com/912295): Enable a better BufferAllocationMode for IMPORT // |output_mode_| as well. if (output_mode_ == VideoDecodeAccelerator::Config::OutputMode::IMPORT) -@@ -1112,6 +1132,7 @@ VaapiVideoDecodeAccelerator::DecideBuffe +@@ -1121,6 +1141,7 @@ VaapiVideoDecodeAccelerator::DecideBuffe return BufferAllocationMode::kReduced; return BufferAllocationMode::kSuperReduced; @@ -98,11 +99,11 @@ } bool VaapiVideoDecodeAccelerator::IsBufferAllocationModeReducedOrSuperReduced() -Index: chromium-77.0.3865.90/media/gpu/vaapi/vaapi_wrapper.cc +Index: chromium-78.0.3887.7/media/gpu/vaapi/vaapi_wrapper.cc =================================================================== ---- chromium-77.0.3865.90.orig/media/gpu/vaapi/vaapi_wrapper.cc -+++ chromium-77.0.3865.90/media/gpu/vaapi/vaapi_wrapper.cc -@@ -327,6 +327,10 @@ void VADisplayState::PreSandboxInitializ +--- chromium-78.0.3887.7.orig/media/gpu/vaapi/vaapi_wrapper.cc ++++ chromium-78.0.3887.7/media/gpu/vaapi/vaapi_wrapper.cc +@@ -328,6 +328,10 @@ 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()); @@ -113,7 +114,7 @@ } VADisplayState::VADisplayState() -@@ -361,10 +365,11 @@ bool VADisplayState::InitializeOnce() { +@@ -362,10 +366,11 @@ bool VADisplayState::InitializeOnce() { case gl::kGLImplementationDesktopGL: #if defined(USE_X11) va_display_ = vaGetDisplay(gfx::GetXDisplay()); @@ -128,7 +129,7 @@ break; // Cannot infer platform from GL, try all available displays case gl::kGLImplementationNone: -@@ -397,8 +402,17 @@ bool VADisplayState::InitializeOnce() { +@@ -398,8 +403,17 @@ bool VADisplayState::InitializeOnce() { int major_version, minor_version; VAStatus va_res = vaInitialize(va_display_, &major_version, &minor_version); if (va_res != VA_STATUS_SUCCESS) { ++++++ chromium-vaapi.patch ++++++ --- /var/tmp/diff_new_pack.XCpM0i/_old 2019-10-30 14:45:38.410043319 +0100 +++ /var/tmp/diff_new_pack.XCpM0i/_new 2019-10-30 14:45:38.414043324 +0100 @@ -12,11 +12,11 @@ media/mojo/services/gpu_mojo_media_client.cc | 4 ++-- 6 files changed, 29 insertions(+), 14 deletions(-) -Index: chromium-76.0.3806.1/chrome/browser/about_flags.cc +Index: chromium-78.0.3904.44/chrome/browser/about_flags.cc =================================================================== ---- chromium-76.0.3806.1.orig/chrome/browser/about_flags.cc -+++ chromium-76.0.3806.1/chrome/browser/about_flags.cc -@@ -1634,14 +1634,14 @@ const FeatureEntry kFeatureEntries[] = { +--- chromium-78.0.3904.44.orig/chrome/browser/about_flags.cc ++++ chromium-78.0.3904.44/chrome/browser/about_flags.cc +@@ -1738,14 +1738,14 @@ const FeatureEntry kFeatureEntries[] = { "disable-accelerated-video-decode", flag_descriptions::kAcceleratedVideoDecodeName, flag_descriptions::kAcceleratedVideoDecodeDescription, @@ -33,7 +33,7 @@ SINGLE_DISABLE_VALUE_TYPE(switches::kDisableAcceleratedVideoEncode), }, {"enable-history-favicons-google-server-query", -@@ -2115,10 +2115,10 @@ const FeatureEntry kFeatureEntries[] = { +@@ -2216,10 +2216,10 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(service_manager::features::kXRSandbox)}, #endif // !defined(OS_ANDROID) #endif // ENABLE_VR @@ -46,11 +46,11 @@ SINGLE_DISABLE_VALUE_TYPE(switches::kDisableAcceleratedMjpegDecode)}, #endif // OS_CHROMEOS {"system-keyboard-lock", flag_descriptions::kSystemKeyboardLockName, -Index: chromium-76.0.3806.1/chrome/browser/flag_descriptions.cc +Index: chromium-78.0.3904.44/chrome/browser/flag_descriptions.cc =================================================================== ---- chromium-76.0.3806.1.orig/chrome/browser/flag_descriptions.cc -+++ chromium-76.0.3806.1/chrome/browser/flag_descriptions.cc -@@ -2969,15 +2969,20 @@ const char kMacSystemMediaPermissionsInf +--- chromium-78.0.3904.44.orig/chrome/browser/flag_descriptions.cc ++++ chromium-78.0.3904.44/chrome/browser/flag_descriptions.cc +@@ -3064,15 +3064,20 @@ const char kMacSystemMediaPermissionsInf #endif @@ -71,13 +71,13 @@ + +#if defined(OS_CHROMEOS) - const char kAppServiceAshName[] = "App Service Ash"; - const char kAppServiceAshDescription[] = -Index: chromium-76.0.3806.1/chrome/browser/flag_descriptions.h + const char kAggregatedMlAppRankingName[] = "Rank suggested apps with ML."; + const char kAggregatedMlAppRankingDescription[] = +Index: chromium-78.0.3904.44/chrome/browser/flag_descriptions.h =================================================================== ---- chromium-76.0.3806.1.orig/chrome/browser/flag_descriptions.h -+++ chromium-76.0.3806.1/chrome/browser/flag_descriptions.h -@@ -1766,11 +1766,15 @@ extern const char kPermissionPromptPersi +--- chromium-78.0.3904.44.orig/chrome/browser/flag_descriptions.h ++++ chromium-78.0.3904.44/chrome/browser/flag_descriptions.h +@@ -1821,11 +1821,15 @@ extern const char kPermissionPromptPersi // Chrome OS ------------------------------------------------------------------ @@ -91,13 +91,13 @@ + +#if defined(OS_CHROMEOS) + - extern const char kAppServiceAshName[]; - extern const char kAppServiceAshDescription[]; + extern const char kAggregatedMlAppRankingName[]; + extern const char kAggregatedMlAppRankingDescription[]; -Index: chromium-76.0.3806.1/gpu/config/software_rendering_list.json +Index: chromium-78.0.3904.44/gpu/config/software_rendering_list.json =================================================================== ---- chromium-76.0.3806.1.orig/gpu/config/software_rendering_list.json -+++ chromium-76.0.3806.1/gpu/config/software_rendering_list.json +--- chromium-78.0.3904.44.orig/gpu/config/software_rendering_list.json ++++ chromium-78.0.3904.44/gpu/config/software_rendering_list.json @@ -334,11 +334,12 @@ }, { ++++++ old-libva.patch ++++++ --- /var/tmp/diff_new_pack.XCpM0i/_old 2019-10-30 14:45:38.526043443 +0100 +++ /var/tmp/diff_new_pack.XCpM0i/_new 2019-10-30 14:45:38.530043447 +0100 @@ -1,8 +1,8 @@ -Index: chromium-77.0.3865.75/media/gpu/vaapi/vaapi_wrapper.cc +Index: chromium-76.0.3809.12/media/gpu/vaapi/vaapi_wrapper.cc =================================================================== ---- chromium-77.0.3865.75.orig/media/gpu/vaapi/vaapi_wrapper.cc -+++ chromium-77.0.3865.75/media/gpu/vaapi/vaapi_wrapper.cc -@@ -62,6 +62,10 @@ +--- chromium-76.0.3809.12.orig/media/gpu/vaapi/vaapi_wrapper.cc ++++ chromium-76.0.3809.12/media/gpu/vaapi/vaapi_wrapper.cc +@@ -63,6 +63,10 @@ #include "ui/ozone/public/surface_factory_ozone.h" #endif @@ -13,7 +13,7 @@ using media_gpu_vaapi::kModuleVa; using media_gpu_vaapi::kModuleVa_drm; #if defined(USE_X11) -@@ -350,10 +354,6 @@ bool VADisplayState::Initialize() { +@@ -351,10 +355,6 @@ bool VADisplayState::Initialize() { } bool VADisplayState::InitializeOnce() { @@ -24,29 +24,10 @@ switch (gl::GetGLImplementation()) { case gl::kGLImplementationEGLGLES2: va_display_ = vaGetDisplayDRM(drm_fd_.get()); -@@ -1407,6 +1407,7 @@ scoped_refptr<VASurface> VaapiWrapper::C - - scoped_refptr<gfx::NativePixmapDmaBuf> - VaapiWrapper::ExportVASurfaceAsNativePixmapDmaBuf(VASurfaceID va_surface_id) { -+#if VA_MAJOR_VERSION >= 2 || (VA_MAJOR_VERSION == 1 && VA_MINOR_VERSION >= 2) - VADRMPRIMESurfaceDescriptor descriptor; - { - base::AutoLock auto_lock(*va_lock_); -@@ -1484,6 +1485,10 @@ VaapiWrapper::ExportVASurfaceAsNativePix - gfx::Size(base::checked_cast<int>(descriptor.width), - base::checked_cast<int>(descriptor.height)), - buffer_format, std::move(handle)); -+#else -+ LOG(ERROR) << "Exporting a surface with FOURCC has been disabled on old libva"; -+ return nullptr; -+#endif - } - - bool VaapiWrapper::SubmitBuffer(VABufferType va_buffer_type, -Index: chromium-77.0.3865.75/media/gpu/vaapi/vaapi_jpeg_decoder.cc +Index: chromium-76.0.3809.12/media/gpu/vaapi/vaapi_jpeg_decoder.cc =================================================================== ---- chromium-77.0.3865.75.orig/media/gpu/vaapi/vaapi_jpeg_decoder.cc -+++ chromium-77.0.3865.75/media/gpu/vaapi/vaapi_jpeg_decoder.cc +--- chromium-76.0.3809.12.orig/media/gpu/vaapi/vaapi_jpeg_decoder.cc ++++ chromium-76.0.3809.12/media/gpu/vaapi/vaapi_jpeg_decoder.cc @@ -20,6 +20,10 @@ #include "media/parsers/jpeg_parser.h" #include "ui/gfx/geometry/size.h" @@ -58,13 +39,13 @@ namespace media { namespace { -Index: chromium-77.0.3865.75/media/gpu/vaapi/vaapi_mjpeg_decode_accelerator.cc +Index: chromium-76.0.3809.12/media/gpu/vaapi/vaapi_mjpeg_decode_accelerator.cc =================================================================== ---- chromium-77.0.3865.75.orig/media/gpu/vaapi/vaapi_mjpeg_decode_accelerator.cc -+++ chromium-77.0.3865.75/media/gpu/vaapi/vaapi_mjpeg_decode_accelerator.cc -@@ -30,6 +30,10 @@ - #include "third_party/libyuv/include/libyuv.h" - #include "ui/gfx/geometry/size.h" +--- chromium-76.0.3809.12.orig/media/gpu/vaapi/vaapi_mjpeg_decode_accelerator.cc ++++ chromium-76.0.3809.12/media/gpu/vaapi/vaapi_mjpeg_decode_accelerator.cc +@@ -44,6 +44,10 @@ + #include "ui/gfx/linux/native_pixmap_dmabuf.h" + #include "ui/gfx/native_pixmap.h" +#ifndef VA_FOURCC_I420 +#define VA_FOURCC_I420 0x30323449 @@ -73,3 +54,27 @@ namespace media { namespace { +diff --git a/media/gpu/vaapi/vaapi_wrapper.cc b/media/gpu/vaapi/vaapi_wrapper.cc +index 82f2b3c154f6..5edaa92e7380 100644 +--- a/media/gpu/vaapi/vaapi_wrapper.cc ++++ b/media/gpu/vaapi/vaapi_wrapper.cc +@@ -1456,7 +1456,7 @@ VaapiWrapper::ExportVASurfaceAsNativePixmapDmaBuf( + LOG(ERROR) << "Cannot export an invalid surface"; + return nullptr; + } +- ++#if VA_MAJOR_VERSION >= 2 || (VA_MAJOR_VERSION == 1 && VA_MINOR_VERSION >= 2) + VADRMPRIMESurfaceDescriptor descriptor; + { + base::AutoLock auto_lock(*va_lock_); +@@ -1549,6 +1549,10 @@ VaapiWrapper::ExportVASurfaceAsNativePixmapDmaBuf( + exported_pixmap->pixmap = base::MakeRefCounted<gfx::NativePixmapDmaBuf>( + scoped_va_surface.size(), buffer_format, std::move(handle)); + return exported_pixmap; ++#else ++ LOG(ERROR) << "Exporting a surface with FOURCC has been disabled on old libva"; ++ return nullptr; ++#endif + } + + bool VaapiWrapper::SyncSurface(VASurfaceID va_surface_id) {
