summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--WebKit/android/jni/WebSettings.cpp20
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
}