Index: chrome/browser/extensions/extension_debugger_api.cc |
diff --git a/chrome/browser/extensions/extension_debugger_api.cc b/chrome/browser/extensions/extension_debugger_api.cc |
index 6e59f22468537a0c1e9de7be9bb4d855dd174f7b..d6d05afe006bd32d04b4a49f5784e8c042678487 100644 |
--- a/chrome/browser/extensions/extension_debugger_api.cc |
+++ b/chrome/browser/extensions/extension_debugger_api.cc |
@@ -248,14 +248,11 @@ void ExtensionDevToolsClientHost::SendDetachedEvent() { |
Profile* profile = |
Profile::FromBrowserContext(web_contents_->GetBrowserContext()); |
if (profile != NULL && profile->GetExtensionEventRouter()) { |
- ListValue args; |
- args.Append(CreateDebuggeeId(tab_id_)); |
- |
- std::string json_args; |
- base::JSONWriter::Write(&args, &json_args); |
+ ListValue* args = new ListValue(); |
+ args->Append(CreateDebuggeeId(tab_id_)); |
profile->GetExtensionEventRouter()->DispatchEventToExtension( |
- extension_id_, keys::kOnDetach, json_args, profile, GURL()); |
+ extension_id_, keys::kOnDetach, args, profile, GURL()); |
} |
} |
@@ -298,18 +295,15 @@ void ExtensionDevToolsClientHost::DispatchOnInspectorFrontend( |
if (!dictionary->GetString("method", &method_name)) |
return; |
- ListValue args; |
- args.Append(CreateDebuggeeId(tab_id_)); |
- args.Append(Value::CreateStringValue(method_name)); |
+ ListValue* args = new ListValue(); |
+ args->Append(CreateDebuggeeId(tab_id_)); |
+ args->Append(Value::CreateStringValue(method_name)); |
Value* params_value; |
if (dictionary->Get("params", ¶ms_value)) |
- args.Append(params_value->DeepCopy()); |
- |
- std::string json_args; |
- base::JSONWriter::Write(&args, &json_args); |
+ args->Append(params_value->DeepCopy()); |
profile->GetExtensionEventRouter()->DispatchEventToExtension( |
- extension_id_, keys::kOnEvent, json_args, profile, GURL()); |
+ extension_id_, keys::kOnEvent, args, profile, GURL()); |
} else { |
SendCommandDebuggerFunction* function = pending_requests_[id]; |
if (!function) |