Blob Blame History Raw
From 86b1886673c3e75d3a7b8c802b3e9fa6ea945a1e Mon Sep 17 00:00:00 2001
From: Jose Dapena Paz <jdapena@igalia.com>
Date: Fri, 08 Oct 2021 06:32:55 +0000
Subject: [PATCH] libstdc++: no implicit conversion from tuple created with std::tie to an std::pair in restricted cookie manager.

Fix compilation error:
    ../../services/network/restricted_cookie_manager.cc:164:30: error: no match for ‘operator[]’ (operand types are ‘network::CookieAccessesByURLAndSite’ {aka ‘std::map<std::pair<GURL, net::SiteForCookies>, std::unique_ptr<std::set<net::CookieWithAccessResult, network::CookieWithAccessResultComparer> > >’} and ‘std::tuple<const GURL&, const net::SiteForCookies&>’)

There is no conversion from tuple to pair.

Bug: 957519
Change-Id: Idf29c7b21895ae28f45b35d6193ab4ac555945c8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3211752
Reviewed-by: Robbie McElrath <rmcelrath@chromium.org>
Commit-Queue: José Dapena Paz <jdapena@igalia.com>
Cr-Commit-Position: refs/heads/main@{#929597}
---

diff --git a/services/network/restricted_cookie_manager.cc b/services/network/restricted_cookie_manager.cc
index 425426f..c8c10c6 100644
--- a/services/network/restricted_cookie_manager.cc
+++ b/services/network/restricted_cookie_manager.cc
@@ -161,7 +161,7 @@
     const GURL& url,
     const net::SiteForCookies& site_for_cookies) {
   std::unique_ptr<CookieAccesses>& entry =
-      recent_cookie_accesses_[std::tie(url, site_for_cookies)];
+      recent_cookie_accesses_[std::make_pair(url, site_for_cookies)];
   if (!entry) {
     entry = std::make_unique<CookieAccesses>();
   }