commit | f83d193ebe48911e5c178d3e0c55e619c68fac27 | [log] [tgz] |
---|---|---|
author | Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com> | Thu Apr 19 14:00:58 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Thu Apr 19 14:00:58 2018 |
tree | ff204d59b067ddfa2968fd4cb847ccaed73cb33d | |
parent | 98f459421d97b8abea034d877cbc7c82ae3bec1e [diff] |
[Password Manager] Explicitly create a base::flat_set with an initializer list This fixes the GCC build after 4b06d0ab ("[Password Manager] Autofill forms with prefilled values matching list of known placeholders"). Due to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84849, creating a base::NoDestructor with an initializer list causes GCC to fail to resolve the right constructor and forward the initializer list to base::flat_set: ../../components/autofill/content/renderer/password_autofill_agent.cc: In function ‘bool autofill::{anonymous}::PossiblePrefilledUsernameValue(const string&)’: ../../components/autofill/content/renderer/password_autofill_agent.cc:132:59: error: call of overloaded ‘NoDestructor(<brace-enclosed initializer list>)’ is ambiguous "邮箱/手机/展位号"}); ^ In file included from ../../components/autofill/content/renderer/password_autofill_agent.cc:21:0: ../../base/no_destructor.h:63:3: note: candidate: base::NoDestructor<T>::NoDestructor(const base::NoDestructor<T>&) [with T = base::internal::flat_tree<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>, base::internal::GetKeyFromValueIdentity<std::__cxx11::basic_string<char> >, std::less<void> >] <deleted> NoDestructor(const NoDestructor&) = delete; ^~~~~~~~~~~~ ../../base/no_destructor.h:61:12: note: candidate: base::NoDestructor<T>::NoDestructor(T&&) [with T = base::internal::flat_tree<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>, base::internal::GetKeyFromValueIdentity<std::__cxx11::basic_string<char> >, std::less<void> >] explicit NoDestructor(T&& x) { new (storage_) T(std::move(x)); } ^~~~~~~~~~~~ ../../base/no_destructor.h:60:12: note: candidate: base::NoDestructor<T>::NoDestructor(const T&) [with T = base::internal::flat_tree<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>, base::internal::GetKeyFromValueIdentity<std::__cxx11::basic_string<char> >, std::less<void> >] explicit NoDestructor(const T& x) { new (storage_) T(x); } ^~~~~~~~~~~~ Do something similar to https://chromium-review.googlesource.com/944405 and explicitly create a base::flat_set when constructing a base::NoDestructor. Bug: 819294 Change-Id: I20e3c043fc5663fe02cdcaf1061014c22998f973 Reviewed-on: https://chromium-review.googlesource.com/1019322 Commit-Queue: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com> Reviewed-by: Vaclav Brozek <vabr@chromium.org> Cr-Commit-Position: refs/heads/master@{#552002}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .