Copy the callback instead of reference

I don't really see how this could be a problem, likely a bug of VS 2017?
This commit is contained in:
Cheng Zhao 2018-01-01 19:28:08 +09:00
parent 46330ac2a9
commit bc61f2eafa
4 changed files with 6 additions and 6 deletions

View file

@ -44,7 +44,7 @@ void MenuMac::PopupOnUI(const base::WeakPtr<NativeWindow>& native_window,
int x,
int y,
int positioning_item,
const base::Closure& callback) {
base::Closure callback) {
if (!native_window)
return;
brightray::InspectableWebContents* web_contents =
@ -124,7 +124,7 @@ void MenuMac::ClosePopupAt(int32_t window_id) {
}
}
void MenuMac::OnClosed(int32_t window_id, const base::Closure& callback) {
void MenuMac::OnClosed(int32_t window_id, base::Closure callback) {
popup_controllers_.erase(window_id);
callback.Run();
}