OSDN Git Service

Fix crash when syncing autofill settings.
authorBen Murdoch <benm@google.com>
Thu, 2 Dec 2010 15:10:50 +0000 (15:10 +0000)
committerBen Murdoch <benm@google.com>
Thu, 2 Dec 2010 15:25:34 +0000 (15:25 +0000)
commit08b7b3c68ddad8c6ad95eb01db4be376fefcd1d7
tree9e40e898352f397968d709069f15616106c3fce1
parent0dea64c9575802352241ad43b78e20198a6e137c
Fix crash when syncing autofill settings.

Since we moved the autofill initiation code out of the constructor
and into it's own method, we may crash if there is an autofill profile
set but the feature is turned off (i.e. the user had it on at one point
and had a profile set up but turned it off without deleting the
profile). That's because in this case we execute setAutoFillProfile()
in WebSettings without having first called the new init method. It makes
sense to not sync any profiles though when the feature is not enabled,
so add that check.

Change-Id: I9d99e96347770e5b08c982513f2370cb770cbe94
WebKit/android/jni/WebSettings.cpp