summaryrefslogtreecommitdiff
path: root/www-client/chromium/files
diff options
context:
space:
mode:
Diffstat (limited to 'www-client/chromium/files')
-rw-r--r--www-client/chromium/files/chromium-81-icu67.patch162
-rw-r--r--www-client/chromium/files/chromium-81-re2-0.2020.05.01.patch13
-rw-r--r--www-client/chromium/files/chromium-82-gcc-constexpr.patch34
-rw-r--r--www-client/chromium/files/chromium-83-gcc-serviceworker.patch130
-rw-r--r--www-client/chromium/files/chromium-83-icu67.patch170
-rw-r--r--www-client/chromium/files/chromium-84-gcc-include.patch145
-rw-r--r--www-client/chromium/files/chromium-84-gcc-noexcept.patch57
-rw-r--r--www-client/chromium/files/chromium-84-gcc-template.patch146
-rw-r--r--www-client/chromium/files/chromium-84-gcc-unique_ptr.patch29
-rw-r--r--www-client/chromium/files/chromium-84-template.patch80
10 files changed, 932 insertions, 34 deletions
diff --git a/www-client/chromium/files/chromium-81-icu67.patch b/www-client/chromium/files/chromium-81-icu67.patch
new file mode 100644
index 000000000000..745bad28ee2c
--- /dev/null
+++ b/www-client/chromium/files/chromium-81-icu67.patch
@@ -0,0 +1,162 @@
+From 3f8dc4b2e5baf77b463334c769af85b79d8c1463 Mon Sep 17 00:00:00 2001
+From: Frank Tang <ftang@chromium.org>
+Date: Fri, 03 Apr 2020 23:13:54 -0700
+Subject: [PATCH] [intl] Remove soon-to-be removed getAllFieldPositions
+
+Needed to land ICU67.1 soon.
+
+Bug: v8:10393
+Change-Id: I3c7737ca600d6ccfdc46ffaddfb318ce60bc7618
+Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2136489
+Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
+Commit-Queue: Frank Tang <ftang@chromium.org>
+Cr-Commit-Position: refs/heads/master@{#67027}
+---
+
+(backported for chromium-81)
+
+diff --git a/v8/src/objects/js-number-format.cc b/v8/src/objects/js-number-format.cc
+index 92d3e2f..ced408a 100644
+--- a/v8/src/objects/js-number-format.cc
++++ b/v8/src/objects/js-number-format.cc
+@@ -1197,42 +1197,31 @@ MaybeHandle<JSNumberFormat> JSNumberFormat::New(Isolate* isolate,
+ }
+
+ namespace {
+-Maybe<icu::UnicodeString> IcuFormatNumber(
++Maybe<bool> IcuFormatNumber(
+ Isolate* isolate,
+ const icu::number::LocalizedNumberFormatter& number_format,
+- Handle<Object> numeric_obj, icu::FieldPositionIterator* fp_iter) {
++ Handle<Object> numeric_obj, icu::number::FormattedNumber* formatted) {
+ // If it is BigInt, handle it differently.
+ UErrorCode status = U_ZERO_ERROR;
+- icu::number::FormattedNumber formatted;
+ if (numeric_obj->IsBigInt()) {
+ Handle<BigInt> big_int = Handle<BigInt>::cast(numeric_obj);
+ Handle<String> big_int_string;
+ ASSIGN_RETURN_ON_EXCEPTION_VALUE(isolate, big_int_string,
+ BigInt::ToString(isolate, big_int),
+- Nothing<icu::UnicodeString>());
+- formatted = number_format.formatDecimal(
++ Nothing<bool>());
++ *formatted = number_format.formatDecimal(
+ {big_int_string->ToCString().get(), big_int_string->length()}, status);
+ } else {
+ double number = numeric_obj->Number();
+- formatted = number_format.formatDouble(number, status);
++ *formatted = number_format.formatDouble(number, status);
+ }
+ if (U_FAILURE(status)) {
+ // This happen because of icu data trimming trim out "unit".
+ // See https://bugs.chromium.org/p/v8/issues/detail?id=8641
+- THROW_NEW_ERROR_RETURN_VALUE(isolate,
+- NewTypeError(MessageTemplate::kIcuError),
+- Nothing<icu::UnicodeString>());
+- }
+- if (fp_iter) {
+- formatted.getAllFieldPositions(*fp_iter, status);
++ THROW_NEW_ERROR_RETURN_VALUE(
++ isolate, NewTypeError(MessageTemplate::kIcuError), Nothing<bool>());
+ }
+- icu::UnicodeString result = formatted.toString(status);
+- if (U_FAILURE(status)) {
+- THROW_NEW_ERROR_RETURN_VALUE(isolate,
+- NewTypeError(MessageTemplate::kIcuError),
+- Nothing<icu::UnicodeString>());
+- }
+- return Just(result);
++ return Just(true);
+ }
+
+ } // namespace
+@@ -1243,10 +1232,16 @@ MaybeHandle<String> JSNumberFormat::FormatNumeric(
+ Handle<Object> numeric_obj) {
+ DCHECK(numeric_obj->IsNumeric());
+
+- Maybe<icu::UnicodeString> maybe_format =
+- IcuFormatNumber(isolate, number_format, numeric_obj, nullptr);
++ icu::number::FormattedNumber formatted;
++ Maybe<bool> maybe_format =
++ IcuFormatNumber(isolate, number_format, numeric_obj, &formatted);
+ MAYBE_RETURN(maybe_format, Handle<String>());
+- return Intl::ToString(isolate, maybe_format.FromJust());
++ UErrorCode status = U_ZERO_ERROR;
++ icu::UnicodeString result = formatted.toString(status);
++ if (U_FAILURE(status)) {
++ THROW_NEW_ERROR(isolate, NewTypeError(MessageTemplate::kIcuError), String);
++ }
++ return Intl::ToString(isolate, result);
+ }
+
+ namespace {
+@@ -1359,12 +1354,18 @@ std::vector<NumberFormatSpan> FlattenRegionsToParts(
+ }
+
+ namespace {
+-Maybe<int> ConstructParts(Isolate* isolate, const icu::UnicodeString& formatted,
+- icu::FieldPositionIterator* fp_iter,
++Maybe<int> ConstructParts(Isolate* isolate,
++ icu::number::FormattedNumber* formatted,
+ Handle<JSArray> result, int start_index,
+ Handle<Object> numeric_obj, bool style_is_unit) {
++ UErrorCode status = U_ZERO_ERROR;
++ icu::UnicodeString formatted_text = formatted->toString(status);
++ if (U_FAILURE(status)) {
++ THROW_NEW_ERROR_RETURN_VALUE(
++ isolate, NewTypeError(MessageTemplate::kIcuError), Nothing<int>());
++ }
+ DCHECK(numeric_obj->IsNumeric());
+- int32_t length = formatted.length();
++ int32_t length = formatted_text.length();
+ int index = start_index;
+ if (length == 0) return Just(index);
+
+@@ -1373,13 +1374,14 @@ Maybe<int> ConstructParts(Isolate* isolate, const icu::UnicodeString& formatted,
+ // other region covers some part of the formatted string. It's possible
+ // there's another field with exactly the same begin and end as this backdrop,
+ // in which case the backdrop's field_id of -1 will give it lower priority.
+- regions.push_back(NumberFormatSpan(-1, 0, formatted.length()));
++ regions.push_back(NumberFormatSpan(-1, 0, formatted_text.length()));
+
+ {
+- icu::FieldPosition fp;
+- while (fp_iter->next(fp)) {
+- regions.push_back(NumberFormatSpan(fp.getField(), fp.getBeginIndex(),
+- fp.getEndIndex()));
++ icu::ConstrainedFieldPosition cfp;
++ cfp.constrainCategory(UFIELD_CATEGORY_NUMBER);
++ while (formatted->nextPosition(cfp, status)) {
++ regions.push_back(
++ NumberFormatSpan(cfp.getField(), cfp.getStart(), cfp.getLimit()));
+ }
+ }
+
+@@ -1401,7 +1403,7 @@ Maybe<int> ConstructParts(Isolate* isolate, const icu::UnicodeString& formatted,
+ Handle<String> substring;
+ ASSIGN_RETURN_ON_EXCEPTION_VALUE(
+ isolate, substring,
+- Intl::ToString(isolate, formatted, part.begin_pos, part.end_pos),
++ Intl::ToString(isolate, formatted_text, part.begin_pos, part.end_pos),
+ Nothing<int>());
+ Intl::AddElement(isolate, result, index, field_type_string, substring);
+ ++index;
+@@ -1421,14 +1423,14 @@ MaybeHandle<JSArray> JSNumberFormat::FormatToParts(
+ number_format->icu_number_formatter().raw();
+ CHECK_NOT_NULL(fmt);
+
+- icu::FieldPositionIterator fp_iter;
+- Maybe<icu::UnicodeString> maybe_format =
+- IcuFormatNumber(isolate, *fmt, numeric_obj, &fp_iter);
++ icu::number::FormattedNumber formatted;
++ Maybe<bool> maybe_format =
++ IcuFormatNumber(isolate, *fmt, numeric_obj, &formatted);
+ MAYBE_RETURN(maybe_format, Handle<JSArray>());
+
+ Handle<JSArray> result = factory->NewJSArray(0);
+ Maybe<int> maybe_format_to_parts = ConstructParts(
+- isolate, maybe_format.FromJust(), &fp_iter, result, 0, numeric_obj,
++ isolate, &formatted, result, 0, numeric_obj,
+ number_format->style() == JSNumberFormat::Style::UNIT);
+ MAYBE_RETURN(maybe_format_to_parts, Handle<JSArray>());
+
diff --git a/www-client/chromium/files/chromium-81-re2-0.2020.05.01.patch b/www-client/chromium/files/chromium-81-re2-0.2020.05.01.patch
new file mode 100644
index 000000000000..17f539060f3b
--- /dev/null
+++ b/www-client/chromium/files/chromium-81-re2-0.2020.05.01.patch
@@ -0,0 +1,13 @@
+https://chromium.googlesource.com/chromium/src/+/ede390a0b18e4565abf8ac1e1ff717e1d43fc320
+
+--- /components/autofill/core/browser/address_rewriter.cc
++++ /components/autofill/core/browser/address_rewriter.cc
+@@ -57,7 +57,7 @@
+ CompiledRuleVector* compiled_rules) {
+ base::StringPiece data = data_string;
+ re2::RE2::Options options;
+- options.set_utf8(true);
++ options.set_encoding(RE2::Options::EncodingUTF8);
+ options.set_word_boundary(true);
+
+ size_t token_end = 0;
diff --git a/www-client/chromium/files/chromium-82-gcc-constexpr.patch b/www-client/chromium/files/chromium-82-gcc-constexpr.patch
deleted file mode 100644
index 30a83395d087..000000000000
--- a/www-client/chromium/files/chromium-82-gcc-constexpr.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 5812cd9bc2c15a034db24e0d2a43cc923d8a66cc Mon Sep 17 00:00:00 2001
-From: Jose Dapena Paz <jdapena@igalia.com>
-Date: Thu, 20 Feb 2020 13:00:16 +0100
-Subject: [PATCH] GCC: DOMRect constexpr equal operator depends on non constexpr operators
-
-Make accessors of DOMRectReadOnly constexpr so the equal operator can be
-also constexpr.
-
-../../third_party/blink/renderer/core/geometry/dom_rect.h: In function ‘constexpr bool blink::operator==(const blink::DOMRect&, const blink::DOMRect&)’:
-../../third_party/blink/renderer/core/geometry/dom_rect.h:38:15: error: call to non-‘constexpr’ function ‘double blink::DOMRectReadOnly::x() const’
-
-Bug: 819294
-Change-Id: Ic1fed89c5480ce4eedaaf7add2779d000b77cc48
----
-
-diff --git a/third_party/blink/renderer/core/geometry/dom_rect_read_only.h b/third_party/blink/renderer/core/geometry/dom_rect_read_only.h
-index 0c3f84c..71f193e 100644
---- a/third_party/blink/renderer/core/geometry/dom_rect_read_only.h
-+++ b/third_party/blink/renderer/core/geometry/dom_rect_read_only.h
-@@ -31,10 +31,10 @@ class CORE_EXPORT DOMRectReadOnly : public ScriptWrappable {
-
- DOMRectReadOnly(double x, double y, double width, double height);
-
-- double x() const { return x_; }
-- double y() const { return y_; }
-- double width() const { return width_; }
-- double height() const { return height_; }
-+ constexpr double x() const { return x_; }
-+ constexpr double y() const { return y_; }
-+ constexpr double width() const { return width_; }
-+ constexpr double height() const { return height_; }
-
- double top() const { return geometry_util::NanSafeMin(y_, y_ + height_); }
- double right() const { return geometry_util::NanSafeMax(x_, x_ + width_); }
diff --git a/www-client/chromium/files/chromium-83-gcc-serviceworker.patch b/www-client/chromium/files/chromium-83-gcc-serviceworker.patch
new file mode 100644
index 000000000000..a836e7fc533c
--- /dev/null
+++ b/www-client/chromium/files/chromium-83-gcc-serviceworker.patch
@@ -0,0 +1,130 @@
+From 0914a38252f205fc04fa50e858b24fa5f535ab11 Mon Sep 17 00:00:00 2001
+From: Hiroki Nakagawa <nhiroki@chromium.org>
+Date: Wed, 29 Apr 2020 11:46:54 +0900
+Subject: [PATCH] ServiceWorker: Avoid double destruction of ServiceWorkerObjectHost on connection error
+
+This CL avoids the case where ServiceWorkerObjectHost is destroyed twice
+on ServiceWorkerObjectHost::OnConnectionError() when Chromium is built
+with the GCC build toolchain.
+
+> How does the issue happen?
+
+ServiceWorkerObjectHost has a cyclic reference like this:
+
+ServiceWorkerObjectHost
+ --([1] scoped_refptr)--> ServiceWorkerVersion
+ --([2] std::unique_ptr)--> ServiceWorkerProviderHost
+ --([3] std::unique_ptr)--> ServiceWorkerContainerHost
+ --([4] std::unique_ptr)--> ServiceWorkerObjectHost
+
+Note that ServiceWorkerContainerHost manages ServiceWorkerObjectHost in
+map<int64_t version_id, std::unique_ptr<ServiceWorkerObjectHost>>.
+
+When ServiceWorkerObjectHost::OnConnectionError() is called, the
+function removes the reference [4] from the map, and destroys
+ServiceWorkerObjectHost. If the object host has the last reference [1]
+to ServiceWorkerVersion, the destruction also cuts off the references
+[2] and [3], and destroys ServiceWorkerProviderHost and
+ServiceWorkerContainerHost.
+
+This seems to work well on the Chromium's default toolchain, but not
+work on the GCC toolchain. According to the report, destruction of
+ServiceWorkerContainerHost happens while the map owned by the container
+host is erasing the ServiceWorkerObjectHost, and this results in crash
+due to double destruction of the object host.
+
+I don't know the reason why this happens only on the GCC toolchain, but
+I suspect the order of object destruction on std::map::erase() could be
+different depending on the toolchains.
+
+> How does this CL fix this?
+
+The ideal fix is to redesign the ownership model of
+ServiceWorkerVersion, but it's not feasible in the short term.
+
+Instead, this CL avoids destruction of ServiceWorkerObjectHost on
+std::map::erase(). The new code takes the ownership of the object host
+from the map first, and then erases the entry from the map. This
+separates timings to erase the map entry and to destroy the object host,
+so the crash should no longer happen.
+
+Bug: 1056598
+Change-Id: Id30654cb575bc557c42044d6f0c6f1f9bfaed613
+---
+
+diff --git a/content/browser/service_worker/service_worker_container_host.cc b/content/browser/service_worker/service_worker_container_host.cc
+index c631bcd..ff917f8 100644
+--- a/content/browser/service_worker/service_worker_container_host.cc
++++ b/content/browser/service_worker/service_worker_container_host.cc
+@@ -717,6 +717,16 @@
+ int64_t version_id) {
+ DCHECK_CURRENTLY_ON(ServiceWorkerContext::GetCoreThreadId());
+ DCHECK(base::Contains(service_worker_object_hosts_, version_id));
++
++ // ServiceWorkerObjectHost to be deleted may have the last reference to
++ // ServiceWorkerVersion that indirectly owns this ServiceWorkerContainerHost.
++ // If we erase the object host directly from the map, |this| could be deleted
++ // during the map operation and may crash. To avoid the case, we take the
++ // ownership of the object host from the map first, and then erase the entry
++ // from the map. See https://crbug.com/1056598 for details.
++ std::unique_ptr<ServiceWorkerObjectHost> to_be_deleted =
++ std::move(service_worker_object_hosts_[version_id]);
++ DCHECK(to_be_deleted);
+ service_worker_object_hosts_.erase(version_id);
+ }
+
+diff --git a/content/browser/service_worker/service_worker_object_host_unittest.cc b/content/browser/service_worker/service_worker_object_host_unittest.cc
+index 238cb8b..f60c7a2 100644
+--- a/content/browser/service_worker/service_worker_object_host_unittest.cc
++++ b/content/browser/service_worker/service_worker_object_host_unittest.cc
+@@ -200,6 +200,19 @@
+ return registration_info;
+ }
+
++ void CallOnConnectionError(ServiceWorkerContainerHost* container_host,
++ int64_t version_id) {
++ // ServiceWorkerObjectHost has the last reference to the version.
++ ServiceWorkerObjectHost* object_host =
++ GetServiceWorkerObjectHost(container_host, version_id);
++ EXPECT_TRUE(object_host->version_->HasOneRef());
++
++ // Make sure that OnConnectionError induces destruction of the version and
++ // the object host.
++ object_host->receivers_.Clear();
++ object_host->OnConnectionError();
++ }
++
+ BrowserTaskEnvironment task_environment_;
+ std::unique_ptr<EmbeddedWorkerTestHelper> helper_;
+ scoped_refptr<ServiceWorkerRegistration> registration_;
+@@ -409,5 +422,30 @@
+ events[0]->source_info_for_client->client_type);
+ }
+
++// This is a regression test for https://crbug.com/1056598.
++TEST_F(ServiceWorkerObjectHostTest, OnConnectionError) {
++ const GURL scope("https://www.example.com/");
++ const GURL script_url("https://www.example.com/service_worker.js");
++ Initialize(std::make_unique<EmbeddedWorkerTestHelper>(base::FilePath()));
++ SetUpRegistration(scope, script_url);
++
++ // Create the provider host.
++ ASSERT_EQ(blink::ServiceWorkerStatusCode::kOk,
++ StartServiceWorker(version_.get()));
++
++ // Set up the case where the last reference to the version is owned by the
++ // service worker object host.
++ ServiceWorkerContainerHost* container_host =
++ version_->provider_host()->container_host();
++ ServiceWorkerVersion* version_rawptr = version_.get();
++ version_ = nullptr;
++ ASSERT_TRUE(version_rawptr->HasOneRef());
++
++ // Simulate the connection error that induces the object host destruction.
++ // This shouldn't crash.
++ CallOnConnectionError(container_host, version_rawptr->version_id());
++ base::RunLoop().RunUntilIdle();
++}
++
+ } // namespace service_worker_object_host_unittest
+ } // namespace content
diff --git a/www-client/chromium/files/chromium-83-icu67.patch b/www-client/chromium/files/chromium-83-icu67.patch
new file mode 100644
index 000000000000..d45d9e810a4e
--- /dev/null
+++ b/www-client/chromium/files/chromium-83-icu67.patch
@@ -0,0 +1,170 @@
+From 3f8dc4b2e5baf77b463334c769af85b79d8c1463 Mon Sep 17 00:00:00 2001
+From: Frank Tang <ftang@chromium.org>
+Date: Fri, 03 Apr 2020 23:13:54 -0700
+Subject: [PATCH] [intl] Remove soon-to-be removed getAllFieldPositions
+
+Needed to land ICU67.1 soon.
+
+Bug: v8:10393
+Change-Id: I3c7737ca600d6ccfdc46ffaddfb318ce60bc7618
+Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2136489
+Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
+Commit-Queue: Frank Tang <ftang@chromium.org>
+Cr-Commit-Position: refs/heads/master@{#67027}
+---
+
+diff --git a/v8/src/objects/js-number-format.cc b/v8/src/objects/js-number-format.cc
+index ad831c5..bcd4403 100644
+--- a/v8/src/objects/js-number-format.cc
++++ b/v8/src/objects/js-number-format.cc
+@@ -1241,44 +1241,33 @@
+ }
+
+ namespace {
+-Maybe<icu::UnicodeString> IcuFormatNumber(
++Maybe<bool> IcuFormatNumber(
+ Isolate* isolate,
+ const icu::number::LocalizedNumberFormatter& number_format,
+- Handle<Object> numeric_obj, icu::FieldPositionIterator* fp_iter) {
++ Handle<Object> numeric_obj, icu::number::FormattedNumber* formatted) {
+ // If it is BigInt, handle it differently.
+ UErrorCode status = U_ZERO_ERROR;
+- icu::number::FormattedNumber formatted;
+ if (numeric_obj->IsBigInt()) {
+ Handle<BigInt> big_int = Handle<BigInt>::cast(numeric_obj);
+ Handle<String> big_int_string;
+ ASSIGN_RETURN_ON_EXCEPTION_VALUE(isolate, big_int_string,
+ BigInt::ToString(isolate, big_int),
+- Nothing<icu::UnicodeString>());
+- formatted = number_format.formatDecimal(
++ Nothing<bool>());
++ *formatted = number_format.formatDecimal(
+ {big_int_string->ToCString().get(), big_int_string->length()}, status);
+ } else {
+ double number = numeric_obj->IsNaN()
+ ? std::numeric_limits<double>::quiet_NaN()
+ : numeric_obj->Number();
+- formatted = number_format.formatDouble(number, status);
++ *formatted = number_format.formatDouble(number, status);
+ }
+ if (U_FAILURE(status)) {
+ // This happen because of icu data trimming trim out "unit".
+ // See https://bugs.chromium.org/p/v8/issues/detail?id=8641
+- THROW_NEW_ERROR_RETURN_VALUE(isolate,
+- NewTypeError(MessageTemplate::kIcuError),
+- Nothing<icu::UnicodeString>());
++ THROW_NEW_ERROR_RETURN_VALUE(
++ isolate, NewTypeError(MessageTemplate::kIcuError), Nothing<bool>());
+ }
+- if (fp_iter) {
+- formatted.getAllFieldPositions(*fp_iter, status);
+- }
+- icu::UnicodeString result = formatted.toString(status);
+- if (U_FAILURE(status)) {
+- THROW_NEW_ERROR_RETURN_VALUE(isolate,
+- NewTypeError(MessageTemplate::kIcuError),
+- Nothing<icu::UnicodeString>());
+- }
+- return Just(result);
++ return Just(true);
+ }
+
+ } // namespace
+@@ -1289,10 +1278,16 @@
+ Handle<Object> numeric_obj) {
+ DCHECK(numeric_obj->IsNumeric());
+
+- Maybe<icu::UnicodeString> maybe_format =
+- IcuFormatNumber(isolate, number_format, numeric_obj, nullptr);
++ icu::number::FormattedNumber formatted;
++ Maybe<bool> maybe_format =
++ IcuFormatNumber(isolate, number_format, numeric_obj, &formatted);
+ MAYBE_RETURN(maybe_format, Handle<String>());
+- return Intl::ToString(isolate, maybe_format.FromJust());
++ UErrorCode status = U_ZERO_ERROR;
++ icu::UnicodeString result = formatted.toString(status);
++ if (U_FAILURE(status)) {
++ THROW_NEW_ERROR(isolate, NewTypeError(MessageTemplate::kIcuError), String);
++ }
++ return Intl::ToString(isolate, result);
+ }
+
+ namespace {
+@@ -1405,12 +1400,18 @@
+ }
+
+ namespace {
+-Maybe<int> ConstructParts(Isolate* isolate, const icu::UnicodeString& formatted,
+- icu::FieldPositionIterator* fp_iter,
++Maybe<int> ConstructParts(Isolate* isolate,
++ icu::number::FormattedNumber* formatted,
+ Handle<JSArray> result, int start_index,
+ Handle<Object> numeric_obj, bool style_is_unit) {
++ UErrorCode status = U_ZERO_ERROR;
++ icu::UnicodeString formatted_text = formatted->toString(status);
++ if (U_FAILURE(status)) {
++ THROW_NEW_ERROR_RETURN_VALUE(
++ isolate, NewTypeError(MessageTemplate::kIcuError), Nothing<int>());
++ }
+ DCHECK(numeric_obj->IsNumeric());
+- int32_t length = formatted.length();
++ int32_t length = formatted_text.length();
+ int index = start_index;
+ if (length == 0) return Just(index);
+
+@@ -1419,13 +1420,14 @@
+ // other region covers some part of the formatted string. It's possible
+ // there's another field with exactly the same begin and end as this backdrop,
+ // in which case the backdrop's field_id of -1 will give it lower priority.
+- regions.push_back(NumberFormatSpan(-1, 0, formatted.length()));
++ regions.push_back(NumberFormatSpan(-1, 0, formatted_text.length()));
+
+ {
+- icu::FieldPosition fp;
+- while (fp_iter->next(fp)) {
+- regions.push_back(NumberFormatSpan(fp.getField(), fp.getBeginIndex(),
+- fp.getEndIndex()));
++ icu::ConstrainedFieldPosition cfp;
++ cfp.constrainCategory(UFIELD_CATEGORY_NUMBER);
++ while (formatted->nextPosition(cfp, status)) {
++ regions.push_back(
++ NumberFormatSpan(cfp.getField(), cfp.getStart(), cfp.getLimit()));
+ }
+ }
+
+@@ -1447,7 +1449,7 @@
+ Handle<String> substring;
+ ASSIGN_RETURN_ON_EXCEPTION_VALUE(
+ isolate, substring,
+- Intl::ToString(isolate, formatted, part.begin_pos, part.end_pos),
++ Intl::ToString(isolate, formatted_text, part.begin_pos, part.end_pos),
+ Nothing<int>());
+ Intl::AddElement(isolate, result, index, field_type_string, substring);
+ ++index;
+@@ -1467,20 +1469,19 @@
+ number_format->icu_number_formatter().raw();
+ CHECK_NOT_NULL(fmt);
+
+- icu::FieldPositionIterator fp_iter;
+- Maybe<icu::UnicodeString> maybe_format =
+- IcuFormatNumber(isolate, *fmt, numeric_obj, &fp_iter);
++ icu::number::FormattedNumber formatted;
++ Maybe<bool> maybe_format =
++ IcuFormatNumber(isolate, *fmt, numeric_obj, &formatted);
+ MAYBE_RETURN(maybe_format, Handle<JSArray>());
+-
+ UErrorCode status = U_ZERO_ERROR;
++
+ bool style_is_unit =
+ Style::UNIT == StyleFromSkeleton(fmt->toSkeleton(status));
+ CHECK(U_SUCCESS(status));
+
+ Handle<JSArray> result = factory->NewJSArray(0);
+- Maybe<int> maybe_format_to_parts =
+- ConstructParts(isolate, maybe_format.FromJust(), &fp_iter, result, 0,
+- numeric_obj, style_is_unit);
++ Maybe<int> maybe_format_to_parts = ConstructParts(
++ isolate, &formatted, result, 0, numeric_obj, style_is_unit);
+ MAYBE_RETURN(maybe_format_to_parts, Handle<JSArray>());
+
+ return result;
diff --git a/www-client/chromium/files/chromium-84-gcc-include.patch b/www-client/chromium/files/chromium-84-gcc-include.patch
new file mode 100644
index 000000000000..1c6d96cb9c4f
--- /dev/null
+++ b/www-client/chromium/files/chromium-84-gcc-include.patch
@@ -0,0 +1,145 @@
+From 60e856c553f4532c2035b087dbdbdde42dbb5f09 Mon Sep 17 00:00:00 2001
+From: Stephan Hartmann <stha09@googlemail.com>
+Date: Sat, 9 May 2020 11:33:04 +0000
+Subject: [PATCH] IWYU: memcpy is defined in cstring
+
+---
+ cc/base/list_container_helper.cc | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/cc/base/list_container_helper.cc b/cc/base/list_container_helper.cc
+index afd386e..7b594b4 100644
+--- a/cc/base/list_container_helper.cc
++++ b/cc/base/list_container_helper.cc
+@@ -7,6 +7,7 @@
+ #include <stddef.h>
+
+ #include <algorithm>
++#include <cstring>
+ #include <vector>
+
+ #include "base/check_op.h"
+--
+2.26.2
+
+From 5e20370e4bc1fd3beaa9af62fe27aaedb903bacf Mon Sep 17 00:00:00 2001
+From: Piotr Tworek <ptworek@vewd.com>
+Date: Tue, 05 May 2020 06:06:35 +0000
+Subject: [PATCH] Add missing bitset include in web_touch_event.cc.
+
+The code uses std::bitset, but does not include header declaring it. It
+works when using bundled copy of libcxx, but fails when using system
+libstdc++ on Linux.
+
+Change-Id: I8a88078e110b27623b3cdea38c94012ba4050ee7
+Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2179123
+Reviewed-by: Jeremy Roman <jbroman@chromium.org>
+Commit-Queue: Piotr Tworek <ptworek@vewd.com>
+Cr-Commit-Position: refs/heads/master@{#765415}
+---
+
+diff --git a/third_party/blink/common/input/web_touch_event.cc b/third_party/blink/common/input/web_touch_event.cc
+index 7ef37fec..aa054f9 100644
+--- a/third_party/blink/common/input/web_touch_event.cc
++++ b/third_party/blink/common/input/web_touch_event.cc
+@@ -2,6 +2,8 @@
+ // Use of this source code is governed by a BSD-style license that can be
+ // found in the LICENSE file.
+
++#include <bitset>
++
+ #include "third_party/blink/public/common/input/web_touch_event.h"
+
+ namespace blink {
+
+From effd506ce070d58e731bd6086681b9cded8573ed Mon Sep 17 00:00:00 2001
+From: Stephan Hartmann <stha09@googlemail.com>
+Date: Sun, 10 May 2020 07:24:38 +0000
+Subject: [PATCH] IWYU: add a bunch of missing cstring includes
+
+---
+ .../crashpad/snapshot/minidump/minidump_context_converter.cc | 2 ++
+ third_party/crashpad/crashpad/util/linux/ptrace_client.cc | 1 +
+ .../crashpad/crashpad/util/net/http_multipart_builder.cc | 1 +
+ third_party/crashpad/crashpad/util/net/http_transport_socket.cc | 2 ++
+ third_party/crashpad/crashpad/util/process/process_memory.cc | 1 +
+ third_party/crashpad/crashpad/util/stream/log_output_stream.cc | 1 +
+ 6 files changed, 8 insertions(+)
+
+diff --git a/third_party/crashpad/crashpad/snapshot/minidump/minidump_context_converter.cc b/third_party/crashpad/crashpad/snapshot/minidump/minidump_context_converter.cc
+index 0c840deac..1d163b42f 100644
+--- a/third_party/crashpad/crashpad/snapshot/minidump/minidump_context_converter.cc
++++ b/third_party/crashpad/crashpad/snapshot/minidump/minidump_context_converter.cc
+@@ -14,6 +14,8 @@
+
+ #include "snapshot/minidump/minidump_context_converter.h"
+
++#include <cstring>
++
+ #include "base/stl_util.h"
+ #include "minidump/minidump_context.h"
+
+diff --git a/third_party/crashpad/crashpad/util/linux/ptrace_client.cc b/third_party/crashpad/crashpad/util/linux/ptrace_client.cc
+index f097ad985..e91ce2eca 100644
+--- a/third_party/crashpad/crashpad/util/linux/ptrace_client.cc
++++ b/third_party/crashpad/crashpad/util/linux/ptrace_client.cc
+@@ -17,6 +17,7 @@
+ #include <errno.h>
+ #include <stdio.h>
+
++#include <cstring>
+ #include <string>
+
+ #include "base/logging.h"
+diff --git a/third_party/crashpad/crashpad/util/net/http_multipart_builder.cc b/third_party/crashpad/crashpad/util/net/http_multipart_builder.cc
+index 267960b27..8ed7edc2f 100644
+--- a/third_party/crashpad/crashpad/util/net/http_multipart_builder.cc
++++ b/third_party/crashpad/crashpad/util/net/http_multipart_builder.cc
+@@ -16,6 +16,7 @@
+
+ #include <sys/types.h>
+
++#include <cstring>
+ #include <utility>
+ #include <vector>
+
+diff --git a/third_party/crashpad/crashpad/util/net/http_transport_socket.cc b/third_party/crashpad/crashpad/util/net/http_transport_socket.cc
+index 4dd01b6e7..60cd60c17 100644
+--- a/third_party/crashpad/crashpad/util/net/http_transport_socket.cc
++++ b/third_party/crashpad/crashpad/util/net/http_transport_socket.cc
+@@ -19,6 +19,8 @@
+ #include <poll.h>
+ #include <sys/socket.h>
+
++#include <cstring>
++
+ #include "base/logging.h"
+ #include "base/macros.h"
+ #include "base/numerics/safe_conversions.h"
+diff --git a/third_party/crashpad/crashpad/util/process/process_memory.cc b/third_party/crashpad/crashpad/util/process/process_memory.cc
+index ab87b940f..e02bcea81 100644
+--- a/third_party/crashpad/crashpad/util/process/process_memory.cc
++++ b/third_party/crashpad/crashpad/util/process/process_memory.cc
+@@ -15,6 +15,7 @@
+ #include "util/process/process_memory.h"
+
+ #include <algorithm>
++#include <cstring>
+
+ #include "base/logging.h"
+ #include "util/numeric/safe_assignment.h"
+diff --git a/third_party/crashpad/crashpad/util/stream/log_output_stream.cc b/third_party/crashpad/crashpad/util/stream/log_output_stream.cc
+index 03c0a5a02..45d823aa4 100644
+--- a/third_party/crashpad/crashpad/util/stream/log_output_stream.cc
++++ b/third_party/crashpad/crashpad/util/stream/log_output_stream.cc
+@@ -15,6 +15,7 @@
+ #include "util/stream/log_output_stream.h"
+
+ #include <algorithm>
++#include <cstring>
+
+ #include "base/logging.h"
+
+--
+2.26.2
+
diff --git a/www-client/chromium/files/chromium-84-gcc-noexcept.patch b/www-client/chromium/files/chromium-84-gcc-noexcept.patch
new file mode 100644
index 000000000000..e3918ca28f58
--- /dev/null
+++ b/www-client/chromium/files/chromium-84-gcc-noexcept.patch
@@ -0,0 +1,57 @@
+diff --git a/third_party/blink/public/platform/cross_variant_mojo_util.h b/third_party/blink/public/platform/cross_variant_mojo_util.h
+index dee0b95..0c83580 100644
+--- a/third_party/blink/public/platform/cross_variant_mojo_util.h
++++ b/third_party/blink/public/platform/cross_variant_mojo_util.h
+@@ -124,7 +124,7 @@ class CrossVariantMojoAssociatedReceiver {
+ ~CrossVariantMojoAssociatedReceiver() = default;
+
+ CrossVariantMojoAssociatedReceiver(
+- CrossVariantMojoAssociatedReceiver&&) noexcept = default;
++ CrossVariantMojoAssociatedReceiver&&) = default;
+ CrossVariantMojoAssociatedReceiver& operator=(
+ CrossVariantMojoAssociatedReceiver&&) noexcept = default;
+
+@@ -155,7 +155,7 @@ class CrossVariantMojoAssociatedRemote {
+ ~CrossVariantMojoAssociatedRemote() = default;
+
+ CrossVariantMojoAssociatedRemote(
+- CrossVariantMojoAssociatedRemote&&) noexcept = default;
++ CrossVariantMojoAssociatedRemote&&) = default;
+ CrossVariantMojoAssociatedRemote& operator=(
+ CrossVariantMojoAssociatedRemote&&) noexcept = default;
+
+diff --git a/base/containers/flat_map.h b/base/containers/flat_map.h
+index ed82c5d..1af6b40 100644
+--- a/base/containers/flat_map.h
++++ b/base/containers/flat_map.h
+@@ -202,7 +202,7 @@ class flat_map : public ::base::internal::flat_tree<
+ ~flat_map() = default;
+
+ flat_map& operator=(const flat_map&) = default;
+- flat_map& operator=(flat_map&&) = default;
++ flat_map& operator=(flat_map&&) noexcept = default;
+ // Takes the first if there are duplicates in the initializer list.
+ flat_map& operator=(std::initializer_list<value_type> ilist);
+
+diff --git a/base/containers/flat_tree.h b/base/containers/flat_tree.h
+index 9412ff6..8ecc1fa 100644
+--- a/base/containers/flat_tree.h
++++ b/base/containers/flat_tree.h
+@@ -125,7 +125,7 @@ class flat_tree {
+ // Assume that move assignment invalidates iterators and references.
+
+ flat_tree& operator=(const flat_tree&);
+- flat_tree& operator=(flat_tree&&);
++ flat_tree& operator=(flat_tree&&) noexcept;
+ // Takes the first if there are duplicates in the initializer list.
+ flat_tree& operator=(std::initializer_list<value_type> ilist);
+
+@@ -519,7 +519,7 @@ auto flat_tree<Key, Value, GetKeyFromValue, KeyCompare>::operator=(
+
+ template <class Key, class Value, class GetKeyFromValue, class KeyCompare>
+ auto flat_tree<Key, Value, GetKeyFromValue, KeyCompare>::operator=(flat_tree &&)
+- -> flat_tree& = default;
++ noexcept -> flat_tree& = default;
+
+ template <class Key, class Value, class GetKeyFromValue, class KeyCompare>
+ auto flat_tree<Key, Value, GetKeyFromValue, KeyCompare>::operator=(
diff --git a/www-client/chromium/files/chromium-84-gcc-template.patch b/www-client/chromium/files/chromium-84-gcc-template.patch
new file mode 100644
index 000000000000..15875109d755
--- /dev/null
+++ b/www-client/chromium/files/chromium-84-gcc-template.patch
@@ -0,0 +1,146 @@
+From 2cd1ba11c364fc0f2f06c5fa3c15ff75ee860966 Mon Sep 17 00:00:00 2001
+From: Stephan Hartmann <stha09@googlemail.com>
+Date: Sat, 2 May 2020 16:42:38 +0000
+Subject: [PATCH] GCC: fix template specialization in WTF::VectorBuffer
+
+GCC complains that explicit specialization in non-namespace scope
+is happening for InitInlinedBuffer. However, specialization is
+not really necessary here with templates and can be moved
+into InitInlinedBuffer method without changing generated code.
+---
+ third_party/blink/renderer/platform/wtf/vector.h | 9 ++++-----
+ 1 file changed, 4 insertions(+), 5 deletions(-)
+
+diff --git a/third_party/blink/renderer/platform/wtf/vector.h b/third_party/blink/renderer/platform/wtf/vector.h
+index 81a4e7b..30ffa89 100644
+--- a/third_party/blink/renderer/platform/wtf/vector.h
++++ b/third_party/blink/renderer/platform/wtf/vector.h
+@@ -950,11 +950,10 @@ class VectorBuffer : protected VectorBufferBase<T, Allocator> {
+ return unsafe_reinterpret_cast_ptr<const T*>(inline_buffer_);
+ }
+
+- template <bool = Allocator::kIsGarbageCollected>
+- void InitInlinedBuffer() {}
+- template <>
+- void InitInlinedBuffer<true>() {
+- memset(&inline_buffer_, 0, kInlineBufferSize);
++ void InitInlinedBuffer() {
++ if ( Allocator::kIsGarbageCollected ) {
++ memset(&inline_buffer_, 0, kInlineBufferSize);
++ }
+ }
+
+ alignas(T) char inline_buffer_[kInlineBufferSize];
+--
+2.26.2
+From 421aca221966c7d736c4bc5f268a730199f02fb9 Mon Sep 17 00:00:00 2001
+From: Stephan Hartmann <stha09@googlemail.com>
+Date: Sat, 9 May 2020 14:59:07 +0000
+Subject: [PATCH] GCC: fix template specialization in TraceInCollectionTrait
+
+GCC complains that explicit specialization in non-namespace scope
+is happening for TraceImpl. Move TraceImpl implementations into
+different nested classes and select implementation using
+std::conditional.
+---
+ .../heap_hash_table_backing.h | 80 ++++++++++---------
+ 1 file changed, 41 insertions(+), 39 deletions(-)
+
+diff --git a/third_party/blink/renderer/platform/heap/collection_support/heap_hash_table_backing.h b/third_party/blink/renderer/platform/heap/collection_support/heap_hash_table_backing.h
+index a6c73f5..068ab8e 100644
+--- a/third_party/blink/renderer/platform/heap/collection_support/heap_hash_table_backing.h
++++ b/third_party/blink/renderer/platform/heap/collection_support/heap_hash_table_backing.h
+@@ -241,50 +241,52 @@ struct TraceInCollectionTrait<kNoWeakHandling,
+
+ static void Trace(blink::Visitor* visitor,
+ const KeyValuePair<Key, Value>& self) {
+- TraceImpl(visitor, self);
++ TraceImpl::TraceImpl(visitor, self);
+ }
+
+ private:
+- template <bool = EphemeronHelper::is_ephemeron>
+- static void TraceImpl(blink::Visitor* visitor,
+- const KeyValuePair<Key, Value>& self);
+-
+- // Strongification of ephemerons, i.e., Weak/Strong and Strong/Weak.
+- template <>
+- static void TraceImpl<true>(blink::Visitor* visitor,
+- const KeyValuePair<Key, Value>& self) {
++ struct TraceImplEphemerons {
+ // Strongification of ephemerons, i.e., Weak/Strong and Strong/Weak.
+- // The helper ensures that helper.key always refers to the weak part and
+- // helper.value always refers to the dependent part.
+- // We distinguish ephemeron from Weak/Weak and Strong/Strong to allow users
+- // to override visitation behavior. An example is creating a heap snapshot,
+- // where it is useful to annotate values as being kept alive from keys
+- // rather than the table.
+- EphemeronHelper helper(&self.key, &self.value);
+- // Strongify the weak part.
+- blink::TraceCollectionIfEnabled<
+- kNoWeakHandling, typename EphemeronHelper::KeyType,
+- typename EphemeronHelper::KeyTraits>::Trace(visitor, helper.key);
+- // Strongify the dependent part.
+- visitor->TraceEphemeron(
+- *helper.key, helper.value,
+- blink::TraceCollectionIfEnabled<
+- kNoWeakHandling, typename EphemeronHelper::ValueType,
+- typename EphemeronHelper::ValueTraits>::Trace);
+- }
++ static void TraceImpl(blink::Visitor* visitor,
++ const KeyValuePair<Key, Value>& self) {
++ // Strongification of ephemerons, i.e., Weak/Strong and Strong/Weak.
++ // The helper ensures that helper.key always refers to the weak part and
++ // helper.value always refers to the dependent part.
++ // We distinguish ephemeron from Weak/Weak and Strong/Strong to allow users
++ // to override visitation behavior. An example is creating a heap snapshot,
++ // where it is useful to annotate values as being kept alive from keys
++ // rather than the table.
++ EphemeronHelper helper(&self.key, &self.value);
++ // Strongify the weak part.
++ blink::TraceCollectionIfEnabled<
++ kNoWeakHandling, typename EphemeronHelper::KeyType,
++ typename EphemeronHelper::KeyTraits>::Trace(visitor, helper.key);
++ // Strongify the dependent part.
++ visitor->TraceEphemeron(
++ *helper.key, helper.value,
++ blink::TraceCollectionIfEnabled<
++ kNoWeakHandling, typename EphemeronHelper::ValueType,
++ typename EphemeronHelper::ValueTraits>::Trace);
++ }
++ };
+
+- template <>
+- static void TraceImpl<false>(blink::Visitor* visitor,
+- const KeyValuePair<Key, Value>& self) {
+- // Strongification of non-ephemeron KVP, i.e., Strong/Strong or Weak/Weak.
+- // Order does not matter here.
+- blink::TraceCollectionIfEnabled<
+- kNoWeakHandling, Key, typename Traits::KeyTraits>::Trace(visitor,
+- &self.key);
+- blink::TraceCollectionIfEnabled<
+- kNoWeakHandling, Value,
+- typename Traits::ValueTraits>::Trace(visitor, &self.value);
+- }
++ struct TraceImplDefault {
++ static void TraceImpl(blink::Visitor* visitor,
++ const KeyValuePair<Key, Value>& self) {
++ // Strongification of non-ephemeron KVP, i.e., Strong/Strong or Weak/Weak.
++ // Order does not matter here.
++ blink::TraceCollectionIfEnabled<
++ kNoWeakHandling, Key, typename Traits::KeyTraits>::Trace(visitor,
++ &self.key);
++ blink::TraceCollectionIfEnabled<
++ kNoWeakHandling, Value,
++ typename Traits::ValueTraits>::Trace(visitor, &self.value);
++ }
++ };
++
++ using TraceImpl = typename std::conditional<EphemeronHelper::is_ephemeron,
++ TraceImplEphemerons,
++ TraceImplDefault>::type;
+ };
+
+ template <typename Key, typename Value, typename Traits>
+--
+2.26.2
diff --git a/www-client/chromium/files/chromium-84-gcc-unique_ptr.patch b/www-client/chromium/files/chromium-84-gcc-unique_ptr.patch
new file mode 100644
index 000000000000..4fa443bb66ad
--- /dev/null
+++ b/www-client/chromium/files/chromium-84-gcc-unique_ptr.patch
@@ -0,0 +1,29 @@
+From 9b749dc5c7fdb0f4b1bd0df5901beb6af1b81ff1 Mon Sep 17 00:00:00 2001
+From: Stephan Hartmann <stha09@googlemail.com>
+Date: Sat, 9 May 2020 16:46:07 +0000
+Subject: [PATCH] GCC: fix DCHECK_EQ in NGInlineNode::SegmentScriptRuns
+
+data->segments is a std::unique_ptr, but underlying CheckOpValueStr
+has no overloaded function for std::unique_ptr.
+However, overloaded function with const void* exists and can be
+used with std::unique_ptr::get().
+---
+ .../blink/renderer/core/layout/ng/inline/ng_inline_node.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/third_party/blink/renderer/core/layout/ng/inline/ng_inline_node.cc b/third_party/blink/renderer/core/layout/ng/inline/ng_inline_node.cc
+index 55ca9e3..ee691df 100644
+--- a/third_party/blink/renderer/core/layout/ng/inline/ng_inline_node.cc
++++ b/third_party/blink/renderer/core/layout/ng/inline/ng_inline_node.cc
+@@ -891,7 +891,7 @@ void NGInlineNode::SegmentText(NGInlineNodeData* data) {
+
+ // Segment NGInlineItem by script, Emoji, and orientation using RunSegmenter.
+ void NGInlineNode::SegmentScriptRuns(NGInlineNodeData* data) {
+- DCHECK_EQ(data->segments, nullptr);
++ DCHECK_EQ(data->segments.get(), nullptr);
+
+ String& text_content = data->text_content;
+ if (text_content.IsEmpty()) {
+--
+2.26.2
+
diff --git a/www-client/chromium/files/chromium-84-template.patch b/www-client/chromium/files/chromium-84-template.patch
new file mode 100644
index 000000000000..73d277560b19
--- /dev/null
+++ b/www-client/chromium/files/chromium-84-template.patch
@@ -0,0 +1,80 @@
+From 7ea92bc4f0cbdf68bf8e04b18f560aece9666e9e Mon Sep 17 00:00:00 2001
+From: Hans Wennborg <hans@chromium.org>
+Date: Tue, 05 May 2020 18:23:40 +0000
+Subject: [PATCH] De-templatize ContentSettingsAgentImpl::GetContentSettingFromRules
+
+The template definition was not in the header, so callers from outside
+content_settings_agent_impl.cc could not instantiate the template,
+leading to link errors in some configs (see bug).
+
+Instead, provide overloads for the two types of URL parameter, and
+use a template internally (in the .cc file) as it was before
+crrev.com/759360.
+
+Bug: 1077605
+Change-Id: I5c6f1e60ab694d60f7c20ce77a435a1b03e32e08
+Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2181364
+Commit-Queue: Hans Wennborg <hans@chromium.org>
+Commit-Queue: Nico Weber <thakis@chromium.org>
+Reviewed-by: Clark DuVall <cduvall@chromium.org>
+Reviewed-by: Nico Weber <thakis@chromium.org>
+Reviewed-by: Balazs Engedy <engedy@chromium.org>
+Auto-Submit: Hans Wennborg <hans@chromium.org>
+Cr-Commit-Position: refs/heads/master@{#765660}
+---
+
+diff --git a/components/content_settings/renderer/content_settings_agent_impl.cc b/components/content_settings/renderer/content_settings_agent_impl.cc
+index ffb225a..4e24dc5 100644
+--- a/components/content_settings/renderer/content_settings_agent_impl.cc
++++ b/components/content_settings/renderer/content_settings_agent_impl.cc
+@@ -169,7 +169,7 @@
+ }
+
+ template <typename URL>
+-ContentSetting ContentSettingsAgentImpl::GetContentSettingFromRules(
++ContentSetting GetContentSettingFromRulesImpl(
+ const ContentSettingsForOneType& rules,
+ const WebFrame* frame,
+ const URL& secondary_url) {
+@@ -192,6 +192,20 @@
+ return CONTENT_SETTING_DEFAULT;
+ }
+
++ContentSetting ContentSettingsAgentImpl::GetContentSettingFromRules(
++ const ContentSettingsForOneType& rules,
++ const WebFrame* frame,
++ const GURL& secondary_url) {
++ return GetContentSettingFromRulesImpl(rules, frame, secondary_url);
++}
++
++ContentSetting ContentSettingsAgentImpl::GetContentSettingFromRules(
++ const ContentSettingsForOneType& rules,
++ const WebFrame* frame,
++ const blink::WebURL& secondary_url) {
++ return GetContentSettingFromRulesImpl(rules, frame, secondary_url);
++}
++
+ void ContentSettingsAgentImpl::BindContentSettingsManager(
+ mojo::Remote<mojom::ContentSettingsManager>* manager) {
+ DCHECK(!*manager);
+diff --git a/components/content_settings/renderer/content_settings_agent_impl.h b/components/content_settings/renderer/content_settings_agent_impl.h
+index b14acfe..2522fdb 100644
+--- a/components/content_settings/renderer/content_settings_agent_impl.h
++++ b/components/content_settings/renderer/content_settings_agent_impl.h
+@@ -116,11 +116,14 @@
+
+ // Allow passing both WebURL and GURL here, so that we can early return
+ // without allocating a new backing string if only the default rule matches.
+- template <typename URL>
+ ContentSetting GetContentSettingFromRules(
+ const ContentSettingsForOneType& rules,
+ const blink::WebFrame* frame,
+- const URL& secondary_url);
++ const GURL& secondary_url);
++ ContentSetting GetContentSettingFromRules(
++ const ContentSettingsForOneType& rules,
++ const blink::WebFrame* frame,
++ const blink::WebURL& secondary_url);
+
+ protected:
+ // Allow this to be overridden by tests.