commit | 32f4d9ca4b2c16b425af6126c2d191c964bc2e1c | [log] [tgz] |
---|---|---|
author | Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com> | Tue Jul 31 08:29:45 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Tue Jul 31 08:29:45 2018 |
tree | 9187f3454127b75ba674eea79e98c83188b16c29 | |
parent | e03fb6c8f673032819ba9818e4d3366de427f3d7 [diff] |
CORS: Take a std::initializer_list in cors_error_string.cc's Append() Follow-up to fc0443b1 ("Update CORS error messages"), which broke the GCC build because GCC does not implicitly covert all array items to StringViews when Append() is invoked: ../../third_party/blink/renderer/platform/loader/cors/cors_error_string.cc: In function ‘WTF::String blink::CORS::GetErrorString(const network::CORSErrorStatus&, const blink::KURL&, const blink::KURL&, const blink::SecurityOrigin&, blink::Resource::Type, const WTF::AtomicString&)’: ../../third_party/blink/renderer/platform/loader/cors/cors_error_string.cc:72:55: error: no matching function for call to ‘Append(WTF::StringBuilder&, <brace-enclosed initializer list>)’ last_request_url.GetString(), "' "}); ^ ../../third_party/blink/renderer/platform/loader/cors/cors_error_string.cc:24:6: note: candidate: ‘template<long unsigned int N> void blink::CORS::{anonymous}::Append(WTF::StringBuilder&, const WTF::StringView (&)[N])’ void Append(StringBuilder& builder, const StringView (&views)[N]) { ^~~~~~ ../../third_party/blink/renderer/platform/loader/cors/cors_error_string.cc:24:6: note: template argument deduction/substitution failed: ../../third_party/blink/renderer/platform/loader/cors/cors_error_string.cc:72:55: note: mismatched types ‘WTF::StringView’ and ‘const char*’ last_request_url.GetString(), "' "}); ^ Make the local Append() function take a std::initializer_list<StringView> to make sure all items are converted to that type on invocation. Bug: 819294 Change-Id: I7c14773589dda16e7c882270e206d1b66dbb73b4 Reviewed-on: https://chromium-review.googlesource.com/1155113 Reviewed-by: Adam Rice <ricea@chromium.org> Reviewed-by: Yutaka Hirano <yhirano@chromium.org> Commit-Queue: Raphael Kubo da Costa (CET) <raphael.kubo.da.costa@intel.com> Cr-Commit-Position: refs/heads/master@{#579346}
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 .