| Index: chrome/browser/extensions/api/offscreen_tabs/offscreen_tabs_api.cc
|
| diff --git a/chrome/browser/extensions/api/offscreen_tabs/offscreen_tabs_api.cc b/chrome/browser/extensions/api/offscreen_tabs/offscreen_tabs_api.cc
|
| index 28bb985a08579b75e27a34a384c97cb7f9e36a98..6f53d033cb3ec6ecbf8346c17ffbb3d28d1c1ee0 100644
|
| --- a/chrome/browser/extensions/api/offscreen_tabs/offscreen_tabs_api.cc
|
| +++ b/chrome/browser/extensions/api/offscreen_tabs/offscreen_tabs_api.cc
|
| @@ -264,19 +264,17 @@ void OffscreenTab::Observe(int type,
|
| changed_properties->SetString(
|
| tabs_keys::kUrlKey, web_contents()->GetURL().spec());
|
|
|
| - ListValue args;
|
| - args.Append(Value::CreateIntegerValue(
|
| + ListValue* args = new ListValue();
|
| + args->Append(Value::CreateIntegerValue(
|
| ExtensionTabUtil::GetTabId(web_contents())));
|
| - args.Append(changed_properties);
|
| - args.Append(CreateValue());
|
| - std::string json_args;
|
| - base::JSONWriter::Write(&args, &json_args);
|
| + args->Append(changed_properties);
|
| + args->Append(CreateValue());
|
|
|
| // The event router only dispatches the event to renderers listening for the
|
| // event.
|
| Profile* profile = parent_tab_->tab_contents()->profile();
|
| profile->GetExtensionEventRouter()->DispatchEventToRenderers(
|
| - events::kOnOffscreenTabUpdated, json_args, profile, GURL(),
|
| + events::kOnOffscreenTabUpdated, args, profile, GURL(),
|
| extensions::EventFilteringInfo());
|
| }
|
|
|
|
|