Merge branch 'master' into epel7

epel8
Tom Callaway 5 years ago
commit 01652fcb00

@ -1,15 +1,3 @@
diff -upr chromium-71.0.3578.80.orig/chrome/common/chrome_content_client.cc chromium-71.0.3578.80/chrome/common/chrome_content_client.cc
--- chromium-71.0.3578.80.orig/chrome/common/chrome_content_client.cc 2018-12-21 20:16:43.000000000 +0000
+++ chromium-71.0.3578.80/chrome/common/chrome_content_client.cc 2018-12-21 21:34:28.658206942 +0000
@@ -99,7 +99,7 @@
// Registers Widevine CDM if Widevine is enabled, the Widevine CDM is
// bundled and not a component. When the Widevine CDM is a component, it is
// registered in widevine_cdm_component_installer.cc.
-#if BUILDFLAG(BUNDLE_WIDEVINE_CDM) && !BUILDFLAG(ENABLE_WIDEVINE_CDM_COMPONENT)
+#if !BUILDFLAG(ENABLE_WIDEVINE_CDM_COMPONENT)
#define REGISTER_BUNDLED_WIDEVINE_CDM
#include "third_party/widevine/cdm/widevine_cdm_common.h" // nogncheck
// TODO(crbug.com/663554): Needed for WIDEVINE_CDM_VERSION_STRING. Support
diff -upr chromium-71.0.3578.80.orig/third_party/widevine/cdm/widevine_cdm_version.h chromium-71.0.3578.80/third_party/widevine/cdm/widevine_cdm_version.h
--- chromium-71.0.3578.80.orig/third_party/widevine/cdm/widevine_cdm_version.h 2018-12-21 20:18:01.000000000 +0000
+++ chromium-71.0.3578.80/third_party/widevine/cdm/widevine_cdm_version.h 2018-12-21 21:37:45.635374949 +0000
@ -17,6 +5,6 @@ diff -upr chromium-71.0.3578.80.orig/third_party/widevine/cdm/widevine_cdm_versi
// - WIDEVINE_CDM_VERSION_STRING (with the version of the CDM that's available
// as a string, e.g., "1.0.123.456").
+#define WIDEVINE_CDM_VERSION_STRING "undefined"
+#define WIDEVINE_CDM_VERSION_STRING "unknown"
+
#endif // WIDEVINE_CDM_VERSION_H_

@ -1,47 +0,0 @@
diff -up chromium-76.0.3809.100/media/audio/pulse/pulse.sigs.pulse-api-change chromium-76.0.3809.100/media/audio/pulse/pulse.sigs
--- chromium-76.0.3809.100/media/audio/pulse/pulse.sigs.pulse-api-change 2019-08-14 23:18:59.624627870 +0200
+++ chromium-76.0.3809.100/media/audio/pulse/pulse.sigs 2019-08-14 23:19:41.258104998 +0200
@@ -24,11 +24,11 @@ pa_operation* pa_context_get_source_info
pa_operation* pa_context_get_source_info_by_name(pa_context* c, const char* name, pa_source_info_cb_t cb, void *userdata);
pa_operation* pa_context_get_source_info_list(pa_context* c, pa_source_info_cb_t cb, void* userdata);
pa_operation* pa_context_get_sink_info_list(pa_context* c, pa_sink_info_cb_t cb, void* userdata);
-pa_context_state_t pa_context_get_state(pa_context* c);
+pa_context_state_t pa_context_get_state(const pa_context* c);
pa_context* pa_context_new(pa_mainloop_api* mainloop, const char* name);
pa_operation* pa_context_set_source_volume_by_index(pa_context* c, uint32_t idx, const pa_cvolume* volume, pa_context_success_cb_t cb, void* userdata);
void pa_context_set_state_callback(pa_context* c, pa_context_notify_cb_t cb, void* userdata);
-pa_operation_state_t pa_operation_get_state(pa_operation* o);
+pa_operation_state_t pa_operation_get_state(const pa_operation* o);
void pa_context_unref(pa_context* c);
void pa_operation_unref(pa_operation* o);
int pa_stream_begin_write(pa_stream* p, void** data, size_t* nbytes);
@@ -38,23 +38,23 @@ pa_operation* pa_stream_cork(pa_stream*
int pa_stream_disconnect(pa_stream* s);
int pa_stream_drop(pa_stream *p);
pa_operation* pa_stream_flush(pa_stream* s, pa_stream_success_cb_t cb, void* userdata);
-uint32_t pa_stream_get_device_index(pa_stream* s);
+uint32_t pa_stream_get_device_index(const pa_stream* s);
int pa_stream_get_latency(pa_stream* s, pa_usec_t* r_usec, int* negative);
-pa_stream_state_t pa_stream_get_state(pa_stream* p);
+pa_stream_state_t pa_stream_get_state(const pa_stream* p);
pa_stream* pa_stream_new(pa_context* c, const char* name, const pa_sample_spec* ss, const pa_channel_map * map);
pa_stream* pa_stream_new_with_proplist(pa_context* c, const char* name, const pa_sample_spec* ss, const pa_channel_map* map, pa_proplist* p);
pa_proplist* pa_proplist_new(void);
-int pa_proplist_contains(pa_proplist* p, const char* key);
+int pa_proplist_contains(const pa_proplist* p, const char* key);
void pa_proplist_free(pa_proplist* p);
-const char* pa_proplist_gets(pa_proplist* p, const char* key);
+const char* pa_proplist_gets(const pa_proplist* p, const char* key);
int pa_proplist_sets(pa_proplist* p, const char* key, const char* value);
-size_t pa_stream_readable_size(pa_stream *p);
+size_t pa_stream_readable_size(const pa_stream *p);
int pa_stream_peek(pa_stream* p, const void** data, size_t* nbytes);
void pa_stream_set_read_callback(pa_stream* p, pa_stream_request_cb_t cb, void* userdata);
void pa_stream_set_state_callback(pa_stream* s, pa_stream_notify_cb_t cb, void* userdata);
int pa_stream_write(pa_stream* p, const void* data, size_t nbytes, pa_free_cb_t free_cb, int64_t offset, pa_seek_mode_t seek);
void pa_stream_set_write_callback(pa_stream *p, pa_stream_request_cb_t cb, void *userdata);
void pa_stream_unref(pa_stream* s);
-int pa_context_errno(pa_context *c);
+int pa_context_errno(const pa_context *c);
const char* pa_strerror(int error);
pa_cvolume* pa_cvolume_set(pa_cvolume* a, unsigned channels, pa_volume_t v);

@ -1,36 +0,0 @@
From 9c3aed099b010a75594a0efd523774c4c9a5e3d2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=BCri=20Valdmann?= <juri.valdmann@qt.io>
Date: Tue, 15 Oct 2019 12:10:55 +0000
Subject: [PATCH] GCC: Fix zlib symbol visibility macro
GCC parses the function __attribute__ syntax a bit differently from Clang,
associating the attribute with the return type instead of the function if the
return type is a pointer. This leads to certain zlib symbols, such as
Cr_z_zError, to fail to be properly exported from the shared library. Fix by
using ZEXTERN instead of ZEXPORT for the attribute which works the same for both
GCC and Clang.
Bug: 819294
Change-Id: I5707d1b0627a503df08df9ac0bb65fda69453989
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1859788
Reviewed-by: Thomas Anderson <thomasanderson@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#705917}
---
third_party/zlib/chromeconf.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/third_party/zlib/chromeconf.h b/third_party/zlib/chromeconf.h
index e9aa3867d8512..666093d696a58 100644
--- a/third_party/zlib/chromeconf.h
+++ b/third_party/zlib/chromeconf.h
@@ -13,7 +13,7 @@
#define ZEXTERN __declspec(dllimport)
#endif
#elif defined(ZLIB_IMPLEMENTATION)
-#define ZEXPORT __attribute__((visibility("default")))
+#define ZEXTERN __attribute__((visibility("default")))
#endif
#endif

@ -1,60 +0,0 @@
From e79d9d0e06b825d2e62b38db03248c0e6ceec7e4 Mon Sep 17 00:00:00 2001
From: Greg Thompson <grt@chromium.org>
Date: Sat, 5 Oct 2019 03:47:05 +0000
Subject: [PATCH] Only detect outdated builds on Google Chrome.
Prior to https://crrev.com/643864, they weren't detected for Chromium on
account of the way google_brand worked. That CL changed behavior and
accidentally started showing the outdated build bubble for Linux
Chromium users.
BUG=1010592
Change-Id: I069ac36166e2ae720d58b1b9aa85605792be8684
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1841635
Reviewed-by: Thomas Anderson <thomasanderson@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Greg Thompson <grt@chromium.org>
Cr-Commit-Position: refs/heads/master@{#703131}
---
.../upgrade_detector/upgrade_detector_impl.cc | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/chrome/browser/upgrade_detector/upgrade_detector_impl.cc b/chrome/browser/upgrade_detector/upgrade_detector_impl.cc
index 432e3789eced0..07850fdf80cd7 100644
--- a/chrome/browser/upgrade_detector/upgrade_detector_impl.cc
+++ b/chrome/browser/upgrade_detector/upgrade_detector_impl.cc
@@ -31,6 +31,7 @@
#include "base/time/default_tick_clock.h"
#include "base/time/tick_clock.h"
#include "base/time/time.h"
+#include "build/branding_buildflags.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/google/google_brand.h"
#include "chrome/common/chrome_switches.h"
@@ -73,6 +74,14 @@ constexpr base::TimeDelta kNotifyCycleTimeForTesting =
// The number of days after which we identify a build/install as outdated.
constexpr base::TimeDelta kOutdatedBuildAge = base::TimeDelta::FromDays(12 * 7);
+constexpr bool ShouldDetectOutdatedBuilds() {
+#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
+ return true;
+#else // BUILDFLAG(GOOGLE_CHROME_BRANDING)
+ return false;
+#endif // BUILDFLAG(GOOGLE_CHROME_BRANDING)
+}
+
// Return the string that was passed as a value for the
// kCheckForUpdateIntervalSec switch.
std::string CmdLineInterval() {
@@ -406,6 +415,10 @@ bool UpgradeDetectorImpl::DetectOutdated
return false;
}
#endif
+
+ if (!ShouldDetectOutdatedBuilds())
+ return false;
+
}
base::Time network_time;

@ -1,12 +0,0 @@
diff -up chromium-77.0.3865.75/content/common/user_agent.cc.fedora-user-agent chromium-77.0.3865.75/content/common/user_agent.cc
--- chromium-77.0.3865.75/content/common/user_agent.cc.fedora-user-agent 2019-09-12 15:49:11.902270729 +0200
+++ chromium-77.0.3865.75/content/common/user_agent.cc 2019-09-12 15:50:11.555732044 +0200
@@ -35,7 +35,7 @@ std::string GetUserAgentPlatform() {
#elif defined(OS_MACOSX)
return "Macintosh; ";
#elif defined(USE_X11) || defined(USE_OZONE)
- return "X11; "; // strange, but that's what Firefox uses
+ return "X11; Fedora; "; // strange, but that's what Firefox uses
#elif defined(OS_ANDROID)
return "Linux; ";
#elif defined(OS_POSIX)

@ -1,32 +0,0 @@
From d16cda8fc3476cc534a756873cc8aa2692a57054 Mon Sep 17 00:00:00 2001
From: Jose Dapena Paz <jose.dapena@lge.com>
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 <jose.dapena@lge.com>
Reviewed-by: Yang Guo <yangguo@chromium.org>
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;

@ -1,40 +0,0 @@
From bbfe2665923225b4a7c436ba2b6c7e5f695f2e52 Mon Sep 17 00:00:00 2001
From: David Landell <landell@vewd.com>
Date: Fri, 13 Sep 2019 12:24:13 +0000
Subject: [PATCH] Add missing include for unique_ptr
Change-Id: I614d2f42868d563eb6a92dfb2aae08286e20d687
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1803137
Reviewed-by: Henrik Boström <hbos@chromium.org>
Commit-Queue: Henrik Boström <hbos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#696355}
---
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_
+#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"

@ -1,43 +0,0 @@
From e73aed9a5ef15102f29ac31b70290faf5c90f9fe Mon Sep 17 00:00:00 2001
From: Evan Stade <estade@chromium.org>
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 <estade@chromium.org>
Reviewed-by: David Roger <droger@chromium.org>
Commit-Queue: Evan Stade <estade@chromium.org>
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

File diff suppressed because it is too large Load Diff

@ -1,49 +0,0 @@
diff -up chromium-78.0.3904.70/net/dns/dns_util.cc.gcc-DohUpgradeEntry-nonconst chromium-78.0.3904.70/net/dns/dns_util.cc
--- chromium-78.0.3904.70/net/dns/dns_util.cc.gcc-DohUpgradeEntry-nonconst 2019-10-21 15:06:38.000000000 -0400
+++ chromium-78.0.3904.70/net/dns/dns_util.cc 2019-10-23 12:55:27.886546918 -0400
@@ -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>
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::DnsOverHttpsServe
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) {

@ -1,16 +0,0 @@
diff -up chromium-78.0.3904.70/base/allocator/debugallocation_shim.cc.invalid-pragma chromium-78.0.3904.70/base/allocator/debugallocation_shim.cc
--- chromium-78.0.3904.70/base/allocator/debugallocation_shim.cc.invalid-pragma 2019-10-23 10:00:41.361932768 -0400
+++ chromium-78.0.3904.70/base/allocator/debugallocation_shim.cc 2019-10-23 10:02:09.778100948 -0400
@@ -7,9 +7,10 @@
// AFDO can mess with them. Better not to use AFDO there. This is a
// temporary hack. We will add a mechanism in the build system to
// avoid using -fauto-profile for tcmalloc files.
-#if !defined(__clang__) && (defined(OS_CHROMEOS) || __GNUC__ > 5)
+#if !defined(__clang__) && \
+ (defined(OS_CHROMEOS) || (__GNUC__ > 5 && __GNUC__ < 7))
// Note that this option only seems to be available in the chromeos GCC 4.9
-// toolchain, and stock GCC 5 and up.
+// toolchain, and stock GCC 5 upto 7.
#pragma GCC optimize ("no-auto-profile")
#endif

@ -1,12 +0,0 @@
diff -up chromium-78.0.3904.70/base/logging.h.constexpr chromium-78.0.3904.70/base/logging.h
--- chromium-78.0.3904.70/base/logging.h.constexpr 2019-10-23 10:06:53.434313793 -0400
+++ chromium-78.0.3904.70/base/logging.h 2019-10-23 10:07:17.490853038 -0400
@@ -530,7 +530,7 @@ BASE_EXPORT extern std::ostream* g_swall
class CheckOpResult {
public:
// |message| must be non-null if and only if the check failed.
- CheckOpResult(std::string* message) : message_(message) {}
+ constexpr CheckOpResult(std::string* message) : message_(message) {}
// Returns true if the check succeeded.
operator bool() const { return !message_; }
// Returns the message.

@ -1,20 +0,0 @@
diff -up chromium-78.0.3904.70/base/containers/intrusive_heap.h.gcc-sizet chromium-78.0.3904.70/base/containers/intrusive_heap.h
--- chromium-78.0.3904.70/base/containers/intrusive_heap.h.gcc-sizet 2019-10-23 11:02:56.767907986 -0400
+++ chromium-78.0.3904.70/base/containers/intrusive_heap.h 2019-10-23 11:04:58.317351636 -0400
@@ -131,6 +131,7 @@
#include <algorithm>
#include <functional>
+#include <limits>
#include <type_traits>
#include <utility>
#include <vector>
@@ -149,7 +150,7 @@ namespace base {
// 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;

@ -1,302 +0,0 @@
diff -up chromium-78.0.3904.70/third_party/blink/renderer/bindings/core/v8/v8_embedder_graph_builder.cc.v8-tracedreference-fix chromium-78.0.3904.70/third_party/blink/renderer/bindings/core/v8/v8_embedder_graph_builder.cc
--- chromium-78.0.3904.70/third_party/blink/renderer/bindings/core/v8/v8_embedder_graph_builder.cc.v8-tracedreference-fix 2019-10-21 15:06:42.000000000 -0400
+++ chromium-78.0.3904.70/third_party/blink/renderer/bindings/core/v8/v8_embedder_graph_builder.cc 2019-10-23 14:30:25.679541652 -0400
@@ -173,8 +173,9 @@ class GC_PLUGIN_IGNORE(
uint16_t class_id) override;
// v8::EmbedderHeapTracer::TracedGlobalHandleVisitor override.
- void VisitTracedGlobalHandle(
- const v8::TracedGlobal<v8::Value>& value) override;
+ void VisitTracedReference(
+ const v8::TracedReference<v8::Value>& value) override;
+ void VisitTracedGlobalHandle(const v8::TracedGlobal<v8::Value>&) override;
// Visitor overrides.
void VisitRoot(void*, TraceDescriptor, const base::Location&) final;
@@ -508,8 +509,8 @@ void V8EmbedderGraphBuilder::VisitPersis
}
}
-void V8EmbedderGraphBuilder::VisitTracedGlobalHandle(
- const v8::TracedGlobal<v8::Value>& value) {
+void V8EmbedderGraphBuilder::VisitTracedReference(
+ const v8::TracedReference<v8::Value>& value) {
const uint16_t class_id = value.WrapperClassId();
if (class_id != WrapperTypeInfo::kNodeClassId &&
class_id != WrapperTypeInfo::kObjectClassId)
@@ -517,6 +518,11 @@ void V8EmbedderGraphBuilder::VisitTraced
VisitPersistentHandleInternal(value.As<v8::Object>().Get(isolate_), class_id);
}
+void V8EmbedderGraphBuilder::VisitTracedGlobalHandle(
+ const v8::TracedGlobal<v8::Value>&) {
+ CHECK(false) << "Blink does not use v8::TracedGlobal.";
+}
+
void V8EmbedderGraphBuilder::VisitPersistentHandle(
v8::Persistent<v8::Value>* value,
uint16_t class_id) {
diff -up chromium-78.0.3904.70/third_party/blink/renderer/bindings/core/v8/v8_gc_controller.cc.v8-tracedreference-fix chromium-78.0.3904.70/third_party/blink/renderer/bindings/core/v8/v8_gc_controller.cc
--- chromium-78.0.3904.70/third_party/blink/renderer/bindings/core/v8/v8_gc_controller.cc.v8-tracedreference-fix 2019-10-21 15:06:42.000000000 -0400
+++ chromium-78.0.3904.70/third_party/blink/renderer/bindings/core/v8/v8_gc_controller.cc 2019-10-23 14:30:25.683541568 -0400
@@ -260,7 +260,11 @@ class DOMWrapperForwardingVisitor final
VisitHandle(value, class_id);
}
- void VisitTracedGlobalHandle(const v8::TracedGlobal<v8::Value>& value) final {
+ void VisitTracedGlobalHandle(const v8::TracedGlobal<v8::Value>&) final {
+ CHECK(false) << "Blink does not use v8::TracedGlobal.";
+ }
+
+ void VisitTracedReference(const v8::TracedReference<v8::Value>& value) final {
VisitHandle(&value, value.WrapperClassId());
}
diff -up chromium-78.0.3904.70/third_party/blink/renderer/platform/bindings/dom_data_store.h.v8-tracedreference-fix chromium-78.0.3904.70/third_party/blink/renderer/platform/bindings/dom_data_store.h
--- chromium-78.0.3904.70/third_party/blink/renderer/platform/bindings/dom_data_store.h.v8-tracedreference-fix 2019-10-21 15:06:44.000000000 -0400
+++ chromium-78.0.3904.70/third_party/blink/renderer/platform/bindings/dom_data_store.h 2019-10-23 14:30:25.685541526 -0400
@@ -229,6 +229,11 @@ class DOMDataStore {
DOMWorldWrapperReference(v8::Isolate* isolate, v8::Local<v8::Object> handle)
: TraceWrapperV8Reference(isolate, handle) {}
+ ~DOMWorldWrapperReference() {
+ // Destruction of a reference should clear it immediately.
+ Clear();
+ }
+
// Move support without write barrier.
DOMWorldWrapperReference(DOMWorldWrapperReference&& other)
: TraceWrapperV8Reference() {
diff -up chromium-78.0.3904.70/third_party/blink/renderer/platform/bindings/script_wrappable.h.v8-tracedreference-fix chromium-78.0.3904.70/third_party/blink/renderer/platform/bindings/script_wrappable.h
--- chromium-78.0.3904.70/third_party/blink/renderer/platform/bindings/script_wrappable.h.v8-tracedreference-fix 2019-10-21 15:06:44.000000000 -0400
+++ chromium-78.0.3904.70/third_party/blink/renderer/platform/bindings/script_wrappable.h 2019-10-23 14:30:25.687541484 -0400
@@ -161,6 +161,11 @@ class PLATFORM_EXPORT ScriptWrappable
return main_world_wrapper_.NewLocal(isolate);
}
+ static_assert(
+ std::is_trivially_destructible<
+ TraceWrapperV8Reference<v8::Object>>::value,
+ "TraceWrapperV8Reference<v8::Object> should be trivially destructible.");
+
TraceWrapperV8Reference<v8::Object> main_world_wrapper_;
DISALLOW_COPY_AND_ASSIGN(ScriptWrappable);
diff -up chromium-78.0.3904.70/third_party/blink/renderer/platform/bindings/trace_wrapper_v8_reference.h.v8-tracedreference-fix chromium-78.0.3904.70/third_party/blink/renderer/platform/bindings/trace_wrapper_v8_reference.h
--- chromium-78.0.3904.70/third_party/blink/renderer/platform/bindings/trace_wrapper_v8_reference.h.v8-tracedreference-fix 2019-10-21 15:06:44.000000000 -0400
+++ chromium-78.0.3904.70/third_party/blink/renderer/platform/bindings/trace_wrapper_v8_reference.h 2019-10-23 14:30:25.688541463 -0400
@@ -11,15 +11,6 @@
#include "third_party/blink/renderer/platform/heap/unified_heap_marking_visitor.h"
#include "v8/include/v8.h"
-namespace v8 {
-
-template <typename T>
-struct TracedGlobalTrait<v8::TracedGlobal<T>> {
- static constexpr bool kRequiresExplicitDestruction = false;
-};
-
-} // namespace v8
-
namespace blink {
/**
@@ -50,8 +41,8 @@ class TraceWrapperV8Reference {
bool IsEmpty() const { return handle_.IsEmpty(); }
void Clear() { handle_.Reset(); }
- ALWAYS_INLINE const v8::TracedGlobal<T>& Get() const { return handle_; }
- ALWAYS_INLINE v8::TracedGlobal<T>& Get() { return handle_; }
+ ALWAYS_INLINE const v8::TracedReference<T>& Get() const { return handle_; }
+ ALWAYS_INLINE v8::TracedReference<T>& Get() { return handle_; }
template <typename S>
const TraceWrapperV8Reference<S>& Cast() const {
@@ -124,7 +115,7 @@ class TraceWrapperV8Reference {
UnifiedHeapMarkingVisitor::WriteBarrier(UnsafeCast<v8::Value>());
}
- v8::TracedGlobal<T> handle_;
+ v8::TracedReference<T> handle_;
};
} // namespace blink
diff -up chromium-78.0.3904.70/third_party/blink/renderer/platform/bindings/wrapper_type_info.h.v8-tracedreference-fix chromium-78.0.3904.70/third_party/blink/renderer/platform/bindings/wrapper_type_info.h
--- chromium-78.0.3904.70/third_party/blink/renderer/platform/bindings/wrapper_type_info.h.v8-tracedreference-fix 2019-10-21 15:06:44.000000000 -0400
+++ chromium-78.0.3904.70/third_party/blink/renderer/platform/bindings/wrapper_type_info.h 2019-10-23 14:30:25.689541442 -0400
@@ -122,7 +122,7 @@ struct WrapperTypeInfo {
wrapper->SetWrapperClassId(wrapper_class_id);
}
- void ConfigureWrapper(v8::TracedGlobal<v8::Object>* wrapper) const {
+ void ConfigureWrapper(v8::TracedReference<v8::Object>* wrapper) const {
wrapper->SetWrapperClassId(wrapper_class_id);
}
@@ -177,7 +177,7 @@ inline T* GetInternalField(const v8::Per
}
template <typename T, int offset>
-inline T* GetInternalField(const v8::TracedGlobal<v8::Object>& global) {
+inline T* GetInternalField(const v8::TracedReference<v8::Object>& global) {
DCHECK_LT(offset, v8::Object::InternalFieldCount(global));
return reinterpret_cast<T*>(
v8::Object::GetAlignedPointerFromInternalField(global, offset));
@@ -198,7 +198,7 @@ inline ScriptWrappable* ToScriptWrappabl
}
inline ScriptWrappable* ToScriptWrappable(
- const v8::TracedGlobal<v8::Object>& wrapper) {
+ const v8::TracedReference<v8::Object>& wrapper) {
return GetInternalField<ScriptWrappable, kV8DOMWrapperObjectIndex>(wrapper);
}
@@ -219,7 +219,8 @@ inline void* ToUntypedWrappable(const v8
return GetInternalField<void, kV8DOMWrapperObjectIndex>(wrapper);
}
-inline void* ToUntypedWrappable(const v8::TracedGlobal<v8::Object>& wrapper) {
+inline void* ToUntypedWrappable(
+ const v8::TracedReference<v8::Object>& wrapper) {
return GetInternalField<void, kV8DOMWrapperObjectIndex>(wrapper);
}
@@ -233,7 +234,7 @@ inline const WrapperTypeInfo* ToWrapperT
}
inline const WrapperTypeInfo* ToWrapperTypeInfo(
- const v8::TracedGlobal<v8::Object>& wrapper) {
+ const v8::TracedReference<v8::Object>& wrapper) {
return GetInternalField<WrapperTypeInfo, kV8DOMWrapperTypeIndex>(wrapper);
}
diff -up chromium-78.0.3904.70/third_party/blink/renderer/platform/heap/thread_state.cc.v8-tracedreference-fix chromium-78.0.3904.70/third_party/blink/renderer/platform/heap/thread_state.cc
--- chromium-78.0.3904.70/third_party/blink/renderer/platform/heap/thread_state.cc.v8-tracedreference-fix 2019-10-21 15:06:45.000000000 -0400
+++ chromium-78.0.3904.70/third_party/blink/renderer/platform/heap/thread_state.cc 2019-10-23 14:30:25.693541359 -0400
@@ -1451,11 +1451,15 @@ class ClearReferencesInDeadObjectsVisito
value->Reset();
}
- void VisitTracedGlobalHandle(const v8::TracedGlobal<v8::Value>& value) final {
+ void VisitTracedGlobalHandle(const v8::TracedGlobal<v8::Value>&) final {
+ CHECK(false) << "Blink does not use v8::TracedGlobal.";
+ }
+
+ void VisitTracedReference(const v8::TracedReference<v8::Value>& value) final {
// TODO(mlippautz): Avoid const_cast after changing the API to allow
- // modificaton of the TracedGlobal handle.
- if (InDeadObject(&const_cast<v8::TracedGlobal<v8::Value>&>(value)))
- const_cast<v8::TracedGlobal<v8::Value>&>(value).Reset();
+ // modificaton of the handle.
+ if (InDeadObject(&const_cast<v8::TracedReference<v8::Value>&>(value)))
+ const_cast<v8::TracedReference<v8::Value>&>(value).Reset();
}
private:
@@ -1584,11 +1588,15 @@ class UnpoisonHandlesVisitor final
VisitSlot(value, sizeof(v8::Persistent<v8::Value>));
}
- void VisitTracedGlobalHandle(const v8::TracedGlobal<v8::Value>& value) final {
+ void VisitTracedGlobalHandle(const v8::TracedGlobal<v8::Value>&) final {
+ CHECK(false) << "Blink does not use v8::TracedGlobal.";
+ }
+
+ void VisitTracedReference(const v8::TracedReference<v8::Value>& value) final {
// TODO(mlippautz): Avoid const_cast after changing the API to allow
- // modificaton of the TracedGlobal handle.
- VisitSlot(&const_cast<v8::TracedGlobal<v8::Value>&>(value),
- sizeof(v8::TracedGlobal<v8::Value>));
+ // modificaton of the handle.
+ VisitSlot(&const_cast<v8::TracedReference<v8::Value>&>(value),
+ sizeof(v8::TracedReference<v8::Value>));
}
private:
diff -up chromium-78.0.3904.70/third_party/blink/renderer/platform/heap/unified_heap_controller.cc.v8-tracedreference-fix chromium-78.0.3904.70/third_party/blink/renderer/platform/heap/unified_heap_controller.cc
--- chromium-78.0.3904.70/third_party/blink/renderer/platform/heap/unified_heap_controller.cc.v8-tracedreference-fix 2019-10-21 15:06:45.000000000 -0400
+++ chromium-78.0.3904.70/third_party/blink/renderer/platform/heap/unified_heap_controller.cc 2019-10-23 14:32:34.722840885 -0400
@@ -147,16 +147,19 @@ bool UnifiedHeapController::IsTracingDon
return is_tracing_done_;
}
-bool UnifiedHeapController::IsRootForNonTracingGCInternal(
- const v8::TracedGlobal<v8::Value>& handle) {
+namespace {
+
+bool IsRootForNonTracingGCInternal(
+ const v8::TracedReference<v8::Value>& handle) {
const uint16_t class_id = handle.WrapperClassId();
- // Stand-alone TracedGlobal reference or kCustomWrappableId. Keep as root as
+ // Stand-alone reference or kCustomWrappableId. Keep as root as
// we don't know better.
if (class_id != WrapperTypeInfo::kNodeClassId &&
class_id != WrapperTypeInfo::kObjectClassId)
return true;
- const v8::TracedGlobal<v8::Object>& traced = handle.As<v8::Object>();
+ const v8::TracedReference<v8::Object>& traced =
+ handle.template As<v8::Object>();
if (ToWrapperTypeInfo(traced)->IsActiveScriptWrappable() &&
ToScriptWrappable(traced)->HasPendingActivity()) {
return true;
@@ -169,8 +172,10 @@ bool UnifiedHeapController::IsRootForNon
return false;
}
+} // namespace
+
void UnifiedHeapController::ResetHandleInNonTracingGC(
- const v8::TracedGlobal<v8::Value>& handle) {
+ const v8::TracedReference<v8::Value>& handle) {
const uint16_t class_id = handle.WrapperClassId();
// Only consider handles that have not been treated as roots, see
// IsRootForNonTracingGCInternal.
@@ -178,15 +183,21 @@ void UnifiedHeapController::ResetHandleI
class_id != WrapperTypeInfo::kObjectClassId)
return;
- const v8::TracedGlobal<v8::Object>& traced = handle.As<v8::Object>();
+ const v8::TracedReference<v8::Object>& traced = handle.As<v8::Object>();
ToScriptWrappable(traced)->UnsetWrapperIfAny();
}
bool UnifiedHeapController::IsRootForNonTracingGC(
- const v8::TracedGlobal<v8::Value>& handle) {
+ const v8::TracedReference<v8::Value>& handle) {
return IsRootForNonTracingGCInternal(handle);
}
+bool UnifiedHeapController::IsRootForNonTracingGC(
+ const v8::TracedGlobal<v8::Value>& handle) {
+ CHECK(false) << "Blink does not use v8::TracedGlobal.";
+ return false;
+}
+
void UnifiedHeapController::ReportBufferedAllocatedSizeIfPossible() {
DCHECK(base::FeatureList::IsEnabled(
blink::features::kBlinkHeapUnifiedGCScheduling));
diff -up chromium-78.0.3904.70/third_party/blink/renderer/platform/heap/unified_heap_controller.h.v8-tracedreference-fix chromium-78.0.3904.70/third_party/blink/renderer/platform/heap/unified_heap_controller.h
--- chromium-78.0.3904.70/third_party/blink/renderer/platform/heap/unified_heap_controller.h.v8-tracedreference-fix 2019-10-21 15:06:45.000000000 -0400
+++ chromium-78.0.3904.70/third_party/blink/renderer/platform/heap/unified_heap_controller.h 2019-10-23 14:30:25.695541317 -0400
@@ -45,8 +45,9 @@ class PLATFORM_EXPORT UnifiedHeapControl
void RegisterV8References(const std::vector<std::pair<void*, void*>>&) final;
bool AdvanceTracing(double) final;
bool IsTracingDone() final;
+ bool IsRootForNonTracingGC(const v8::TracedReference<v8::Value>&) final;
bool IsRootForNonTracingGC(const v8::TracedGlobal<v8::Value>&) final;
- void ResetHandleInNonTracingGC(const v8::TracedGlobal<v8::Value>&) final;
+ void ResetHandleInNonTracingGC(const v8::TracedReference<v8::Value>&) final;
ThreadState* thread_state() const { return thread_state_; }
@@ -59,9 +60,6 @@ class PLATFORM_EXPORT UnifiedHeapControl
void DecreaseAllocatedSpace(size_t) final {}
private:
- static bool IsRootForNonTracingGCInternal(
- const v8::TracedGlobal<v8::Value>& handle);
-
void ReportBufferedAllocatedSizeIfPossible();
ThreadState* const thread_state_;

@ -1,17 +0,0 @@
diff -up chromium-78.0.3904.97/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc.glibc-clock-nanosleep chromium-78.0.3904.97/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
--- chromium-78.0.3904.97/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc.glibc-clock-nanosleep 2019-11-17 16:48:03.463997928 -0500
+++ chromium-78.0.3904.97/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc 2019-11-17 16:48:37.057222139 -0500
@@ -32,12 +32,12 @@ bool SyscallSets::IsAllowedGettime(int s
(defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
case __NR_time:
#endif
+ case __NR_clock_nanosleep:
return true;
case __NR_adjtimex: // Privileged.
case __NR_clock_adjtime: // Privileged.
case __NR_clock_getres: // Could be allowed.
case __NR_clock_gettime:
- case __NR_clock_nanosleep: // Could be allowed.
case __NR_clock_settime: // Privileged.
#if defined(__i386__) || \
(defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))

@ -0,0 +1,39 @@
From af77dc4014ead3d898fdc8a7a70fe5063ac9b102 Mon Sep 17 00:00:00 2001
From: Jose Dapena Paz <jose.dapena@lge.com>
Date: Fri, 25 Oct 2019 19:01:29 +0000
Subject: [PATCH] GCC: use brace-initializer for DohUpgrade vector
Constructing NoDestructor with parenthesis constructor is ambiguous
in GCC. Use brace-initializer to avoid that problem. This fixes this
build error:
Bug: 819294
Change-Id: I00dda42daa1794d11e022f26ac07f92e599d106d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1879910
Reviewed-by: Eric Orth <ericorth@chromium.org>
Commit-Queue: José Dapena Paz <jose.dapena@lge.com>
Cr-Commit-Position: refs/heads/master@{#709569}
---
diff --git a/net/dns/dns_util.cc b/net/dns/dns_util.cc
index 14997c4..637b6f2 100644
--- a/net/dns/dns_util.cc
+++ b/net/dns/dns_util.cc
@@ -144,7 +144,7 @@
// DohProviderId histogram suffix list in
// tools/metrics/histograms/histograms.xml.
static const base::NoDestructor<std::vector<DohUpgradeEntry>>
- upgradable_servers({
+ upgradable_servers{{
DohUpgradeEntry(
"CleanBrowsingAdult",
{"185.228.168.10", "185.228.169.11", "2a0d:2a00:1::1",
@@ -215,7 +215,7 @@
{"9.9.9.9", "149.112.112.112", "2620:fe::fe", "2620:fe::9"},
{"dns.quad9.net", "dns9.quad9.net"} /* DoT hostname */,
{"https://dns.quad9.net/dns-query", true /* use_post */}),
- });
+ }};
return *upgradable_servers;
}

@ -0,0 +1,79 @@
From 528e9a3e1f25bd264549c4c7779748abfd16bb1c Mon Sep 17 00:00:00 2001
From: Jan Wilken Dörrie <jdoerrie@chromium.org>
Date: Fri, 18 Oct 2019 11:45:24 +0000
Subject: [PATCH] Reland "GCC: Fix base::internal::InvokeFuncImpl"
This is a reland of 9293d5c86eec1c34fc00716645400b44a14e764e
Original change's description:
> GCC: Fix base::internal::InvokeFuncImpl
>
> GCC doesn't like that the Value data member has no out-of-line
> definition. The problem is triggered specifically only when compiling
>
> components/services/leveldb/leveldb_database_impl.cc
>
> which has lambda functions returning locally-defined classes.
>
> The current code works as-is in C++17 mode which introduces the concept
> of inline variables, but in C++14 we need either an explicit out-of-line
> definition or a function member instead of a data member.
>
> Use std::integral_constant for defining the value.
>
> Bug: 819294
> Change-Id: I5c68e14ce3fa9d8b4d8a2cb42d7f9b53938aabf3
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1862451
> Reviewed-by: Jan Wilken Dörrie <jdoerrie@chromium.org>
> Reviewed-by: Daniel Cheng <dcheng@chromium.org>
> Commit-Queue: Jüri Valdmann <juri.valdmann@qt.io>
> Cr-Commit-Position: refs/heads/master@{#706384}
Bug: 819294
Change-Id: I3d5a52ddc6815516e2239f9347c60de06bf765a2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1865212
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Jan Wilken Dörrie <jdoerrie@chromium.org>
Cr-Commit-Position: refs/heads/master@{#707329}
---
diff --git a/base/bind.h b/base/bind.h
index 7a400af..1070ce6 100644
--- a/base/bind.h
+++ b/base/bind.h
@@ -187,18 +187,15 @@
// well-formed. Using `Invoker::Run` with a OnceCallback triggers a
// static_assert, which is why the ternary expression does not compile.
// TODO(crbug.com/752720): Remove this indirection once we have `if constexpr`.
-template <bool is_once, typename Invoker>
-struct InvokeFuncImpl;
+template <typename Invoker>
+constexpr auto GetInvokeFunc(std::true_type) {
+ return Invoker::RunOnce;
+}
template <typename Invoker>
-struct InvokeFuncImpl<true, Invoker> {
- static constexpr auto Value = &Invoker::RunOnce;
-};
-
-template <typename Invoker>
-struct InvokeFuncImpl<false, Invoker> {
- static constexpr auto Value = &Invoker::Run;
-};
+constexpr auto GetInvokeFunc(std::false_type) {
+ return Invoker::Run;
+}
template <template <typename> class CallbackT,
typename Functor,
@@ -229,7 +226,8 @@
// InvokeFuncStorage, so that we can ensure its type matches to
// PolymorphicInvoke, to which CallbackType will cast back.
using PolymorphicInvoke = typename CallbackType::PolymorphicInvoke;
- PolymorphicInvoke invoke_func = InvokeFuncImpl<kIsOnce, Invoker>::Value;
+ PolymorphicInvoke invoke_func =
+ GetInvokeFunc<Invoker>(std::integral_constant<bool, kIsOnce>());
using InvokeFuncStorage = internal::BindStateBase::InvokeFuncStorage;
return CallbackType(BindState::Create(

@ -0,0 +1,131 @@
From f7c177d35242311ea7a2cf49a0980c61664f27ba Mon Sep 17 00:00:00 2001
From: Jose Dapena Paz <jose.dapena@lge.com>
Date: Fri, 25 Oct 2019 15:07:09 +0000
Subject: [PATCH] IWYU: include algorithm to use std::lower_bound in ui/gfx/font.cc
Fix GCC build because of missing include:
../../ui/gfx/font.cc: In function gfx::Font::Weight gfx::FontWeightFromInt(int):
../../ui/gfx/font.cc:114:8: error: no matching function for call to lower_bound(const gfx::Font::Weight*, const gfx::Font::Weight*, int&, gfx::FontWeightFromInt(int)::<lambda(const gfx::Font::Weight&, const int&)>)
});
^
In file included from /usr/include/c++/8/bits/char_traits.h:39,
from /usr/include/c++/8/string:40,
from ../../ui/gfx/font.h:8,
from ../../ui/gfx/font.cc:5:
/usr/include/c++/8/bits/stl_algobase.h:984:5: note: candidate: template<class _ForwardIterator, class _Tp> _ForwardIterator std::lower_bound(_ForwardIterator, _ForwardIterator, const _Tp&)
lower_bound(_ForwardIterator __first, _ForwardIterator __last,
^~~~~~~~~~~
/usr/include/c++/8/bits/stl_algobase.h:984:5: note: template argument deduction/substitution failed:
../../ui/gfx/font.cc:114:8: note: candidate expects 3 arguments, 4 provided
});
^
Bug: 819294
Change-Id: Ic59dcf3a06bdd54d1d426c08a61624873a0ff30c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1879909
Commit-Queue: Alexei Svitkine <asvitkine@chromium.org>
Reviewed-by: Alexei Svitkine <asvitkine@chromium.org>
Cr-Commit-Position: refs/heads/master@{#709472}
---
diff --git a/ui/gfx/font.cc b/ui/gfx/font.cc
index 21367fd7..92b159e 100644
--- a/ui/gfx/font.cc
+++ b/ui/gfx/font.cc
@@ -4,6 +4,8 @@
#include "ui/gfx/font.h"
+#include <algorithm>
+
#include "base/strings/utf_string_conversions.h"
#include "build/build_config.h"
#include "ui/gfx/platform_font.h"
From 97eb905ba262382bc3583078761c68f4452aea71 Mon Sep 17 00:00:00 2001
From: Jose Dapena Paz <jose.dapena@lge.com>
Date: Fri, 25 Oct 2019 09:27:53 +0000
Subject: [PATCH] IWYU: launch_manager.h uses std::vector
Add #include <vector> for using std::vector. This fixes GCC build.
./../chrome/browser/apps/launch_service/launch_manager.h:46:15: error: vector in namespace std does not name a template type
static std::vector<base::FilePath> GetLaunchFilesFromCommandLine(
^~~~~~
Bug: 819294
Change-Id: I02ec3a2914a8fbe3aa0041017a0228f4b0ca1ec9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1879289
Reviewed-by: Alexey Baskakov <loyso@chromium.org>
Commit-Queue: José Dapena Paz <jose.dapena@lge.com>
Cr-Commit-Position: refs/heads/master@{#709411}
---
diff --git a/chrome/browser/apps/launch_service/launch_manager.h b/chrome/browser/apps/launch_service/launch_manager.h
index 00aeb9d..76570ea 100644
--- a/chrome/browser/apps/launch_service/launch_manager.h
+++ b/chrome/browser/apps/launch_service/launch_manager.h
@@ -6,6 +6,7 @@
#define CHROME_BROWSER_APPS_LAUNCH_SERVICE_LAUNCH_MANAGER_H_
#include <string>
+#include <vector>
#include "base/macros.h"
From e7407ce7fa262e9fd1a19dd0957e5a950520ee3a Mon Sep 17 00:00:00 2001
From: Jose Dapena Paz <jose.dapena@lge.com>
Date: Fri, 25 Oct 2019 08:25:45 +0000
Subject: [PATCH] IWYU: include cstdint in register_context.h as it uses uintptr_t
GCC build fix as build fails with this:
../../base/profiler/register_context.h:31:1: error: uintptr_t does not name a type; did you mean intptr_t?
uintptr_t& AsUintPtr(T* value) {
^~~~~~~~~
intptr_t
../../base/profiler/register_context.h:110:3: error: uintptr_t does not name a type; did you mean intptr_t?
uintptr_t stack_pointer;
^~~~~~~~~
intptr_t
../../base/profiler/register_context.h:111:3: error: uintptr_t does not name a type; did you mean intptr_t?
uintptr_t frame_pointer;
^~~~~~~~~
intptr_t
../../base/profiler/register_context.h:112:3: error: uintptr_t does not name a type; did you mean intptr_t?
uintptr_t instruction_pointer;
^~~~~~~~~
intptr_t
../../base/profiler/register_context.h:115:8: error: uintptr_t does not name a type; did you mean intptr_t?
inline uintptr_t& RegisterContextStackPointer(RegisterContext* context) {
^~~~~~~~~
intptr_t
../../base/profiler/register_context.h:119:8: error: uintptr_t does not name a type; did you mean intptr_t?
inline uintptr_t& RegisterContextFramePointer(RegisterContext* context) {
^~~~~~~~~
intptr_t
../../base/profiler/register_context.h:123:8: error: uintptr_t does not name a type; did you mean intptr_t?
inline uintptr_t& RegisterContextInstructionPointer(RegisterContext* context) {
^~~~~~~~~
intptr_t
Bug: 819294
Change-Id: I49567b00a6f021686c52053a22fb9c502c84f1bc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1879908
Reviewed-by: Mike Wittman <wittman@chromium.org>
Commit-Queue: José Dapena Paz <jose.dapena@lge.com>
Cr-Commit-Position: refs/heads/master@{#709398}
---
diff --git a/base/profiler/register_context.h b/base/profiler/register_context.h
index 46c4250..7dd86ff 100644
--- a/base/profiler/register_context.h
+++ b/base/profiler/register_context.h
@@ -9,6 +9,7 @@
#ifndef BASE_PROFILER_REGISTER_CONTEXT_H_
#define BASE_PROFILER_REGISTER_CONTEXT_H_
+#include <cstdint>
#include <type_traits>
#include "build/build_config.h"

@ -1,15 +1,3 @@
diff -up chromium-77.0.3865.75/base/task/promise/dependent_list.h.base-gcc-no-alignas chromium-77.0.3865.75/base/task/promise/dependent_list.h
--- chromium-77.0.3865.75/base/task/promise/dependent_list.h.base-gcc-no-alignas 2019-09-13 21:45:51.873172347 +0200
+++ chromium-77.0.3865.75/base/task/promise/dependent_list.h 2019-09-13 21:46:21.661522514 +0200
@@ -59,7 +59,7 @@ class BASE_EXPORT DependentList {
// Align Node on an 8-byte boundary to ensure the first 3 bits are 0 and can
// be used to store additional state (see static_asserts below).
- class BASE_EXPORT alignas(8) Node {
+ class BASE_EXPORT ALIGNAS(8) Node {
public:
Node();
explicit Node(Node&& other) noexcept;
--- a/third_party/protobuf/src/google/protobuf/arena.h
+++ b/third_party/protobuf/src/google/protobuf/arena.h
@@ -245,7 +245,7 @@ struct ArenaOptions {

@ -1,6 +1,6 @@
diff -up chromium-78.0.3904.70/chrome/common/media_router/media_sink.cc.el7-noexcept chromium-78.0.3904.70/chrome/common/media_router/media_sink.cc
--- chromium-78.0.3904.70/chrome/common/media_router/media_sink.cc.el7-noexcept 2019-10-21 15:06:26.000000000 -0400
+++ chromium-78.0.3904.70/chrome/common/media_router/media_sink.cc 2019-10-30 09:26:51.339057055 -0400
diff -up chromium-79.0.3945.56/chrome/common/media_router/media_sink.cc.el7-noexcept chromium-79.0.3945.56/chrome/common/media_router/media_sink.cc
--- chromium-79.0.3945.56/chrome/common/media_router/media_sink.cc.el7-noexcept 2019-11-26 16:50:43.000000000 -0500
+++ chromium-79.0.3945.56/chrome/common/media_router/media_sink.cc 2019-12-03 12:55:19.129613273 -0500
@@ -19,12 +19,12 @@ MediaSink::MediaSink(const MediaSink::Id
provider_id_(provider_id) {}
@ -16,9 +16,9 @@ diff -up chromium-78.0.3904.70/chrome/common/media_router/media_sink.cc.el7-noex
bool MediaSink::IsMaybeCloudSink() const {
switch (icon_type_) {
diff -up chromium-78.0.3904.70/components/history/core/browser/history_types.cc.el7-noexcept chromium-78.0.3904.70/components/history/core/browser/history_types.cc
--- chromium-78.0.3904.70/components/history/core/browser/history_types.cc.el7-noexcept 2019-10-21 15:06:29.000000000 -0400
+++ chromium-78.0.3904.70/components/history/core/browser/history_types.cc 2019-10-30 09:26:51.358056614 -0400
diff -up chromium-79.0.3945.56/components/history/core/browser/history_types.cc.el7-noexcept chromium-79.0.3945.56/components/history/core/browser/history_types.cc
--- chromium-79.0.3945.56/components/history/core/browser/history_types.cc.el7-noexcept 2019-11-26 16:50:45.000000000 -0500
+++ chromium-79.0.3945.56/components/history/core/browser/history_types.cc 2019-12-03 12:55:19.178612170 -0500
@@ -42,7 +42,7 @@ QueryResults::QueryResults(QueryResults&
Swap(&other);
}
@ -37,10 +37,10 @@ diff -up chromium-78.0.3904.70/components/history/core/browser/history_types.cc.
// MostVisitedURL --------------------------------------------------------------
diff -up chromium-78.0.3904.70/components/history/core/browser/history_types.h.el7-noexcept chromium-78.0.3904.70/components/history/core/browser/history_types.h
--- chromium-78.0.3904.70/components/history/core/browser/history_types.h.el7-noexcept 2019-10-21 15:06:29.000000000 -0400
+++ chromium-78.0.3904.70/components/history/core/browser/history_types.h 2019-10-30 09:26:51.623050465 -0400
@@ -143,7 +143,7 @@ class QueryResults {
diff -up chromium-79.0.3945.56/components/history/core/browser/history_types.h.el7-noexcept chromium-79.0.3945.56/components/history/core/browser/history_types.h
--- chromium-79.0.3945.56/components/history/core/browser/history_types.h.el7-noexcept 2019-11-26 16:52:30.000000000 -0500
+++ chromium-79.0.3945.56/components/history/core/browser/history_types.h 2019-12-03 12:55:19.184612035 -0500
@@ -141,7 +141,7 @@ class QueryResults {
~QueryResults();
QueryResults(QueryResults&& other) noexcept;
@ -49,7 +49,7 @@ diff -up chromium-78.0.3904.70/components/history/core/browser/history_types.h.e
void set_reached_beginning(bool reached) { reached_beginning_ = reached; }
bool reached_beginning() { return reached_beginning_; }
@@ -278,7 +278,7 @@ struct QueryURLResult {
@@ -276,7 +276,7 @@ struct QueryURLResult {
QueryURLResult(const QueryURLResult&);
QueryURLResult(QueryURLResult&&) noexcept;
QueryURLResult& operator=(const QueryURLResult&);
@ -58,9 +58,9 @@ diff -up chromium-78.0.3904.70/components/history/core/browser/history_types.h.e
~QueryURLResult();
// Indicates whether the call to HistoryBackend::QueryURL was successfull
diff -up chromium-78.0.3904.70/components/history/core/browser/url_row.cc.el7-noexcept chromium-78.0.3904.70/components/history/core/browser/url_row.cc
--- chromium-78.0.3904.70/components/history/core/browser/url_row.cc.el7-noexcept 2019-10-21 15:06:29.000000000 -0400
+++ chromium-78.0.3904.70/components/history/core/browser/url_row.cc 2019-10-30 09:26:51.625050418 -0400
diff -up chromium-79.0.3945.56/components/history/core/browser/url_row.cc.el7-noexcept chromium-79.0.3945.56/components/history/core/browser/url_row.cc
--- chromium-79.0.3945.56/components/history/core/browser/url_row.cc.el7-noexcept 2019-11-26 16:50:45.000000000 -0500
+++ chromium-79.0.3945.56/components/history/core/browser/url_row.cc 2019-12-03 12:55:19.211611428 -0500
@@ -26,7 +26,7 @@ URLRow::~URLRow() {
}
@ -70,9 +70,9 @@ diff -up chromium-78.0.3904.70/components/history/core/browser/url_row.cc.el7-no
void URLRow::Swap(URLRow* other) {
std::swap(id_, other->id_);
diff -up chromium-78.0.3904.70/components/omnibox/browser/suggestion_answer.cc.el7-noexcept chromium-78.0.3904.70/components/omnibox/browser/suggestion_answer.cc
--- chromium-78.0.3904.70/components/omnibox/browser/suggestion_answer.cc.el7-noexcept 2019-10-21 15:06:29.000000000 -0400
+++ chromium-78.0.3904.70/components/omnibox/browser/suggestion_answer.cc 2019-10-30 09:26:51.627050372 -0400
diff -up chromium-79.0.3945.56/components/omnibox/browser/suggestion_answer.cc.el7-noexcept chromium-79.0.3945.56/components/omnibox/browser/suggestion_answer.cc
--- chromium-79.0.3945.56/components/omnibox/browser/suggestion_answer.cc.el7-noexcept 2019-11-26 16:50:45.000000000 -0500
+++ chromium-79.0.3945.56/components/omnibox/browser/suggestion_answer.cc 2019-12-03 12:55:19.240610775 -0500
@@ -60,7 +60,7 @@ SuggestionAnswer::TextField::TextField(T
SuggestionAnswer::TextField& SuggestionAnswer::TextField::operator=(
const TextField&) = default;
@ -82,9 +82,9 @@ diff -up chromium-78.0.3904.70/components/omnibox/browser/suggestion_answer.cc.e
// static
bool SuggestionAnswer::TextField::ParseTextField(const base::Value& field_json,
diff -up chromium-78.0.3904.70/components/policy/core/common/policy_map.cc.el7-noexcept chromium-78.0.3904.70/components/policy/core/common/policy_map.cc
--- chromium-78.0.3904.70/components/policy/core/common/policy_map.cc.el7-noexcept 2019-10-21 15:06:29.000000000 -0400
+++ chromium-78.0.3904.70/components/policy/core/common/policy_map.cc 2019-10-30 09:26:51.628050349 -0400
diff -up chromium-79.0.3945.56/components/policy/core/common/policy_map.cc.el7-noexcept chromium-79.0.3945.56/components/policy/core/common/policy_map.cc
--- chromium-79.0.3945.56/components/policy/core/common/policy_map.cc.el7-noexcept 2019-12-03 12:55:19.241610753 -0500
+++ chromium-79.0.3945.56/components/policy/core/common/policy_map.cc 2019-12-03 13:45:18.433948708 -0500
@@ -52,7 +52,7 @@ PolicyMap::Entry::Entry(
PolicyMap::Entry::~Entry() = default;
@ -93,10 +93,10 @@ diff -up chromium-78.0.3904.70/components/policy/core/common/policy_map.cc.el7-n
+PolicyMap::Entry& PolicyMap::Entry::operator=(Entry&&) = default;
PolicyMap::Entry PolicyMap::Entry::DeepCopy() const {
Entry copy;
diff -up chromium-78.0.3904.70/components/search_provider_logos/logo_common.cc.el7-noexcept chromium-78.0.3904.70/components/search_provider_logos/logo_common.cc
--- chromium-78.0.3904.70/components/search_provider_logos/logo_common.cc.el7-noexcept 2019-10-30 09:27:30.773143557 -0400
+++ chromium-78.0.3904.70/components/search_provider_logos/logo_common.cc 2019-10-30 13:09:43.872691009 -0400
Entry copy(level, scope, source, value ? value->CreateDeepCopy() : nullptr,
diff -up chromium-79.0.3945.56/components/search_provider_logos/logo_common.cc.el7-noexcept chromium-79.0.3945.56/components/search_provider_logos/logo_common.cc
--- chromium-79.0.3945.56/components/search_provider_logos/logo_common.cc.el7-noexcept 2019-11-26 16:50:45.000000000 -0500
+++ chromium-79.0.3945.56/components/search_provider_logos/logo_common.cc 2019-12-03 12:55:19.242610730 -0500
@@ -14,14 +14,14 @@ LogoMetadata::LogoMetadata() = default;
LogoMetadata::LogoMetadata(const LogoMetadata&) = default;
LogoMetadata::LogoMetadata(LogoMetadata&&) noexcept = default;
@ -123,10 +123,10 @@ diff -up chromium-78.0.3904.70/components/search_provider_logos/logo_common.cc.e
LogoCallbacks::~LogoCallbacks() = default;
} // namespace search_provider_logos
diff -up chromium-78.0.3904.70/components/signin/public/identity_manager/account_info.cc.el7-noexcept chromium-78.0.3904.70/components/signin/public/identity_manager/account_info.cc
--- chromium-78.0.3904.70/components/signin/public/identity_manager/account_info.cc.el7-noexcept 2019-10-21 15:06:30.000000000 -0400
+++ chromium-78.0.3904.70/components/signin/public/identity_manager/account_info.cc 2019-10-30 09:26:51.629050326 -0400
@@ -57,7 +57,7 @@ CoreAccountInfo::CoreAccountInfo(CoreAcc
diff -up chromium-79.0.3945.56/components/signin/public/identity_manager/account_info.cc.el7-noexcept chromium-79.0.3945.56/components/signin/public/identity_manager/account_info.cc
--- chromium-79.0.3945.56/components/signin/public/identity_manager/account_info.cc.el7-noexcept 2019-11-26 16:50:45.000000000 -0500
+++ chromium-79.0.3945.56/components/signin/public/identity_manager/account_info.cc 2019-12-03 12:55:19.242610730 -0500
@@ -58,7 +58,7 @@ CoreAccountInfo::CoreAccountInfo(CoreAcc
CoreAccountInfo& CoreAccountInfo::operator=(const CoreAccountInfo& other) =
default;
@ -135,7 +135,7 @@ diff -up chromium-78.0.3904.70/components/signin/public/identity_manager/account
default;
bool CoreAccountInfo::IsEmpty() const {
@@ -74,7 +74,7 @@ AccountInfo::AccountInfo(AccountInfo&& o
@@ -75,7 +75,7 @@ AccountInfo::AccountInfo(AccountInfo&& o
AccountInfo& AccountInfo::operator=(const AccountInfo& other) = default;
@ -144,9 +144,9 @@ diff -up chromium-78.0.3904.70/components/signin/public/identity_manager/account
bool AccountInfo::IsEmpty() const {
return CoreAccountInfo::IsEmpty() && hosted_domain.empty() &&
diff -up chromium-78.0.3904.70/google_apis/gaia/core_account_id.cc.el7-noexcept chromium-78.0.3904.70/google_apis/gaia/core_account_id.cc
--- chromium-78.0.3904.70/google_apis/gaia/core_account_id.cc.el7-noexcept 2019-10-21 15:06:34.000000000 -0400
+++ chromium-78.0.3904.70/google_apis/gaia/core_account_id.cc 2019-10-30 09:26:51.630050302 -0400
diff -up chromium-79.0.3945.56/google_apis/gaia/core_account_id.cc.el7-noexcept chromium-79.0.3945.56/google_apis/gaia/core_account_id.cc
--- chromium-79.0.3945.56/google_apis/gaia/core_account_id.cc.el7-noexcept 2019-11-26 16:52:31.000000000 -0500
+++ chromium-79.0.3945.56/google_apis/gaia/core_account_id.cc 2019-12-03 12:55:19.243610708 -0500
@@ -14,7 +14,7 @@ CoreAccountId::~CoreAccountId() = defaul
CoreAccountId& CoreAccountId::operator=(const CoreAccountId&) = default;
@ -156,9 +156,9 @@ diff -up chromium-78.0.3904.70/google_apis/gaia/core_account_id.cc.el7-noexcept
CoreAccountId::CoreAccountId(const char* id) : id(id) {}
diff -up chromium-78.0.3904.70/google_apis/gaia/core_account_id.h.el7-noexcept chromium-78.0.3904.70/google_apis/gaia/core_account_id.h
--- chromium-78.0.3904.70/google_apis/gaia/core_account_id.h.el7-noexcept 2019-10-21 15:06:34.000000000 -0400
+++ chromium-78.0.3904.70/google_apis/gaia/core_account_id.h 2019-10-30 09:26:51.631050279 -0400
diff -up chromium-79.0.3945.56/google_apis/gaia/core_account_id.h.el7-noexcept chromium-79.0.3945.56/google_apis/gaia/core_account_id.h
--- chromium-79.0.3945.56/google_apis/gaia/core_account_id.h.el7-noexcept 2019-11-26 16:52:31.000000000 -0500
+++ chromium-79.0.3945.56/google_apis/gaia/core_account_id.h 2019-12-03 12:55:19.243610708 -0500
@@ -20,7 +20,7 @@ struct CoreAccountId {
~CoreAccountId();
@ -168,10 +168,10 @@ diff -up chromium-78.0.3904.70/google_apis/gaia/core_account_id.h.el7-noexcept c
// Those implicit constructor and conversion operator allow to
// progressively migrate the code to use this struct. Removing
diff -up chromium-78.0.3904.70/gpu/config/gpu_info.cc.el7-noexcept chromium-78.0.3904.70/gpu/config/gpu_info.cc
--- chromium-78.0.3904.70/gpu/config/gpu_info.cc.el7-noexcept 2019-10-21 15:06:35.000000000 -0400
+++ chromium-78.0.3904.70/gpu/config/gpu_info.cc 2019-10-30 09:26:51.633050233 -0400
@@ -169,7 +169,7 @@ GPUInfo::GPUDevice& GPUInfo::GPUDevice::
diff -up chromium-79.0.3945.56/gpu/config/gpu_info.cc.el7-noexcept chromium-79.0.3945.56/gpu/config/gpu_info.cc
--- chromium-79.0.3945.56/gpu/config/gpu_info.cc.el7-noexcept 2019-11-26 16:52:31.000000000 -0500
+++ chromium-79.0.3945.56/gpu/config/gpu_info.cc 2019-12-03 12:55:19.244610685 -0500
@@ -173,7 +173,7 @@ GPUInfo::GPUDevice& GPUInfo::GPUDevice::
const GPUInfo::GPUDevice& other) = default;
GPUInfo::GPUDevice& GPUInfo::GPUDevice::operator=(
@ -180,9 +180,9 @@ diff -up chromium-78.0.3904.70/gpu/config/gpu_info.cc.el7-noexcept chromium-78.0
GPUInfo::GPUInfo()
: optimus(false),
diff -up chromium-78.0.3904.70/third_party/openscreen/src/osp/public/service_info.h.el7-noexcept chromium-78.0.3904.70/third_party/openscreen/src/osp/public/service_info.h
--- chromium-78.0.3904.70/third_party/openscreen/src/osp/public/service_info.h.el7-noexcept 2019-10-21 15:09:14.000000000 -0400
+++ chromium-78.0.3904.70/third_party/openscreen/src/osp/public/service_info.h 2019-10-30 09:26:51.634050210 -0400
diff -up chromium-79.0.3945.56/third_party/openscreen/src/osp/public/service_info.h.el7-noexcept chromium-79.0.3945.56/third_party/openscreen/src/osp/public/service_info.h
--- chromium-79.0.3945.56/third_party/openscreen/src/osp/public/service_info.h.el7-noexcept 2019-11-26 16:53:39.000000000 -0500
+++ chromium-79.0.3945.56/third_party/openscreen/src/osp/public/service_info.h 2019-12-03 12:55:19.244610685 -0500
@@ -21,7 +21,7 @@ struct ServiceInfo {
ServiceInfo(ServiceInfo&&) MAYBE_NOEXCEPT = default;
ServiceInfo(const ServiceInfo&) MAYBE_NOEXCEPT = default;

@ -0,0 +1,12 @@
diff -up chromium-79.0.3945.56/content/common/user_agent.cc.fedora-user-agent chromium-79.0.3945.56/content/common/user_agent.cc
--- chromium-79.0.3945.56/content/common/user_agent.cc.fedora-user-agent 2019-12-03 14:16:13.076763501 -0500
+++ chromium-79.0.3945.56/content/common/user_agent.cc 2019-12-03 14:21:57.427351621 -0500
@@ -35,7 +35,7 @@ std::string GetUserAgentPlatform() {
#elif defined(OS_MACOSX)
return "Macintosh; ";
#elif defined(USE_X11) || defined(USE_OZONE)
- return "X11; "; // strange, but that's what Firefox uses
+ return "X11; Fedora; "; // strange, but that's what Firefox uses
#elif defined(OS_ANDROID)
return "Linux; ";
#elif defined(OS_FUCHSIA)

@ -0,0 +1,11 @@
diff -up chromium-79.0.3945.56/ui/base/cursor/ozone/bitmap_cursor_factory_ozone.h.fix-find_if chromium-79.0.3945.56/ui/base/cursor/ozone/bitmap_cursor_factory_ozone.h
--- chromium-79.0.3945.56/ui/base/cursor/ozone/bitmap_cursor_factory_ozone.h.fix-find_if 2019-12-03 15:32:07.315635750 -0500
+++ chromium-79.0.3945.56/ui/base/cursor/ozone/bitmap_cursor_factory_ozone.h 2019-12-03 15:32:33.085054770 -0500
@@ -5,6 +5,7 @@
#ifndef UI_BASE_CURSOR_OZONE_BITMAP_CURSOR_FACTORY_OZONE_H_
#define UI_BASE_CURSOR_OZONE_BITMAP_CURSOR_FACTORY_OZONE_H_
+#include <algorithm>
#include <map>
#include "base/macros.h"

@ -0,0 +1,108 @@
diff -up chromium-79.0.3945.56/content/child/webthemeengine_impl_android.cc.gcc-name-clash chromium-79.0.3945.56/content/child/webthemeengine_impl_android.cc
--- chromium-79.0.3945.56/content/child/webthemeengine_impl_android.cc.gcc-name-clash 2019-11-26 16:52:30.000000000 -0500
+++ chromium-79.0.3945.56/content/child/webthemeengine_impl_android.cc 2019-12-03 12:48:21.210018632 -0500
@@ -228,7 +228,7 @@ void WebThemeEngineAndroid::Paint(
native_theme_extra_params, NativeColorScheme(color_scheme));
}
-blink::ForcedColors WebThemeEngineAndroid::ForcedColors() const {
+blink::ForcedColors WebThemeEngineAndroid::GetForcedColors() const {
return forced_colors_;
}
diff -up chromium-79.0.3945.56/content/child/webthemeengine_impl_android.h.gcc-name-clash chromium-79.0.3945.56/content/child/webthemeengine_impl_android.h
--- chromium-79.0.3945.56/content/child/webthemeengine_impl_android.h.gcc-name-clash 2019-12-03 12:48:21.213018564 -0500
+++ chromium-79.0.3945.56/content/child/webthemeengine_impl_android.h 2019-12-03 12:49:44.079153643 -0500
@@ -22,7 +22,7 @@ class WebThemeEngineAndroid : public bli
const blink::WebRect& rect,
const blink::WebThemeEngine::ExtraParams* extra_params,
blink::WebColorScheme color_scheme) override;
- blink::ForcedColors ForcedColors() const override;
+ blink::ForcedColors GetForcedColors() const override;
void SetForcedColors(const blink::ForcedColors forced_colors) override;
private:
diff -up chromium-79.0.3945.56/content/child/webthemeengine_impl_default.cc.gcc-name-clash chromium-79.0.3945.56/content/child/webthemeengine_impl_default.cc
--- chromium-79.0.3945.56/content/child/webthemeengine_impl_default.cc.gcc-name-clash 2019-11-26 16:52:30.000000000 -0500
+++ chromium-79.0.3945.56/content/child/webthemeengine_impl_default.cc 2019-12-03 12:48:21.215018520 -0500
@@ -232,7 +232,7 @@ void WebThemeEngineDefault::cacheScrollB
}
#endif
-blink::ForcedColors WebThemeEngineDefault::ForcedColors() const {
+blink::ForcedColors WebThemeEngineDefault::GetForcedColors() const {
return ui::NativeTheme::GetInstanceForWeb()->UsesHighContrastColors()
? blink::ForcedColors::kActive
: blink::ForcedColors::kNone;
diff -up chromium-79.0.3945.56/content/child/webthemeengine_impl_default.h.gcc-name-clash chromium-79.0.3945.56/content/child/webthemeengine_impl_default.h
--- chromium-79.0.3945.56/content/child/webthemeengine_impl_default.h.gcc-name-clash 2019-12-03 12:48:21.217018474 -0500
+++ chromium-79.0.3945.56/content/child/webthemeengine_impl_default.h 2019-12-03 12:50:30.808102006 -0500
@@ -39,7 +39,7 @@ class WebThemeEngineDefault : public bli
int32_t vertical_arrow_bitmap_height,
int32_t horizontal_arrow_bitmap_width);
#endif
- blink::ForcedColors ForcedColors() const override;
+ blink::ForcedColors GetForcedColors() const override;
void SetForcedColors(const blink::ForcedColors forced_colors) override;
};
diff -up chromium-79.0.3945.56/content/child/webthemeengine_impl_mac.cc.gcc-name-clash chromium-79.0.3945.56/content/child/webthemeengine_impl_mac.cc
--- chromium-79.0.3945.56/content/child/webthemeengine_impl_mac.cc.gcc-name-clash 2019-11-26 16:52:30.000000000 -0500
+++ chromium-79.0.3945.56/content/child/webthemeengine_impl_mac.cc 2019-12-03 12:48:21.220018407 -0500
@@ -6,7 +6,7 @@
namespace content {
-blink::ForcedColors WebThemeEngineMac::ForcedColors() const {
+blink::ForcedColors WebThemeEngineMac::GetForcedColors() const {
return forced_colors_;
}
diff -up chromium-79.0.3945.56/content/child/webthemeengine_impl_mac.h.gcc-name-clash chromium-79.0.3945.56/content/child/webthemeengine_impl_mac.h
--- chromium-79.0.3945.56/content/child/webthemeengine_impl_mac.h.gcc-name-clash 2019-12-03 12:48:21.223018339 -0500
+++ chromium-79.0.3945.56/content/child/webthemeengine_impl_mac.h 2019-12-03 12:51:07.790269715 -0500
@@ -13,7 +13,7 @@ class WebThemeEngineMac : public blink::
public:
~WebThemeEngineMac() override {}
- blink::ForcedColors ForcedColors() const override;
+ blink::ForcedColors GetForcedColors() const override;
void SetForcedColors(const blink::ForcedColors forced_colors) override;
private:
diff -up chromium-79.0.3945.56/third_party/blink/public/platform/web_theme_engine.h.gcc-name-clash chromium-79.0.3945.56/third_party/blink/public/platform/web_theme_engine.h
--- chromium-79.0.3945.56/third_party/blink/public/platform/web_theme_engine.h.gcc-name-clash 2019-12-03 12:48:21.225018294 -0500
+++ chromium-79.0.3945.56/third_party/blink/public/platform/web_theme_engine.h 2019-12-03 12:51:54.547217442 -0500
@@ -226,7 +226,7 @@ class WebThemeEngine {
return base::nullopt;
}
- virtual ForcedColors ForcedColors() const { return ForcedColors::kNone; }
+ virtual ForcedColors GetForcedColors() const { return ForcedColors::kNone; }
virtual void SetForcedColors(const blink::ForcedColors forced_colors) {}
};
diff -up chromium-79.0.3945.56/third_party/blink/renderer/core/css/media_values.cc.gcc-name-clash chromium-79.0.3945.56/third_party/blink/renderer/core/css/media_values.cc
--- chromium-79.0.3945.56/third_party/blink/renderer/core/css/media_values.cc.gcc-name-clash 2019-11-26 16:52:32.000000000 -0500
+++ chromium-79.0.3945.56/third_party/blink/renderer/core/css/media_values.cc 2019-12-03 12:48:21.226018272 -0500
@@ -221,7 +221,7 @@ bool MediaValues::CalculatePrefersReduce
ForcedColors MediaValues::CalculateForcedColors() {
if (Platform::Current() && Platform::Current()->ThemeEngine())
- return Platform::Current()->ThemeEngine()->ForcedColors();
+ return Platform::Current()->ThemeEngine()->GetForcedColors();
else
return ForcedColors::kNone;
}
diff -up chromium-79.0.3945.56/third_party/blink/renderer/core/dom/document.cc.gcc-name-clash chromium-79.0.3945.56/third_party/blink/renderer/core/dom/document.cc
--- chromium-79.0.3945.56/third_party/blink/renderer/core/dom/document.cc.gcc-name-clash 2019-11-26 16:52:32.000000000 -0500
+++ chromium-79.0.3945.56/third_party/blink/renderer/core/dom/document.cc 2019-12-03 12:48:21.237018024 -0500
@@ -8624,7 +8624,7 @@ void Document::ColorSchemeChanged() {
bool Document::InForcedColorsMode() const {
return RuntimeEnabledFeatures::ForcedColorsEnabled() && Platform::Current() &&
Platform::Current()->ThemeEngine() &&
- Platform::Current()->ThemeEngine()->ForcedColors() !=
+ Platform::Current()->ThemeEngine()->GetForcedColors() !=
ForcedColors::kNone;
}

@ -0,0 +1,52 @@
diff -up chromium-79.0.3945.56/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc.glibc-clock-nanosleep chromium-79.0.3945.56/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
--- chromium-79.0.3945.56/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc.glibc-clock-nanosleep 2019-12-03 11:36:08.592386976 -0500
+++ chromium-79.0.3945.56/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc 2019-12-03 11:36:34.889947958 -0500
@@ -148,7 +148,7 @@ ResultExpr EvaluateSyscallImpl(int fs_de
return Allow();
#endif
- if (sysno == __NR_clock_gettime) {
+ if (sysno == __NR_clock_gettime || sysno == __NR_clock_nanosleep) {
return RestrictClockID();
}
diff -up chromium-79.0.3945.56/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.h.glibc-clock-nanosleep chromium-79.0.3945.56/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.h
--- chromium-79.0.3945.56/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.h.glibc-clock-nanosleep 2019-12-03 11:36:56.808582039 -0500
+++ chromium-79.0.3945.56/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.h 2019-12-03 11:37:34.944945377 -0500
@@ -86,12 +86,13 @@ SANDBOX_EXPORT bpf_dsl::ResultExpr Restr
// process).
SANDBOX_EXPORT bpf_dsl::ResultExpr RestrictGetrusage();
-// Restrict |clk_id| for clock_getres(), clock_gettime() and clock_settime().
-// We allow accessing only CLOCK_MONOTONIC, CLOCK_PROCESS_CPUTIME_ID,
-// CLOCK_REALTIME, and CLOCK_THREAD_CPUTIME_ID. In particular, this disallows
-// access to arbitrary per-{process,thread} CPU-time clock IDs (such as those
-// returned by {clock,pthread}_getcpuclockid), which can leak information
-// about the state of the host OS.
+// Restrict |clk_id| for clock_getres(), clock_gettime(), clock_settime(), and
+// clock_nanosleep(). We allow accessing only CLOCK_BOOTTIME,
+// CLOCK_MONOTONIC{,_RAW,_COARSE}, CLOCK_PROCESS_CPUTIME_ID,
+// CLOCK_REALTIME{,_COARSE}, and CLOCK_THREAD_CPUTIME_ID. In particular, on
+// non-Android platforms this disallows access to arbitrary per-{process,thread}
+// CPU-time clock IDs (such as those returned by {clock,pthread}_getcpuclockid),
+// which can leak information about the state of the host OS.
SANDBOX_EXPORT bpf_dsl::ResultExpr RestrictClockID();
// Restrict the flags argument to getrandom() to allow only no flags, or
diff -up chromium-79.0.3945.56/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc.glibc-clock-nanosleep chromium-79.0.3945.56/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
--- chromium-79.0.3945.56/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc.glibc-clock-nanosleep 2019-12-03 11:37:53.752639332 -0500
+++ chromium-79.0.3945.56/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc 2019-12-03 11:38:32.802051407 -0500
@@ -35,9 +35,10 @@ bool SyscallSets::IsAllowedGettime(int s
return true;
case __NR_adjtimex: // Privileged.
case __NR_clock_adjtime: // Privileged.
- case __NR_clock_getres: // Could be allowed.
- case __NR_clock_gettime:
- case __NR_clock_nanosleep: // Could be allowed.
+ case __NR_clock_getres: // Allowed only on Android with parameters
+ // filtered by RestrictClockID().
+ case __NR_clock_gettime: // Parameters filtered by RestrictClockID().
+ case __NR_clock_nanosleep: // Parameters filtered by RestrictClockID().
case __NR_clock_settime: // Privileged.
#if defined(__i386__) || \
(defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))

@ -0,0 +1,19 @@
diff -up chromium-79.0.3945.56/chrome/common/chrome_paths.cc.widevine-other-locations chromium-79.0.3945.56/chrome/common/chrome_paths.cc
--- chromium-79.0.3945.56/chrome/common/chrome_paths.cc.widevine-other-locations 2019-12-03 11:52:11.682295001 -0500
+++ chromium-79.0.3945.56/chrome/common/chrome_paths.cc 2019-12-03 12:00:08.654975939 -0500
@@ -381,6 +381,15 @@ bool PathProvider(int key, base::FilePat
#if defined(OS_LINUX) && BUILDFLAG(BUNDLE_WIDEVINE_CDM)
case chrome::DIR_BUNDLED_WIDEVINE_CDM:
+ base::PathService::Get(base::DIR_HOME, &cur);
+ cur = cur.Append(FILE_PATH_LITERAL(".local/lib/libwidevinecdm.so"));
+ if (base::PathExists(cur)) {
+ break;
+ }
+ if (base::PathExists(base::FilePath(FILE_PATH_LITERAL("/opt/google/chrome/libwidevinecdm.so")))) {
+ cur = base::FilePath(FILE_PATH_LITERAL("/opt/google/chrome/libwidevinecdm.so"));
+ break;
+ }
if (!GetComponentDirectory(&cur))
return false;
#if !defined(OS_CHROMEOS)

File diff suppressed because one or more lines are too long

@ -17,4 +17,5 @@ SHA512 (Tinos-Italic.ttf) = d4f4f096110ef98a781a2a0e0d319317e5f84e650fe6f4d4f6b0
SHA512 (Tinos-Regular.ttf) = 58085c5dac6d067d60ba2ab3220c4a0cc1efcf279cadfcfb8746a5e5fa1a6f6daa62750dc2051b3b2d8a51b4d2e9bb0f66594caf2253c0870ed9c7286fa45e8f
SHA512 (Ahem.ttf) = aeb64b10ab9c87860714cb60b4900254b13dc52c51319256a1a3722c882026ab7c616bf628fbc2fe14e38a6003f3a481af60b52a7ed62071d28ddaf428e4e3fd
SHA512 (node-v8.9.1-linux-x64.tar.gz) = a707fd4567041c56e7f9d415e505e3fa650627f31def7fefdd7ec50f9e7066bb33332b67f479e1159d85e1105a7e6d034aad7429f4f3d034c9161170d7e0b844
SHA512 (chromium-78.0.3904.108-clean.tar.xz) = 9bc6309309f745119946788e3efe9291511fef6e476022ac297582648ce7de16cad6a1485e132410059c1266ae6791659b927e18727a9c22f07fc52efcf0c907
SHA512 (chromium-79.0.3945.56-clean.tar.xz) = b044e21cb897338e7287ba8d47e6c9cf9edc819592ed63949d99b3cf8f00d0c3d78f081e8dcbb18add6ca54db42ea22b04f66d217d6dea97146e5e473450b5a7
SHA512 (chromium-79.0.3945.79-clean.tar.xz) = a1f0d11aa354c92a326acc8ba9d5dee392422f800e9a0e5b8ed5d1f56fa25b4837ba52684bcd8a22291b12c822428a245e832ce10f26e7c44cd03264012018c8

@ -1,796 +0,0 @@
diff -up chromium-78.0.3904.70/v8/include/v8.h.implement-tracedreference chromium-78.0.3904.70/v8/include/v8.h
--- chromium-78.0.3904.70/v8/include/v8.h.implement-tracedreference 2019-10-24 08:58:26.185640117 -0400
+++ chromium-78.0.3904.70/v8/include/v8.h 2019-10-24 09:18:33.719546481 -0400
@@ -96,6 +96,10 @@ template <class T>
class Global;
template <class T>
class TracedGlobal;
+template <class T>
+class TracedReference;
+template <class T>
+class TracedReferenceBase;
template<class K, class V, class T> class PersistentValueMap;
template <class K, class V, class T>
class PersistentValueMapBase;
@@ -281,7 +285,8 @@ class Local {
V8_INLINE static Local<T> New(Isolate* isolate, Local<T> that);
V8_INLINE static Local<T> New(Isolate* isolate,
const PersistentBase<T>& that);
- V8_INLINE static Local<T> New(Isolate* isolate, const TracedGlobal<T>& that);
+ V8_INLINE static Local<T> New(Isolate* isolate,
+ const TracedReferenceBase<T>& that);
private:
friend class Utils;
@@ -311,7 +316,13 @@ class Local {
template <class F>
friend class ReturnValue;
template <class F>
+ friend class Traced;
+ template <class F>
friend class TracedGlobal;
+ template <class F>
+ friend class TracedReferenceBase;
+ template <class F>
+ friend class TracedReference;
explicit V8_INLINE Local(T* that) : val_(that) {}
V8_INLINE static Local<T> New(Isolate* isolate, T* that);
@@ -792,22 +803,10 @@ template <class T>
using UniquePersistent = Global<T>;
/**
- * Trait specifying behavior of |TracedGlobal<T>|.
+ * Deprecated. Use |TracedReference<T>| instead.
*/
template <typename T>
-struct TracedGlobalTrait {
- /**
- * Specifies whether |TracedGlobal<T>| should clear its handle on destruction.
- *
- * V8 will *not* clear the embedder-side memory of the handle. The embedder is
- * expected to report all |TracedGlobal<T>| handles through
- * |EmbedderHeapTracer| upon garabge collection.
- *
- * See |EmbedderHeapTracer::IsRootForNonTracingGC| for handling with
- * non-tracing GCs in V8.
- */
- static constexpr bool kRequiresExplicitDestruction = true;
-};
+struct TracedGlobalTrait {};
/**
* A traced handle with copy and move semantics. The handle is to be used
@@ -820,15 +819,131 @@ struct TracedGlobalTrait {
* |v8::EmbedderHeapTracer::IsRootForNonTracingGC()| whether the handle should
* be treated as root or not.
*
- * For destruction semantics see |TracedGlobalTrait<T>|.
+ * Note that the base class cannot be instantiated itself. Choose from
+ * - TracedGlobal
+ * - TracedReference
*/
template <typename T>
-class TracedGlobal {
+class TracedReferenceBase {
public:
/**
+ * Returns true if this TracedReferenceBase is empty, i.e., has not been
+ * assigned an object.
+ */
+ bool IsEmpty() const { return val_ == nullptr; }
+
+ /**
+ * If non-empty, destroy the underlying storage cell. |IsEmpty| will return
+ * true after this call.
+ */
+ V8_INLINE void Reset();
+
+ /**
+ * Construct a Local<T> from this handle.
+ */
+ Local<T> Get(Isolate* isolate) const { return Local<T>::New(isolate, *this); }
+
+ template <class S>
+ V8_INLINE bool operator==(const TracedReferenceBase<S>& that) const {
+ internal::Address* a = reinterpret_cast<internal::Address*>(val_);
+ internal::Address* b = reinterpret_cast<internal::Address*>(that.val_);
+ if (a == nullptr) return b == nullptr;
+ if (b == nullptr) return false;
+ return *a == *b;
+ }
+
+ template <class S>
+ V8_INLINE bool operator==(const Local<S>& that) const {
+ internal::Address* a = reinterpret_cast<internal::Address*>(val_);
+ internal::Address* b = reinterpret_cast<internal::Address*>(that.val_);
+ if (a == nullptr) return b == nullptr;
+ if (b == nullptr) return false;
+ return *a == *b;
+ }
+
+ template <class S>
+ V8_INLINE bool operator!=(const TracedReferenceBase<S>& that) const {
+ return !operator==(that);
+ }
+
+ template <class S>
+ V8_INLINE bool operator!=(const Local<S>& that) const {
+ return !operator==(that);
+ }
+
+ /**
+ * Assigns a wrapper class ID to the handle.
+ */
+ V8_INLINE void SetWrapperClassId(uint16_t class_id);
+
+ /**
+ * Returns the class ID previously assigned to this handle or 0 if no class ID
+ * was previously assigned.
+ */
+ V8_INLINE uint16_t WrapperClassId() const;
+
+ /**
+ * Adds a finalization callback to the handle. The type of this callback is
+ * similar to WeakCallbackType::kInternalFields, i.e., it will pass the
+ * parameter and the first two internal fields of the object.
+ *
+ * The callback is then supposed to reset the handle in the callback. No
+ * further V8 API may be called in this callback. In case additional work
+ * involving V8 needs to be done, a second callback can be scheduled using
+ * WeakCallbackInfo<void>::SetSecondPassCallback.
+ */
+ V8_INLINE void SetFinalizationCallback(
+ void* parameter, WeakCallbackInfo<void>::Callback callback);
+
+ template <class S>
+ V8_INLINE TracedReferenceBase<S>& As() const {
+ return reinterpret_cast<TracedReferenceBase<S>&>(
+ const_cast<TracedReferenceBase<T>&>(*this));
+ }
+
+ private:
+ enum DestructionMode { kWithDestructor, kWithoutDestructor };
+
+ /**
+ * An empty TracedReferenceBase without storage cell.
+ */
+ TracedReferenceBase() = default;
+
+ V8_INLINE static T* New(Isolate* isolate, T* that, void* slot,
+ DestructionMode destruction_mode);
+
+ T* val_ = nullptr;
+
+ friend class EmbedderHeapTracer;
+ template <typename F>
+ friend class Local;
+ friend class Object;
+ template <typename F>
+ friend class TracedGlobal;
+ template <typename F>
+ friend class TracedReference;
+ template <typename F>
+ friend class ReturnValue;
+};
+
+/**
+ * A traced handle with destructor that clears the handle. For more details see
+ * TracedReferenceBase.
+ */
+template <typename T>
+class TracedGlobal : public TracedReferenceBase<T> {
+ public:
+ using TracedReferenceBase<T>::Reset;
+
+ /**
+ * Destructor resetting the handle.
+ */
+ ~TracedGlobal() { this->Reset(); }
+
+ /**
* An empty TracedGlobal without storage cell.
*/
- TracedGlobal() = default;
+ TracedGlobal() : TracedReferenceBase<T>() {}
/**
* Construct a TracedGlobal from a Local.
@@ -837,8 +952,9 @@ class TracedGlobal {
* pointing to the same object.
*/
template <class S>
- TracedGlobal(Isolate* isolate, Local<S> that)
- : val_(New(isolate, *that, &val_)) {
+ TracedGlobal(Isolate* isolate, Local<S> that) : TracedReferenceBase<T>() {
+ this->val_ = this->New(isolate, that.val_, &this->val_,
+ TracedReferenceBase<T>::kWithDestructor);
TYPE_CHECK(T, S);
}
@@ -905,121 +1021,126 @@ class TracedGlobal {
V8_INLINE TracedGlobal& operator=(const TracedGlobal<S>& rhs);
/**
- * Returns true if this TracedGlobal is empty, i.e., has not been assigned an
- * object.
- */
- bool IsEmpty() const { return val_ == nullptr; }
-
- /**
- * If non-empty, destroy the underlying storage cell. |IsEmpty| will return
- * true after this call.
- */
- V8_INLINE void Reset();
-
- /**
* If non-empty, destroy the underlying storage cell and create a new one with
* the contents of other if other is non empty
*/
template <class S>
V8_INLINE void Reset(Isolate* isolate, const Local<S>& other);
- /**
- * Construct a Local<T> from this handle.
- */
- Local<T> Get(Isolate* isolate) const { return Local<T>::New(isolate, *this); }
-
template <class S>
V8_INLINE TracedGlobal<S>& As() const {
return reinterpret_cast<TracedGlobal<S>&>(
const_cast<TracedGlobal<T>&>(*this));
}
+};
- template <class S>
- V8_INLINE bool operator==(const TracedGlobal<S>& that) const {
- internal::Address* a = reinterpret_cast<internal::Address*>(**this);
- internal::Address* b = reinterpret_cast<internal::Address*>(*that);
- if (a == nullptr) return b == nullptr;
- if (b == nullptr) return false;
- return *a == *b;
- }
+/**
+ * A traced handle without destructor that clears the handle. The embedder needs
+ * to ensure that the handle is not accessed once the V8 object has been
+ * reclaimed. This can happen when the handle is not passed through the
+ * EmbedderHeapTracer. For more details see TracedReferenceBase.
+ */
+template <typename T>
+class TracedReference : public TracedReferenceBase<T> {
+ public:
+ using TracedReferenceBase<T>::Reset;
+
+ /**
+ * An empty TracedReference without storage cell.
+ */
+ TracedReference() : TracedReferenceBase<T>() {}
+ /**
+ * Construct a TracedReference from a Local.
+ *
+ * When the Local is non-empty, a new storage cell is created
+ * pointing to the same object.
+ */
template <class S>
- V8_INLINE bool operator==(const Local<S>& that) const {
- internal::Address* a = reinterpret_cast<internal::Address*>(**this);
- internal::Address* b = reinterpret_cast<internal::Address*>(*that);
- if (a == nullptr) return b == nullptr;
- if (b == nullptr) return false;
- return *a == *b;
+ TracedReference(Isolate* isolate, Local<S> that) : TracedReferenceBase<T>() {
+ this->val_ = this->New(isolate, that.val_, &this->val_,
+ TracedReferenceBase<T>::kWithoutDestructor);
+ TYPE_CHECK(T, S);
}
- template <class S>
- V8_INLINE bool operator!=(const TracedGlobal<S>& that) const {
- return !operator==(that);
+ /**
+ * Move constructor initializing TracedReference from an
+ * existing one.
+ */
+ V8_INLINE TracedReference(TracedReference&& other) {
+ // Forward to operator=.
+ *this = std::move(other);
}
- template <class S>
- V8_INLINE bool operator!=(const Local<S>& that) const {
- return !operator==(that);
+ /**
+ * Move constructor initializing TracedReference from an
+ * existing one.
+ */
+ template <typename S>
+ V8_INLINE TracedReference(TracedReference<S>&& other) {
+ // Forward to operator=.
+ *this = std::move(other);
}
/**
- * Assigns a wrapper class ID to the handle.
+ * Copy constructor initializing TracedReference from an
+ * existing one.
*/
- V8_INLINE void SetWrapperClassId(uint16_t class_id);
+ V8_INLINE TracedReference(const TracedReference& other) {
+ // Forward to operator=;
+ *this = other;
+ }
/**
- * Returns the class ID previously assigned to this handle or 0 if no class ID
- * was previously assigned.
+ * Copy constructor initializing TracedReference from an
+ * existing one.
*/
- V8_INLINE uint16_t WrapperClassId() const;
+ template <typename S>
+ V8_INLINE TracedReference(const TracedReference<S>& other) {
+ // Forward to operator=;
+ *this = other;
+ }
/**
- * Adds a finalization callback to the handle. The type of this callback is
- * similar to WeakCallbackType::kInternalFields, i.e., it will pass the
- * parameter and the first two internal fields of the object.
- *
- * The callback is then supposed to reset the handle in the callback. No
- * further V8 API may be called in this callback. In case additional work
- * involving V8 needs to be done, a second callback can be scheduled using
- * WeakCallbackInfo<void>::SetSecondPassCallback.
+ * Move assignment operator initializing TracedGlobal from an existing one.
*/
- V8_INLINE void SetFinalizationCallback(
- void* parameter, WeakCallbackInfo<void>::Callback callback);
+ V8_INLINE TracedReference& operator=(TracedReference&& rhs);
- private:
- // Wrapping type used when clearing on destruction is required.
- struct WrappedForDestruction {
- T* value;
-
- explicit WrappedForDestruction(T* val) : value(val) {}
- ~WrappedForDestruction();
- operator T*() const { return value; }
- T* operator*() const { return value; }
- T* operator->() const { return value; }
- WrappedForDestruction& operator=(const WrappedForDestruction& other) {
- value = other.value;
- return *this;
- }
- WrappedForDestruction& operator=(T* val) {
- value = val;
- return *this;
- }
- };
+ /**
+ * Move assignment operator initializing TracedGlobal from an existing one.
+ */
+ template <class S>
+ V8_INLINE TracedReference& operator=(TracedReference<S>&& rhs);
- V8_INLINE static T* New(Isolate* isolate, T* that, void* slot);
+ /**
+ * Copy assignment operator initializing TracedGlobal from an existing one.
+ *
+ * Note: Prohibited when |other| has a finalization callback set through
+ * |SetFinalizationCallback|.
+ */
+ V8_INLINE TracedReference& operator=(const TracedReference& rhs);
- T* operator*() const { return this->val_; }
+ /**
+ * Copy assignment operator initializing TracedGlobal from an existing one.
+ *
+ * Note: Prohibited when |other| has a finalization callback set through
+ * |SetFinalizationCallback|.
+ */
+ template <class S>
+ V8_INLINE TracedReference& operator=(const TracedReference<S>& rhs);
- typename std::conditional<
- TracedGlobalTrait<TracedGlobal<T>>::kRequiresExplicitDestruction,
- WrappedForDestruction, T*>::type val_{nullptr};
+ /**
+ * If non-empty, destroy the underlying storage cell and create a new one with
+ * the contents of other if other is non empty
+ */
+ template <class S>
+ V8_INLINE void Reset(Isolate* isolate, const Local<S>& other);
- friend class EmbedderHeapTracer;
- template <typename F>
- friend class Local;
- friend class Object;
- template <typename F>
- friend class ReturnValue;
+ template <class S>
+ V8_INLINE TracedReference<S>& As() const {
+ return reinterpret_cast<TracedReference<S>&>(
+ const_cast<TracedReference<T>&>(*this));
+ }
};
/**
@@ -3640,8 +3761,9 @@ class V8_EXPORT Object : public Value {
return object.val_->InternalFieldCount();
}
- /** Same as above, but works for TracedGlobal. */
- V8_INLINE static int InternalFieldCount(const TracedGlobal<Object>& object) {
+ /** Same as above, but works for TracedReferenceBase. */
+ V8_INLINE static int InternalFieldCount(
+ const TracedReferenceBase<Object>& object) {
return object.val_->InternalFieldCount();
}
@@ -3666,7 +3788,7 @@ class V8_EXPORT Object : public Value {
/** Same as above, but works for TracedGlobal. */
V8_INLINE static void* GetAlignedPointerFromInternalField(
- const TracedGlobal<Object>& object, int index) {
+ const TracedReferenceBase<Object>& object, int index) {
return object.val_->GetAlignedPointerFromInternalField(index);
}
@@ -3956,7 +4078,7 @@ class ReturnValue {
template <typename S>
V8_INLINE void Set(const Global<S>& handle);
template <typename S>
- V8_INLINE void Set(const TracedGlobal<S>& handle);
+ V8_INLINE void Set(const TracedReferenceBase<S>& handle);
template <typename S>
V8_INLINE void Set(const Local<S> handle);
// Fast primitive setters
@@ -7376,7 +7498,8 @@ class V8_EXPORT EmbedderHeapTracer {
class V8_EXPORT TracedGlobalHandleVisitor {
public:
virtual ~TracedGlobalHandleVisitor() = default;
- virtual void VisitTracedGlobalHandle(const TracedGlobal<Value>& value) = 0;
+ virtual void VisitTracedGlobalHandle(const TracedGlobal<Value>& handle) {}
+ virtual void VisitTracedReference(const TracedReference<Value>& handle) {}
};
/**
@@ -7414,7 +7537,7 @@ class V8_EXPORT EmbedderHeapTracer {
virtual void RegisterV8References(
const std::vector<std::pair<void*, void*> >& embedder_fields) = 0;
- void RegisterEmbedderReference(const TracedGlobal<v8::Value>& ref);
+ void RegisterEmbedderReference(const TracedReferenceBase<v8::Value>& ref);
/**
* Called at the beginning of a GC cycle.
@@ -7475,32 +7598,35 @@ class V8_EXPORT EmbedderHeapTracer {
*
* If this returns false, then V8 may decide that the object referred to by
* such a handle is reclaimed. In that case:
- * - No action is required if handles are used with destructors.
- * - When run without destructors (by specializing
- * |TracedGlobalTrait::kRequiresExplicitDestruction|) V8 calls
- * |ResetHandleInNonTracingGC|.
- *
- * Note that the |handle| is different from the |TracedGlobal<T>| handle that
- * the embedder holds for retaining the object. The embedder may use
- * |TracedGlobal<T>::WrapperClassId()| to distinguish cases where it wants
- * handles to be treated as roots from not being treated as roots.
+ * - No action is required if handles are used with destructors, i.e., by just
+ * using |TracedGlobal|.
+ * - When run without destructors, i.e., by using
+ * |TracedReference|, V8 calls |ResetHandleInNonTracingGC|.
+ *
+ * Note that the |handle| is different from the handle that the embedder holds
+ * for retaining the object. The embedder may use |WrapperClassId()| to
+ * distinguish cases where it wants handles to be treated as roots from not
+ * being treated as roots.
*/
virtual bool IsRootForNonTracingGC(
- const v8::TracedGlobal<v8::Value>& handle) {
- return true;
- }
+ const v8::TracedReference<v8::Value>& handle);
+ virtual bool IsRootForNonTracingGC(const v8::TracedGlobal<v8::Value>& handle);
/**
* Used in combination with |IsRootForNonTracingGC|. Called by V8 when an
* object that is backed by a handle is reclaimed by a non-tracing garbage
* collection. It is up to the embedder to reset the original handle.
*
- * Note that the |handle| is different from the |TracedGlobal<T>| handle that
- * the embedder holds for retaining the object. It is up to the embedder to
- * find the orignal |TracedGlobal<T>| handle via the object or class id.
+ * Note that the |handle| is different from the handle that the embedder holds
+ * for retaining the object. It is up to the embedder to find the original
+ * handle via the object or class id.
*/
virtual void ResetHandleInNonTracingGC(
- const v8::TracedGlobal<v8::Value>& handle) {}
+ const v8::TracedReference<v8::Value>& handle);
+ V8_DEPRECATE_SOON(
+ "Use TracedReference version when not requiring destructors.",
+ virtual void ResetHandleInNonTracingGC(
+ const v8::TracedGlobal<v8::Value>& handle));
/*
* Called by the embedder to immediately perform a full garbage collection.
@@ -9103,8 +9229,12 @@ class V8_EXPORT V8 {
template <class T>
friend class Maybe;
template <class T>
+ friend class TracedReferenceBase;
+ template <class T>
friend class TracedGlobal;
template <class T>
+ friend class TracedReference;
+ template <class T>
friend class WeakCallbackInfo;
template <class T> friend class Eternal;
template <class T> friend class PersistentBase;
@@ -9975,7 +10105,7 @@ Local<T> Local<T>::New(Isolate* isolate,
}
template <class T>
-Local<T> Local<T>::New(Isolate* isolate, const TracedGlobal<T>& that) {
+Local<T> Local<T>::New(Isolate* isolate, const TracedReferenceBase<T>& that) {
return New(isolate, that.val_);
}
@@ -10156,26 +10286,20 @@ Global<T>& Global<T>::operator=(Global<S
}
template <class T>
-TracedGlobal<T>::WrappedForDestruction::~WrappedForDestruction() {
- if (value == nullptr) return;
- V8::DisposeTracedGlobal(reinterpret_cast<internal::Address*>(value));
- value = nullptr;
-}
-
-template <class T>
-T* TracedGlobal<T>::New(Isolate* isolate, T* that, void* slot) {
+T* TracedReferenceBase<T>::New(Isolate* isolate, T* that, void* slot,
+ DestructionMode destruction_mode) {
if (that == nullptr) return nullptr;
internal::Address* p = reinterpret_cast<internal::Address*>(that);
return reinterpret_cast<T*>(V8::GlobalizeTracedReference(
reinterpret_cast<internal::Isolate*>(isolate), p,
reinterpret_cast<internal::Address*>(slot),
- TracedGlobalTrait<TracedGlobal<T>>::kRequiresExplicitDestruction));
+ destruction_mode == kWithDestructor));
}
template <class T>
-void TracedGlobal<T>::Reset() {
+void TracedReferenceBase<T>::Reset() {
if (IsEmpty()) return;
- V8::DisposeTracedGlobal(reinterpret_cast<internal::Address*>(**this));
+ V8::DisposeTracedGlobal(reinterpret_cast<internal::Address*>(val_));
val_ = nullptr;
}
@@ -10185,7 +10309,8 @@ void TracedGlobal<T>::Reset(Isolate* iso
TYPE_CHECK(T, S);
Reset();
if (other.IsEmpty()) return;
- this->val_ = New(isolate, other.val_, &val_);
+ this->val_ = this->New(isolate, other.val_, &this->val_,
+ TracedReferenceBase<T>::kWithDestructor);
}
template <class T>
@@ -10233,28 +10358,83 @@ TracedGlobal<T>& TracedGlobal<T>::operat
}
template <class T>
-void TracedGlobal<T>::SetWrapperClassId(uint16_t class_id) {
+template <class S>
+void TracedReference<T>::Reset(Isolate* isolate, const Local<S>& other) {
+ TYPE_CHECK(T, S);
+ Reset();
+ if (other.IsEmpty()) return;
+ this->val_ = this->New(isolate, other.val_, &this->val_,
+ TracedReferenceBase<T>::kWithoutDestructor);
+}
+
+template <class T>
+template <class S>
+TracedReference<T>& TracedReference<T>::operator=(TracedReference<S>&& rhs) {
+ TYPE_CHECK(T, S);
+ *this = std::move(rhs.template As<T>());
+ return *this;
+}
+
+template <class T>
+template <class S>
+TracedReference<T>& TracedReference<T>::operator=(
+ const TracedReference<S>& rhs) {
+ TYPE_CHECK(T, S);
+ *this = rhs.template As<T>();
+ return *this;
+}
+
+template <class T>
+TracedReference<T>& TracedReference<T>::operator=(TracedReference&& rhs) {
+ if (this != &rhs) {
+ this->Reset();
+ if (rhs.val_ != nullptr) {
+ this->val_ = rhs.val_;
+ V8::MoveTracedGlobalReference(
+ reinterpret_cast<internal::Address**>(&rhs.val_),
+ reinterpret_cast<internal::Address**>(&this->val_));
+ rhs.val_ = nullptr;
+ }
+ }
+ return *this;
+}
+
+template <class T>
+TracedReference<T>& TracedReference<T>::operator=(const TracedReference& rhs) {
+ if (this != &rhs) {
+ this->Reset();
+ if (rhs.val_ != nullptr) {
+ V8::CopyTracedGlobalReference(
+ reinterpret_cast<const internal::Address* const*>(&rhs.val_),
+ reinterpret_cast<internal::Address**>(&this->val_));
+ }
+ }
+ return *this;
+}
+
+template <class T>
+void TracedReferenceBase<T>::SetWrapperClassId(uint16_t class_id) {
typedef internal::Internals I;
if (IsEmpty()) return;
- internal::Address* obj = reinterpret_cast<internal::Address*>(**this);
+ internal::Address* obj = reinterpret_cast<internal::Address*>(val_);
uint8_t* addr = reinterpret_cast<uint8_t*>(obj) + I::kNodeClassIdOffset;
*reinterpret_cast<uint16_t*>(addr) = class_id;
}
template <class T>
-uint16_t TracedGlobal<T>::WrapperClassId() const {
+uint16_t TracedReferenceBase<T>::WrapperClassId() const {
typedef internal::Internals I;
if (IsEmpty()) return 0;
- internal::Address* obj = reinterpret_cast<internal::Address*>(**this);
+ internal::Address* obj = reinterpret_cast<internal::Address*>(val_);
uint8_t* addr = reinterpret_cast<uint8_t*>(obj) + I::kNodeClassIdOffset;
return *reinterpret_cast<uint16_t*>(addr);
}
template <class T>
-void TracedGlobal<T>::SetFinalizationCallback(
+void TracedReferenceBase<T>::SetFinalizationCallback(
void* parameter, typename WeakCallbackInfo<void>::Callback callback) {
- V8::SetFinalizationCallbackTraced(
- reinterpret_cast<internal::Address*>(**this), parameter, callback);
+ V8::SetFinalizationCallbackTraced(reinterpret_cast<internal::Address*>(val_),
+ parameter, callback);
}
template <typename T>
@@ -10273,12 +10453,12 @@ void ReturnValue<T>::Set(const Global<S>
template <typename T>
template <typename S>
-void ReturnValue<T>::Set(const TracedGlobal<S>& handle) {
+void ReturnValue<T>::Set(const TracedReferenceBase<S>& handle) {
TYPE_CHECK(T, S);
if (V8_UNLIKELY(handle.IsEmpty())) {
*value_ = GetDefaultValue();
} else {
- *value_ = *reinterpret_cast<internal::Address*>(*handle);
+ *value_ = *reinterpret_cast<internal::Address*>(handle.val_);
}
}
diff -up chromium-78.0.3904.70/v8/src/api/api.cc.implement-tracedreference chromium-78.0.3904.70/v8/src/api/api.cc
--- chromium-78.0.3904.70/v8/src/api/api.cc.implement-tracedreference 2019-10-24 09:18:56.712105100 -0400
+++ chromium-78.0.3904.70/v8/src/api/api.cc 2019-10-24 09:20:17.428555637 -0400
@@ -10346,11 +10346,12 @@ void EmbedderHeapTracer::DecreaseAllocat
}
void EmbedderHeapTracer::RegisterEmbedderReference(
- const TracedGlobal<v8::Value>& ref) {
+ const TracedReferenceBase<v8::Value>& ref) {
if (ref.IsEmpty()) return;
i::Heap* const heap = reinterpret_cast<i::Isolate*>(isolate_)->heap();
- heap->RegisterExternallyReferencedObject(reinterpret_cast<i::Address*>(*ref));
+ heap->RegisterExternallyReferencedObject(
+ reinterpret_cast<i::Address*>(ref.val_));
}
void EmbedderHeapTracer::IterateTracedGlobalHandles(
@@ -10360,6 +10361,26 @@ void EmbedderHeapTracer::IterateTracedGl
isolate->global_handles()->IterateTracedNodes(visitor);
}
+bool EmbedderHeapTracer::IsRootForNonTracingGC(
+ const v8::TracedReference<v8::Value>& handle) {
+ return true;
+}
+
+bool EmbedderHeapTracer::IsRootForNonTracingGC(
+ const v8::TracedGlobal<v8::Value>& handle) {
+ return true;
+}
+
+void EmbedderHeapTracer::ResetHandleInNonTracingGC(
+ const v8::TracedReference<v8::Value>& handle) {
+ UNREACHABLE();
+}
+
+void EmbedderHeapTracer::ResetHandleInNonTracingGC(
+ const v8::TracedGlobal<v8::Value>& handle) {
+ UNREACHABLE();
+}
+
namespace internal {
const size_t HandleScopeImplementer::kEnteredContextsOffset =
diff -up chromium-78.0.3904.70/v8/src/handles/global-handles.cc.implement-tracedreference chromium-78.0.3904.70/v8/src/handles/global-handles.cc
--- chromium-78.0.3904.70/v8/src/handles/global-handles.cc.implement-tracedreference 2019-10-24 09:20:39.954123225 -0400
+++ chromium-78.0.3904.70/v8/src/handles/global-handles.cc 2019-10-24 09:21:45.911857072 -0400
@@ -901,8 +901,13 @@ void GlobalHandles::IdentifyWeakUnmodifi
DCHECK(node->is_root());
if (is_unmodified(node->location())) {
v8::Value* value = ToApi<v8::Value>(node->handle());
- node->set_root(tracer->IsRootForNonTracingGC(
- *reinterpret_cast<v8::TracedGlobal<v8::Value>*>(&value)));
+ if (node->has_destructor()) {
+ node->set_root(tracer->IsRootForNonTracingGC(
+ *reinterpret_cast<v8::TracedGlobal<v8::Value>*>(&value)));
+ } else {
+ node->set_root(tracer->IsRootForNonTracingGC(
+ *reinterpret_cast<v8::TracedReference<v8::Value>*>(&value)));
+ }
}
}
}
@@ -990,7 +995,7 @@ void GlobalHandles::IterateYoungWeakUnmo
} else {
v8::Value* value = ToApi<v8::Value>(node->handle());
tracer->ResetHandleInNonTracingGC(
- *reinterpret_cast<v8::TracedGlobal<v8::Value>*>(&value));
+ *reinterpret_cast<v8::TracedReference<v8::Value>*>(&value));
DCHECK(!node->IsInUse());
}
@@ -1271,8 +1276,13 @@ void GlobalHandles::IterateTracedNodes(
for (TracedNode* node : *traced_nodes_) {
if (node->IsInUse()) {
v8::Value* value = ToApi<v8::Value>(node->handle());
- visitor->VisitTracedGlobalHandle(
- *reinterpret_cast<v8::TracedGlobal<v8::Value>*>(&value));
+ if (node->has_destructor()) {
+ visitor->VisitTracedGlobalHandle(
+ *reinterpret_cast<v8::TracedGlobal<v8::Value>*>(&value));
+ } else {
+ visitor->VisitTracedReference(
+ *reinterpret_cast<v8::TracedReference<v8::Value>*>(&value));
+ }
}
}
}
diff -up chromium-78.0.3904.70/v8/src/heap/embedder-tracing.h.implement-tracedreference chromium-78.0.3904.70/v8/src/heap/embedder-tracing.h
--- chromium-78.0.3904.70/v8/src/heap/embedder-tracing.h.implement-tracedreference 2019-10-24 09:22:03.664519559 -0400
+++ chromium-78.0.3904.70/v8/src/heap/embedder-tracing.h 2019-10-24 09:22:45.197729964 -0400
@@ -57,7 +57,12 @@ class V8_EXPORT_PRIVATE LocalEmbedderHea
bool IsRootForNonTracingGC(const v8::TracedGlobal<v8::Value>& handle) {
return !InUse() || remote_tracer_->IsRootForNonTracingGC(handle);
}
- void ResetHandleInNonTracingGC(const v8::TracedGlobal<v8::Value>& handle) {
+
+ bool IsRootForNonTracingGC(const v8::TracedReference<v8::Value>& handle) {
+ return !InUse() || remote_tracer_->IsRootForNonTracingGC(handle);
+ }
+
+ void ResetHandleInNonTracingGC(const v8::TracedReference<v8::Value>& handle) {
// Resetting is only called when IsRootForNonTracingGC returns false which
// can only happen the EmbedderHeapTracer is set on API level.
DCHECK(InUse());
Loading…
Cancel
Save