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

Unified Diff: chrome/browser/extensions/api/downloads/downloads_api_unittest.cc

Issue 10825127: Valgrind: Clean up leaks in callers to extension_function_test_utils::RunFunction. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 5 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: chrome/browser/extensions/api/downloads/downloads_api_unittest.cc
===================================================================
--- chrome/browser/extensions/api/downloads/downloads_api_unittest.cc (revision 149361)
+++ chrome/browser/extensions/api/downloads/downloads_api_unittest.cc (working copy)
@@ -479,6 +479,7 @@
base::Value* RunFunctionAndReturnResult(UIThreadExtensionFunction* function,
const std::string& args) {
+ scoped_refptr<UIThreadExtensionFunction> delete_function(function);
SetUpExtensionFunction(function);
return extension_function_test_utils::RunFunctionAndReturnSingleResult(
function, args, browser(), GetFlags());
@@ -486,6 +487,7 @@
std::string RunFunctionAndReturnError(UIThreadExtensionFunction* function,
const std::string& args) {
+ scoped_refptr<UIThreadExtensionFunction> delete_function(function);
SetUpExtensionFunction(function);
return extension_function_test_utils::RunFunctionAndReturnError(
function, args, browser(), GetFlags());

Powered by Google App Engine
This is Rietveld 408576698