PKGBUILDs/extra/chromium/0006-GCC-do-not-use-initializer-list-for-NoDestructor-of-.patch
2018-04-18 13:06:23 +00:00

42 lines
1.8 KiB
Diff

From 152c1544d6966e15ca0b976c4e498caf56b79c73 Mon Sep 17 00:00:00 2001
From: Jose Dapena Paz <jose.dapena@lge.com>
Date: Mon, 5 Mar 2018 15:59:12 +0000
Subject: [PATCH 6/7] GCC: do not use initializer list for NoDestructor of a
flat_set.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Compilation in GCC 7.x fails in SupervisedURLFilter, creating a
base::NoDestructor of a flat_set initialized with braces initializer
list syntax, as it fails to retrieve the right constructor (it states
the constructors are ambiguous).
Workaround the problem explicitely declaring flat_set constructor.
Change-Id: Icff5021685a6cbc727d5f4fb5fc6d2ce94fe9921
Reviewed-on: https://chromium-review.googlesource.com/944405
Commit-Queue: José Dapena Paz <jose.dapena@lge.com>
Reviewed-by: Bernhard Bauer <bauerb@chromium.org>
Reviewed-by: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#540828}
---
chrome/browser/supervised_user/supervised_user_url_filter.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/chrome/browser/supervised_user/supervised_user_url_filter.cc b/chrome/browser/supervised_user/supervised_user_url_filter.cc
index 64d6569088d1..a3a81d77f0a3 100644
--- a/chrome/browser/supervised_user/supervised_user_url_filter.cc
+++ b/chrome/browser/supervised_user/supervised_user_url_filter.cc
@@ -368,7 +368,7 @@ SupervisedUserURLFilter::GetFilteringBehaviorForURL(
// Allow navigations to whitelisted origins (currently families.google.com).
static const base::NoDestructor<base::flat_set<GURL>> kWhitelistedOrigins(
- {GURL(kFamiliesUrl).GetOrigin()});
+ base::flat_set<GURL>({GURL(kFamiliesUrl).GetOrigin()}));
if (base::ContainsKey(*kWhitelistedOrigins, effective_url.GetOrigin()))
return ALLOW;
--
2.17.0