зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1262110 - Null out nsIMacDockSupport.dockMenu on shutdown. r=smaug.
--HG-- extra : rebase_source : 230f640b44d8ecbb846780584c608827d012680c
This commit is contained in:
Родитель
baaa3908f8
Коммит
fdf8990ef4
|
@ -1573,6 +1573,10 @@ if (AppConstants.platform == "macosx") {
|
|||
};
|
||||
|
||||
gBrowserInit.nonBrowserWindowShutdown = function() {
|
||||
let dockSupport = Cc["@mozilla.org/widget/macdocksupport;1"]
|
||||
.getService(Ci.nsIMacDockSupport);
|
||||
dockSupport.dockMenu = null;
|
||||
|
||||
// If nonBrowserWindowDelayedStartup hasn't run yet, we have no work to do -
|
||||
// just cancel the pending timeout and return;
|
||||
if (this._delayedStartupTimeoutId) {
|
||||
|
|
|
@ -39,20 +39,16 @@ nsMacDockSupport::~nsMacDockSupport()
|
|||
NS_IMETHODIMP
|
||||
nsMacDockSupport::GetDockMenu(nsIStandaloneNativeMenu ** aDockMenu)
|
||||
{
|
||||
*aDockMenu = nullptr;
|
||||
|
||||
if (mDockMenu)
|
||||
return mDockMenu->QueryInterface(NS_GET_IID(nsIStandaloneNativeMenu),
|
||||
reinterpret_cast<void **>(aDockMenu));
|
||||
nsCOMPtr<nsIStandaloneNativeMenu> dockMenu(mDockMenu);
|
||||
dockMenu.forget(aDockMenu);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsMacDockSupport::SetDockMenu(nsIStandaloneNativeMenu * aDockMenu)
|
||||
{
|
||||
nsresult rv;
|
||||
mDockMenu = do_QueryInterface(aDockMenu, &rv);
|
||||
return rv;
|
||||
mDockMenu = aDockMenu;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
|
Загрузка…
Ссылка в новой задаче