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

Unified Diff: chrome/browser/extensions/extension_toolstrip_api.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_tabs_module.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_toolstrip_api.cc
diff --git a/chrome/browser/extensions/extension_toolstrip_api.cc b/chrome/browser/extensions/extension_toolstrip_api.cc
index 3c52b16bffc896a92186f65b475ef651a455e2e4..18d1839fc5c5cdc999aff03f980054bb2c410e20 100644
--- a/chrome/browser/extensions/extension_toolstrip_api.cc
+++ b/chrome/browser/extensions/extension_toolstrip_api.cc
@@ -67,7 +67,7 @@ bool ToolstripExpandFunction::RunImpl() {
}
EXTENSION_FUNCTION_VALIDATE(args_->IsType(Value::TYPE_DICTIONARY));
- const DictionaryValue* args = static_cast<const DictionaryValue*>(args_);
+ const DictionaryValue* args = args_as_dictionary();
int height;
EXTENSION_FUNCTION_VALIDATE(args->GetInteger(keys::kHeightKey,
@@ -106,7 +106,7 @@ bool ToolstripCollapseFunction::RunImpl() {
GURL url;
if (args_->GetType() != Value::TYPE_NULL) {
EXTENSION_FUNCTION_VALIDATE(args_->IsType(Value::TYPE_DICTIONARY));
- const DictionaryValue* args = static_cast<const DictionaryValue*>(args_);
+ const DictionaryValue* args = args_as_dictionary();
if (args->HasKey(keys::kUrlKey)) {
std::string url_string;
« no previous file with comments | « chrome/browser/extensions/extension_tabs_module.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698