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

Unified Diff: chrome/common/extensions/extension_l10n_util.cc

Issue 526018: Merge 34968 - Fix memory leak on ExtensionMessageBundle.... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/249/src/
Patch Set: Created 10 years, 12 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
« no previous file with comments | « chrome/browser/renderer_host/resource_message_filter.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/extension_l10n_util.cc
===================================================================
--- chrome/common/extensions/extension_l10n_util.cc (revision 35597)
+++ chrome/common/extensions/extension_l10n_util.cc (working copy)
@@ -122,15 +122,15 @@
std::string default_locale = GetDefaultLocaleFromManifest(*manifest, error);
- ExtensionMessageBundle* message_bundle =
- extension_file_util::LoadExtensionMessageBundle(extension->path(),
- default_locale,
- error);
+ scoped_ptr<ExtensionMessageBundle> message_bundle(
+ extension_file_util::LoadExtensionMessageBundle(
+ extension->path(), default_locale, error));
- if (!message_bundle && !error->empty())
+ if (!message_bundle.get() && !error->empty())
return false;
- if (message_bundle && !LocalizeManifest(*message_bundle, manifest, error))
+ if (message_bundle.get() &&
+ !LocalizeManifest(*message_bundle, manifest, error))
return false;
return true;
« no previous file with comments | « chrome/browser/renderer_host/resource_message_filter.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698