summaryrefslogtreecommitdiffstats
path: root/chrome/browser/webdata
diff options
context:
space:
mode:
authordhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-05 23:14:23 +0000
committerdhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-05 23:14:23 +0000
commit27bc9e8ac1922f88fbe003c9b050add4e27321b0 (patch)
treeb8144c740ebfe600da7f3de56048593a1c6a1903 /chrome/browser/webdata
parentde79ca9d31a185a8a965197b99fd628d9581b389 (diff)
downloadchromium_src-27bc9e8ac1922f88fbe003c9b050add4e27321b0.zip
chromium_src-27bc9e8ac1922f88fbe003c9b050add4e27321b0.tar.gz
chromium_src-27bc9e8ac1922f88fbe003c9b050add4e27321b0.tar.bz2
Autofill heapcheck and valgrind leak in PersonalDataManager unit test fixed
An early return in the WebDataService was the source of a leak in PersonalDataManagerTest.Refresh test. This fixes it. Also, some small cleanup in the test itself. BUG=61988 TEST=Memory bots stay green. Review URL: http://codereview.chromium.org/4612001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65272 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/webdata')
-rw-r--r--chrome/browser/webdata/web_data_service.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/chrome/browser/webdata/web_data_service.cc b/chrome/browser/webdata/web_data_service.cc
index d99fa73..d5ecd0f 100644
--- a/chrome/browser/webdata/web_data_service.cc
+++ b/chrome/browser/webdata/web_data_service.cc
@@ -1039,6 +1039,7 @@ void WebDataService::UpdateAutoFillProfileGUIDImpl(
// the caller will detect this on the next refresh.
AutoFillProfile* original_profile = NULL;
if (!db_->GetAutoFillProfileForGUID(profile.guid(), &original_profile)) {
+ request->RequestComplete();
return;
}
scoped_ptr<AutoFillProfile> scoped_profile(original_profile);
@@ -1157,6 +1158,7 @@ void WebDataService::UpdateCreditCardGUIDImpl(
// the write and the caller will detect this on the next refresh.
CreditCard* original_credit_card = NULL;
if (!db_->GetCreditCardForGUID(credit_card.guid(), &original_credit_card)) {
+ request->RequestComplete();
return;
}
scoped_ptr<CreditCard> scoped_credit_card(original_credit_card);