fix: tray setContextMenu crash (#13513)

Co-authored-by: Zhuo Lu <sethlu@mintkit.net>
Co-authored-by: Kristine Zhang <kzhang@slack-corp.com>
This commit is contained in:
Maxine Whitely 2018-06-29 14:48:26 -07:00 committed by Shelley Vohr
parent 67673cbf7f
commit 6cf68f8247

View file

@ -123,7 +123,9 @@ static base::scoped_nsobject<NSMenu> recentDocumentsMenuSwap_;
[menu_ cancelTracking]; [menu_ cancelTracking];
isMenuOpen_ = NO; isMenuOpen_ = NO;
model_->MenuWillClose(); model_->MenuWillClose();
closeCallback.Run(); if (!closeCallback.is_null()) {
BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, closeCallback);
}
} }
} }