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

Unified Diff: chrome/browser/extensions/extension_function.cc

Issue 377036: Fix memory leak in AsyncExtensionFunction. (Closed)
Patch Set: feedback Created 11 years, 1 month 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/extensions/extension_function.h ('k') | chrome/browser/extensions/extension_history_api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_function.cc
diff --git a/chrome/browser/extensions/extension_function.cc b/chrome/browser/extensions/extension_function.cc
index b8aaae1cbe2d2ee7421e5f9ca0574976942c28b1..27ce5ebc378348f5a3e541f101f825c7725a3fe2 100644
--- a/chrome/browser/extensions/extension_function.cc
+++ b/chrome/browser/extensions/extension_function.cc
@@ -9,8 +9,8 @@
#include "chrome/browser/extensions/extension_function_dispatcher.h"
void AsyncExtensionFunction::SetArgs(const Value* args) {
- DCHECK(!args_); // Should only be called once.
- args_ = args->DeepCopy();
+ DCHECK(!args_.get()); // Should only be called once.
+ args_.reset(args->DeepCopy());
}
const std::string AsyncExtensionFunction::GetResult() {
« no previous file with comments | « chrome/browser/extensions/extension_function.h ('k') | chrome/browser/extensions/extension_history_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698