summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gtk
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-04 19:24:42 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-04 19:24:42 +0000
commitd22d873921f2f657b483a01a398ddce3001747a1 (patch)
tree4190718501c4cae47302ea1a8be8ee7b6f4c41cd /chrome/browser/gtk
parent30cf2bf9a44e5f97ddd497113bce74feb6b4b517 (diff)
downloadchromium_src-d22d873921f2f657b483a01a398ddce3001747a1.zip
chromium_src-d22d873921f2f657b483a01a398ddce3001747a1.tar.gz
chromium_src-d22d873921f2f657b483a01a398ddce3001747a1.tar.bz2
Fix various uses of release() that did not check its value
BUG=42904 TEST=compile, unit tests Review URL: http://codereview.chromium.org/1730024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46376 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk')
-rw-r--r--chrome/browser/gtk/certificate_dialogs.cc2
-rw-r--r--chrome/browser/gtk/location_bar_view_gtk.cc16
2 files changed, 9 insertions, 9 deletions
diff --git a/chrome/browser/gtk/certificate_dialogs.cc b/chrome/browser/gtk/certificate_dialogs.cc
index e181ad4..ba12f6d 100644
--- a/chrome/browser/gtk/certificate_dialogs.cc
+++ b/chrome/browser/gtk/certificate_dialogs.cc
@@ -126,7 +126,7 @@ std::string GetCMSString(std::vector<CERTCertificate*> cert_chain, size_t start,
NSSCMSContentInfo *cinfo = NSS_CMSMessage_GetContentInfo(message.get());
if (NSS_CMSContentInfo_SetContent_SignedData(
message.get(), cinfo, signed_data.get()) == SECSuccess) {
- signed_data.release();
+ ignore_result(signed_data.release());
} else {
LOG(ERROR) << "NSS_CMSMessage_GetContentInfo failed";
return "";
diff --git a/chrome/browser/gtk/location_bar_view_gtk.cc b/chrome/browser/gtk/location_bar_view_gtk.cc
index e31262c..7a1749cc 100644
--- a/chrome/browser/gtk/location_bar_view_gtk.cc
+++ b/chrome/browser/gtk/location_bar_view_gtk.cc
@@ -469,9 +469,9 @@ void LocationBarViewGtk::Update(const TabContents* contents) {
}
void LocationBarViewGtk::OnAutocompleteAccept(const GURL& url,
- WindowOpenDisposition disposition,
- PageTransition::Type transition,
- const GURL& alternate_nav_url) {
+ WindowOpenDisposition disposition,
+ PageTransition::Type transition,
+ const GURL& alternate_nav_url) {
if (!url.is_valid())
return;
@@ -487,8 +487,8 @@ void LocationBarViewGtk::OnAutocompleteAccept(const GURL& url,
return;
}
- scoped_ptr<AlternateNavURLFetcher> fetcher(
- new AlternateNavURLFetcher(alternate_nav_url));
+ AlternateNavURLFetcher* fetcher =
+ new AlternateNavURLFetcher(alternate_nav_url);
// The AlternateNavURLFetcher will listen for the pending navigation
// notification that will be issued as a result of the "open URL." It
// will automatically install itself into that navigation controller.
@@ -496,10 +496,10 @@ void LocationBarViewGtk::OnAutocompleteAccept(const GURL& url,
if (fetcher->state() == AlternateNavURLFetcher::NOT_STARTED) {
// I'm not sure this should be reachable, but I'm not also sure enough
// that it shouldn't to stick in a NOTREACHED(). In any case, this is
- // harmless; we can simply let the fetcher get deleted here and it will
- // clean itself up properly.
+ // harmless.
+ delete fetcher;
} else {
- fetcher.release(); // The navigation controller will delete the fetcher.
+ // The navigation controller will delete the fetcher.
}
}