diff --git a/shell/browser/extensions/electron_extensions_browser_client.cc b/shell/browser/extensions/electron_extensions_browser_client.cc index 1af0a6e8153..e972603b205 100644 --- a/shell/browser/extensions/electron_extensions_browser_client.cc +++ b/shell/browser/extensions/electron_extensions_browser_client.cc @@ -343,13 +343,12 @@ void ElectronExtensionsBrowserClient::BroadcastEventToRenderers( return; } - auto event = std::make_unique(histogram_value, event_name, - args.Clone()); for (auto const& [key, browser_context] : ElectronBrowserContext::browser_context_map()) { if (browser_context) { extensions::EventRouter::Get(browser_context.get()) - ->BroadcastEvent(std::move(event)); + ->BroadcastEvent(std::make_unique( + histogram_value, event_name, args.Clone())); } } }