зеркало из https://github.com/mozilla/pjs.git
Bug 556524. Check for nsWindow existence before creating taskbar preview. r=roc a=blocker
This commit is contained in:
Родитель
04722b7f15
Коммит
672c06e08e
|
@ -459,7 +459,13 @@ TabWindow.prototype = {
|
|||
.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||
.getInterface(Ci.nsIWebNavigation)
|
||||
.QueryInterface(Ci.nsIDocShell);
|
||||
let preview = AeroPeek.taskbar.createTaskbarTabPreview(docShell, controller);
|
||||
let preview;
|
||||
try {
|
||||
preview = AeroPeek.taskbar.createTaskbarTabPreview(docShell, controller);
|
||||
} catch (e) {
|
||||
controller.destroy();
|
||||
return;
|
||||
}
|
||||
preview.visible = AeroPeek.enabled;
|
||||
preview.active = this.tabbrowser.selectedTab == tab;
|
||||
// Grab the default favicon
|
||||
|
|
|
@ -359,6 +359,11 @@ WinTaskbar::CreateTaskbarTabPreview(nsIDocShell *shell, nsITaskbarPreviewControl
|
|||
if (!toplevelHWND)
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
|
||||
nsWindow *window = nsWindow::GetNSWindowPtr(toplevelHWND);
|
||||
|
||||
if (!window)
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
|
||||
nsRefPtr<TaskbarTabPreview> preview(new TaskbarTabPreview(mTaskbar, controller, toplevelHWND, shell));
|
||||
if (!preview)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
|
Загрузка…
Ссылка в новой задаче