You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
chromium/chromium-99-AutofillAssista...

33 lines
1.6 KiB

From f1befebb6cea78950b5a8133bf3e65d56889d353 Mon Sep 17 00:00:00 2001
From: Jose Dapena Paz <jdapena@igalia.com>
Date: Thu, 20 Jan 2022 09:38:13 +0100
Subject: [PATCH] GCC: use braces initialization for NoDestructor in AutofillAssistantModelExecutor
Fix build with GCC failing to resolve initialization of NoDestructor
with initializer list.
Bug: 819294
Change-Id: I5fe8d30b4aefdddd71ff7b220eeffcd838308f5a
---
diff --git a/components/autofill_assistant/content/renderer/autofill_assistant_model_executor.cc b/components/autofill_assistant/content/renderer/autofill_assistant_model_executor.cc
index 033205b..670376e 100644
--- a/components/autofill_assistant/content/renderer/autofill_assistant_model_executor.cc
+++ b/components/autofill_assistant/content/renderer/autofill_assistant_model_executor.cc
@@ -156,13 +156,13 @@
// TODO(b/204841212): Implement this with use of ModelMetadata.
absl::optional<std::string> AutofillAssistantModelExecutor::Postprocess(
const std::vector<const TfLiteTensor*>& output_tensors) {
- static const base::NoDestructor<std::vector<std::string>> output_roles(
+ static const base::NoDestructor<std::vector<std::string>> output_roles{
{"UNKNOWN_ROLE", "NAME_FIRST", "NAME_LAST", "NAME_FULL", "ADDRESS_LINE1",
"ADDRESS_LINE2", "CITY", "STATE", "COUNTRY", "POSTAL_CODE",
"CREDIT_CARD_NUMBER", "CREDIT_CARD_EXP_MONTH",
"CREDIT_CARD_VERIFICATION_CODE", "ORGANIZATION",
"CREDIT_CARD_EXPIRATION", "PHONE_NUMBER", "USERNAME_OR_EMAIL",
- "CREDIT_CARD_EXP_YEAR"});
+ "CREDIT_CARD_EXP_YEAR"}};
DCHECK_GE(output_tensors.size(), 1u);
std::vector<float> data;