summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2011-11-03 18:24:39 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2011-11-03 18:24:39 +0000
commit50e02358902a65acdedde3de6bed9b2a199b25b0 (patch)
treefcf788c76bcc6392bec55cebe87d00b0eb3cdd32 /Source
parent092270aeda4095dfd07d579f1d2e99bcdf386c04 (diff)
parent9f3355b57b144ac285d6bb28e39268a8e9f26fd6 (diff)
downloadexternal_webkit-50e02358902a65acdedde3de6bed9b2a199b25b0.zip
external_webkit-50e02358902a65acdedde3de6bed9b2a199b25b0.tar.gz
external_webkit-50e02358902a65acdedde3de6bed9b2a199b25b0.tar.bz2
am 9f3355b5: Fix crash in Autofill.
* commit '9f3355b57b144ac285d6bb28e39268a8e9f26fd6': Fix crash in Autofill.
Diffstat (limited to 'Source')
-rw-r--r--Source/WebKit/android/WebCoreSupport/autofill/WebAutofill.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/Source/WebKit/android/WebCoreSupport/autofill/WebAutofill.cpp b/Source/WebKit/android/WebCoreSupport/autofill/WebAutofill.cpp
index 7ab7abd..863e8b0 100644
--- a/Source/WebKit/android/WebCoreSupport/autofill/WebAutofill.cpp
+++ b/Source/WebKit/android/WebCoreSupport/autofill/WebAutofill.cpp
@@ -129,6 +129,14 @@ void WebAutofill::formsSeenImpl()
void WebAutofill::formFieldFocused(WebCore::HTMLFormControlElement* formFieldElement)
{
+ if (!enabled()) {
+ // In case that we've just been disabled and the last time we got autofill
+ // suggestions we told Java about them, clear that bit Java side now
+ // we're disabled.
+ mWebViewCore->setWebTextViewAutoFillable(FORM_NOT_AUTOFILLABLE, string16());
+ return;
+ }
+
ASSERT(formFieldElement);
Document* doc = formFieldElement->document();
@@ -149,13 +157,7 @@ void WebAutofill::formFieldFocused(WebCore::HTMLFormControlElement* formFieldEle
mLastSearchDomVersion = domVersion;
}
- if (!enabled()) {
- // In case that we've just been disabled and the last time we got autofill
- // suggestions and told Java about them, clear that bit Java side now
- // we're disabled.
- mWebViewCore->setWebTextViewAutoFillable(FORM_NOT_AUTOFILLABLE, string16());
- return;
- }
+ ASSERT(mFormManager);
// Get the FormField from the Node.
webkit_glue::FormField* formField = new webkit_glue::FormField;