diff options
author | Ben Murdoch <benm@google.com> | 2010-12-02 09:03:03 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-12-02 09:03:03 -0800 |
commit | bdf4ebc8e70b2d221b6ee7a65660918ecb1d33aa (patch) | |
tree | 5ccbd3eb04668966a7884abedd46e5990db0baaf | |
parent | 1e0178911ca7197656d75bcef43ffbaaf5935c87 (diff) | |
parent | 08b7b3c68ddad8c6ad95eb01db4be376fefcd1d7 (diff) | |
download | external_webkit-bdf4ebc8e70b2d221b6ee7a65660918ecb1d33aa.zip external_webkit-bdf4ebc8e70b2d221b6ee7a65660918ecb1d33aa.tar.gz external_webkit-bdf4ebc8e70b2d221b6ee7a65660918ecb1d33aa.tar.bz2 |
Merge "Fix crash when syncing autofill settings."
-rw-r--r-- | WebKit/android/jni/WebSettings.cpp | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/WebKit/android/jni/WebSettings.cpp b/WebKit/android/jni/WebSettings.cpp index 6b40b65..75f42b3 100644 --- a/WebKit/android/jni/WebSettings.cpp +++ b/WebKit/android/jni/WebSettings.cpp @@ -514,15 +514,17 @@ public: if (!oldAutoFillSetting && flag) webAutoFill->searchDocument(pFrame); - // Set the active AutoFillProfile data. - jobject autoFillProfile = env->GetObjectField(obj, gFieldIds->mAutoFillProfile); - if (autoFillProfile) - syncAutoFillProfile(env, autoFillProfile, webAutoFill); - else { - // The autofill profile is null. We need to tell Chromium about this because - // this may be because the user just deleted their profile but left the - // autofill feature setting enabled. - webAutoFill->clearProfiles(); + if (flag) { + // Set the active AutoFillProfile data. + jobject autoFillProfile = env->GetObjectField(obj, gFieldIds->mAutoFillProfile); + if (autoFillProfile) + syncAutoFillProfile(env, autoFillProfile, webAutoFill); + else { + // The autofill profile is null. We need to tell Chromium about this because + // this may be because the user just deleted their profile but left the + // autofill feature setting enabled. + webAutoFill->clearProfiles(); + } } #endif } |