Merge pull request #13517 from trop-bot/3-0-x-bp-fix--tray-setcontextmenu-crash-1530309092727

Backport (3-0-x) - fix: tray setContextMenu crash
This commit is contained in:
John Kleinschmidt 2018-07-02 09:13:58 -04:00 committed by GitHub
commit 8585372e11
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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