Index: components/autofill/content/renderer/autofill_agent.cc |
diff --git a/components/autofill/content/renderer/autofill_agent.cc b/components/autofill/content/renderer/autofill_agent.cc |
index e8a9e02daa51647b7110d2e203c5db4224810959..b14863bc1c37e1b87544b63962de265a6227fb7b 100644 |
--- a/components/autofill/content/renderer/autofill_agent.cc |
+++ b/components/autofill/content/renderer/autofill_agent.cc |
@@ -348,7 +348,8 @@ void AutofillAgent::textFieldDidChange(const WebFormControlElement& element) { |
if (ignore_text_changes_) |
return; |
- DCHECK(toWebInputElement(&element) || IsTextAreaElement(element)); |
+ if (!toWebInputElement(&element) && !IsTextAreaElement(element)) |
+ return; |
Ilya Sherman
2014/04/22 21:08:45
Why is this code reachable?
|
if (did_set_node_text_) { |
did_set_node_text_ = false; |
@@ -419,7 +420,9 @@ void AutofillAgent::openTextDataListChooser(const WebInputElement& element) { |
void AutofillAgent::AcceptDataListSuggestion( |
const base::string16& suggested_value) { |
WebInputElement* input_element = toWebInputElement(&element_); |
- DCHECK(input_element); |
+ if (!input_element) |
+ return; |
Ilya Sherman
2014/04/22 21:08:45
Why is this code reachable?
|
+ |
base::string16 new_value = suggested_value; |
// If this element takes multiple values then replace the last part with |
// the suggestion. |