commit | 7f14947018f6928fc71f3c6ff2af87bace04e91c | [log] [tgz] |
---|---|---|
author | Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com> | Wed Oct 10 18:07:45 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Wed Oct 10 18:07:45 2018 |
tree | 0f8eb47253fb25b588ddc29cd0dd365f3cb853ab | |
parent | 5cd489a71fcdcdafed31fd8775869e6140809ff2 [diff] |
appcache: Make a few local parser functions non-constexpr This fixes the GCC build, which was failing with errors such as ../../content/browser/appcache/appcache_manifest_parser.cc: In function ‘constexpr base::StringPiece content::{anonymous}::TrimToFirstNewLine(base::StringPiece)’: ../../content/browser/appcache/appcache_manifest_parser.cc:78:26: error: call to non-constexpr function ‘base::BasicStringPiece<STRING_TYPE> base::BasicStringPiece<STRING_TYPE>::substr(base::BasicStringPiece<STRING_TYPE>::size_type, base::BasicStringPiece<STRING_TYPE>::size_type) const [with STRING_TYPE = std::__cxx11::basic_string<char>; base::BasicStringPiece<STRING_TYPE>::size_type = long unsigned int]’ return data.substr(skip); ^ which actually makes sense, as base::BasicStringPiece::substr() is not a constexpr function and is always called from the functions in appcache_manifest_parser.cc, rendering their own constexpr specifiers irrelevant. MSVC also rejects similar code, so I've filed an upstream LLVM bug at https://bugs.llvm.org/show_bug.cgi?id=39242 Original patch by Maksim Sisov <msisov@igalia.com>, whose original CL ended up being deleted from Gerrit. Bug: 819294 Change-Id: I269d35f701ca3fbbdb9c8fed248e80c7c4066633 Reviewed-on: https://chromium-review.googlesource.com/c/1273108 Commit-Queue: Victor Costan <pwnall@chromium.org> Reviewed-by: Victor Costan <pwnall@chromium.org> Cr-Commit-Position: refs/heads/master@{#598401}
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 .