Index: chrome/test/automation/javascript_message_utils.h |
diff --git a/chrome/test/automation/javascript_message_utils.h b/chrome/test/automation/javascript_message_utils.h |
index 1ccdc17efff0f0a8983f7d82799337ab2f1b4d09..e4b61f4d9961f222f192336398e99dd2dc185cf8 100644 |
--- a/chrome/test/automation/javascript_message_utils.h |
+++ b/chrome/test/automation/javascript_message_utils.h |
@@ -51,11 +51,11 @@ struct ValueConversionTraits<std::vector<T> > { |
} |
return value; |
} |
- static bool SetFromValue(Value* value, std::vector<T>* t) { |
- ListValue* list_value = value->AsList(); |
- if (!list_value) |
+ static bool SetFromValue(const Value* value, std::vector<T>* t) { |
+ if (!value->IsType(Value::TYPE_LIST)) |
return false; |
+ const ListValue* list_value = static_cast<const ListValue*>(value); |
ListValue::const_iterator iter; |
for (iter = list_value->begin(); iter != list_value->end(); ++iter) { |
if (!ValueConversionTraits<T>::CanConvert(*iter)) |