Bug 899011 - Make WinTaskbar.GetAvailable() return false if initializing the taskbar fails r=jimm

This commit is contained in:
Tim Taubert 2014-01-11 23:02:00 +01:00
parent addbc75a3d
commit e37c322253

View File

@ -220,6 +220,7 @@ WinTaskbar::Initialize() {
hr = mTaskbar->HrInit();
if (FAILED(hr)) {
// This may fail with shell extensions like blackbox installed.
NS_WARNING("Unable to initialize taskbar");
NS_RELEASE(mTaskbar);
return false;
@ -366,7 +367,9 @@ WinTaskbar::RegisterAppUserModelID() {
NS_IMETHODIMP
WinTaskbar::GetAvailable(bool *aAvailable) {
*aAvailable = IsWin7OrLater();
// ITaskbarList4::HrInit() may fail with shell extensions like blackbox
// installed. Initialize early to return available=false in those cases.
*aAvailable = IsWin7OrLater() && Initialize();
return NS_OK;
}