summaryrefslogblamecommitdiff
path: root/www-client/chromium/files/chromium-76-gcc-ambiguous-nodestructor.patch
blob: 587abf31bb7cdc5bff79df8a00e451c1179bc98f (plain) (tree)






































                                                                                                            
From 52b5ceac95b67491b1c71f0ef9a32b778bbbaa2e Mon Sep 17 00:00:00 2001
From: Jose Dapena Paz <jose.dapena@lge.com>
Date: Wed, 05 Jun 2019 19:46:55 +0000
Subject: [PATCH] GCC: avoid ambiguous NoDestructor creation in GetNeverSniffedMimeTypes.

Use brace-list notation to wrap the already existing brace-list for
initializing the flat-set. This resolves an ambiguous instantiation
in GCC.

Bug: 819294
Change-Id: I89ddf12522d62a5140a8c2c41dc98e30ec7a0e78
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1645774
Reviewed-by: Matt Menke <mmenke@chromium.org>
Commit-Queue: José Dapena Paz <jose.dapena@lge.com>
Cr-Commit-Position: refs/heads/master@{#666401}
---

diff --git a/services/network/cross_origin_read_blocking.cc b/services/network/cross_origin_read_blocking.cc
index 30999c0..60a03f6 100644
--- a/services/network/cross_origin_read_blocking.cc
+++ b/services/network/cross_origin_read_blocking.cc
@@ -211,7 +211,7 @@
 // confirmation sniffing because images, scripts, etc. are frequently
 // mislabelled by http servers as HTML/JSON/XML).
 base::flat_set<std::string>& GetNeverSniffedMimeTypes() {
-  static base::NoDestructor<base::flat_set<std::string>> s_types({
+  static base::NoDestructor<base::flat_set<std::string>> s_types{{
       // The list below has been populated based on most commonly used content
       // types according to HTTP Archive - see:
       // https://github.com/whatwg/fetch/issues/860#issuecomment-457330454
@@ -224,7 +224,7 @@
       "application/x-www-form-urlencoded",
       "application/zip",
       "text/event-stream",
-  });
+  }};
 
   // All items need to be lower-case, to support case-insensitive comparisons
   // later.