| Index: chrome/browser/extensions/api/web_request/web_request_api.cc
|
| diff --git a/chrome/browser/extensions/api/web_request/web_request_api.cc b/chrome/browser/extensions/api/web_request/web_request_api.cc
|
| index fb5aa999aa26623cad067f5d00bcad0ea03f2eff..2e97a726284e6080edf636a506824ac0b6eaaf7a 100644
|
| --- a/chrome/browser/extensions/api/web_request/web_request_api.cc
|
| +++ b/chrome/browser/extensions/api/web_request/web_request_api.cc
|
| @@ -917,15 +917,13 @@ bool ExtensionWebRequestEventRouter::DispatchEvent(
|
| net::URLRequest* request,
|
| const std::vector<const EventListener*>& listeners,
|
| const ListValue& args) {
|
| - std::string json_args;
|
| -
|
| // TODO(mpcomplete): Consider consolidating common (extension_id,json_args)
|
| // pairs into a single message sent to a list of sub_event_names.
|
| int num_handlers_blocking = 0;
|
| for (std::vector<const EventListener*>::const_iterator it = listeners.begin();
|
| it != listeners.end(); ++it) {
|
| // Filter out the optional keys that this listener didn't request.
|
| - scoped_ptr<ListValue> args_filtered(args.DeepCopy());
|
| + ListValue* args_filtered = args.DeepCopy();
|
| DictionaryValue* dict = NULL;
|
| CHECK(args_filtered->GetDictionary(0, &dict) && dict);
|
| if (!((*it)->extra_info_spec & ExtraInfoSpec::REQUEST_HEADERS))
|
| @@ -933,11 +931,9 @@ bool ExtensionWebRequestEventRouter::DispatchEvent(
|
| if (!((*it)->extra_info_spec & ExtraInfoSpec::RESPONSE_HEADERS))
|
| dict->Remove(keys::kResponseHeadersKey, NULL);
|
|
|
| - base::JSONWriter::Write(args_filtered.get(), &json_args);
|
| -
|
| ExtensionEventRouter::DispatchEvent(
|
| (*it)->ipc_sender.get(), (*it)->extension_id, (*it)->sub_event_name,
|
| - json_args, GURL(), ExtensionEventRouter::USER_GESTURE_UNKNOWN,
|
| + args_filtered, GURL(), ExtensionEventRouter::USER_GESTURE_UNKNOWN,
|
| EventFilteringInfo());
|
| if ((*it)->extra_info_spec &
|
| (ExtraInfoSpec::BLOCKING | ExtraInfoSpec::ASYNC_BLOCKING)) {
|
|
|