fix: multiple move() calls on the same unique_ptr (#42821)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Charles Kerr <charles@charleskerr.com>
This commit is contained in:
parent
e36d79706e
commit
50864bcd08
1 changed files with 2 additions and 3 deletions
|
@ -343,13 +343,12 @@ void ElectronExtensionsBrowserClient::BroadcastEventToRenderers(
|
|||
return;
|
||||
}
|
||||
|
||||
auto event = std::make_unique<extensions::Event>(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<extensions::Event>(
|
||||
histogram_value, event_name, args.Clone()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue