Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(814)

Unified Diff: webkit/forms/password_form_dom_manager.cc

Issue 10907021: Fix a memory leak in PasswordGenerationManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webkit/forms/password_form_dom_manager.cc
diff --git a/webkit/forms/password_form_dom_manager.cc b/webkit/forms/password_form_dom_manager.cc
index 5cf367dcb813c4ffa0d79e26a84078a8a0f9c583..93545982fd1def4535e8378db1d130e8169cb0e6 100644
--- a/webkit/forms/password_form_dom_manager.cc
+++ b/webkit/forms/password_form_dom_manager.cc
@@ -22,12 +22,12 @@ PasswordFormFillData::PasswordFormFillData() : wait_for_username(false) {
PasswordFormFillData::~PasswordFormFillData() {
}
-PasswordForm* PasswordFormDomManager::CreatePasswordForm(
+scoped_ptr<PasswordForm> PasswordFormDomManager::CreatePasswordForm(
const WebFormElement& webform) {
WebPasswordFormData web_password_form(webform);
if (web_password_form.isValid())
- return new PasswordForm(web_password_form);
- return NULL;
+ return scoped_ptr<PasswordForm>(new PasswordForm(web_password_form));
+ return scoped_ptr<PasswordForm>();
}
// static
« tools/valgrind/memcheck/suppressions.txt ('K') | « webkit/forms/password_form_dom_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698