diff options
Diffstat (limited to 'chromium/components/autofill')
-rw-r--r-- | chromium/components/autofill/core/common/autocomplete_parsing_util.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/chromium/components/autofill/core/common/autocomplete_parsing_util.cc b/chromium/components/autofill/core/common/autocomplete_parsing_util.cc index f68be082514..5bcafed47ae 100644 --- a/chromium/components/autofill/core/common/autocomplete_parsing_util.cc +++ b/chromium/components/autofill/core/common/autocomplete_parsing_util.cc @@ -181,7 +181,9 @@ absl::optional<HtmlFieldType> ParseNonStandarizedAutocompleteAttribute( // `ParseFieldTypesFromAutocompleteAttributes()`. bool ShouldIgnoreAutocompleteValue(base::StringPiece value) { static constexpr char16_t kRegex[] = u"address"; - return MatchesRegex<kRegex>(base::UTF8ToUTF16(value)); + static base::NoDestructor<std::unique_ptr<const icu::RegexPattern>> + regex_pattern(CompileRegex(kRegex)); + return MatchesRegex(base::UTF8ToUTF16(value), **regex_pattern, nullptr); } } // namespace |