Index: chrome/test/webdriver/webdriver_session.cc |
diff --git a/chrome/test/webdriver/webdriver_session.cc b/chrome/test/webdriver/webdriver_session.cc |
index c3a7c11ef2bbb64fdc1d57f722c338a43611bfef..1a764a845f78678d4e2e617c302fe26f80c0e87a 100644 |
--- a/chrome/test/webdriver/webdriver_session.cc |
+++ b/chrome/test/webdriver/webdriver_session.cc |
@@ -1240,9 +1240,9 @@ Error* Session::ExecuteFindElementScriptAndParse( |
virtual ~FindElementsParser() { } |
virtual bool Parse(base::Value* value) const OVERRIDE { |
- ListValue* list = value->AsList(); |
- if (!list) |
+ if (!value->IsType(Value::TYPE_LIST)) |
return false; |
+ ListValue* list = static_cast<ListValue*>(value); |
for (size_t i = 0; i < list->GetSize(); ++i) { |
ElementId element; |
Value* element_value = NULL; |