Index: extensions/renderer/argument_spec.cc |
diff --git a/extensions/renderer/argument_spec.cc b/extensions/renderer/argument_spec.cc |
index 623f13587a4bd2a353ee27eb0f8a964e940184c5..f79ea8a9107f44cd2d1da2e4a275ba82ba7cac67 100644 |
--- a/extensions/renderer/argument_spec.cc |
+++ b/extensions/renderer/argument_spec.cc |
@@ -93,7 +93,13 @@ void ArgumentSpec::InitializeType(const base::DictionaryValue* dict) { |
CHECK_GT(size, 0u); |
for (size_t i = 0; i < size; ++i) { |
std::string enum_value; |
- CHECK(enums->GetString(i, &enum_value)); |
+ // Enum entries come in two versions: a list of possible strings, and |
jbroman
2016/10/21 22:53:59
Could this and its unit test be in another CL? It
Devlin
2016/10/22 00:49:15
Sure, I'll pull them out. They're still needed he
|
+ // a dictionary with a field 'name'. |
+ if (!enums->GetString(i, &enum_value)) { |
+ const base::DictionaryValue* enum_value_dictionary = nullptr; |
+ CHECK(enums->GetDictionary(i, &enum_value_dictionary)); |
+ CHECK(enum_value_dictionary->GetString("name", &enum_value)); |
+ } |
enum_values_.insert(std::move(enum_value)); |
} |
} |