зеркало из https://github.com/mozilla/gecko-dev.git
Bug 562253 - Ensure the proxy window is destroyed before tearing down the taskbar preview r=jimm
This commit is contained in:
Родитель
13ef0df01c
Коммит
97fa759278
|
@ -69,6 +69,13 @@ TaskbarTabPreview::~TaskbarTabPreview() {
|
|||
::DestroyIcon(mIcon);
|
||||
mIcon = NULL;
|
||||
}
|
||||
|
||||
// We need to ensure that proxy window disappears or else Bad Things happen.
|
||||
if (mProxyWindow)
|
||||
Disable();
|
||||
|
||||
NS_ASSERTION(!mProxyWindow, "Taskbar proxy window was not destroyed!");
|
||||
|
||||
if (mWnd)
|
||||
DetachFromNSWindow();
|
||||
}
|
||||
|
@ -271,7 +278,11 @@ TaskbarTabPreview::Enable() {
|
|||
|
||||
nsresult
|
||||
TaskbarTabPreview::Disable() {
|
||||
TaskbarPreview::Disable();
|
||||
// TaskbarPreview::Disable assumes that mWnd is valid but this method can be
|
||||
// called when it is null iff the nsWindow has already been destroyed and we
|
||||
// are still visible for some reason during object destruction.
|
||||
if (mWnd)
|
||||
TaskbarPreview::Disable();
|
||||
|
||||
if (FAILED(mTaskbar->UnregisterTab(mProxyWindow)))
|
||||
return NS_ERROR_FAILURE;
|
||||
|
|
Загрузка…
Ссылка в новой задаче