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

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

Issue 8805010: Fix Manifest leak in Extension::InitFromValue. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 years 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 | « no previous file | tools/heapcheck/suppressions.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/extension.cc
diff --git a/chrome/common/extensions/extension.cc b/chrome/common/extensions/extension.cc
index 1e84be7560bbf5313dc5b32322f2292a53eacef4..1690e4431cc9c4d5770e6f98e4381bf3143afaf4 100644
--- a/chrome/common/extensions/extension.cc
+++ b/chrome/common/extensions/extension.cc
@@ -1385,6 +1385,7 @@ bool Extension::InitFromValue(extensions::Manifest* manifest, int flags,
std::string* error) {
DCHECK(error);
base::AutoLock auto_lock(runtime_data_lock_);
+ manifest_.reset(manifest);
if (!manifest->ValidateManifest(error))
return false;
@@ -1446,8 +1447,6 @@ bool Extension::InitFromValue(extensions::Manifest* manifest, int flags,
creation_flags_ = flags;
- manifest_.reset(manifest);
-
// Initialize the URL.
extension_url_ = Extension::GetBaseURLFromExtensionId(id());
« no previous file with comments | « no previous file | tools/heapcheck/suppressions.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698