зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1715944 - Set the cached theme handle to Nothing() if the holding value was null. r=Gijs
In the class stlye of Win7, `OpenThemeData` returns null. The problem is `ThemeHandle::Close()` did not reset the cached value to `Nothing()` if the holding value was null. As a result, we never fetch the theme handle after the theme is changed. Differential Revision: https://phabricator.services.mozilla.com/D121288
This commit is contained in:
Родитель
a0e4108ae9
Коммит
fefaf12909
|
@ -39,12 +39,13 @@ void nsUXThemeData::ThemeHandle::OpenOnce(HWND aWindow, LPCWSTR aClassList) {
|
|||
}
|
||||
|
||||
void nsUXThemeData::ThemeHandle::Close() {
|
||||
if (mHandle.isNothing() || !mHandle.value()) {
|
||||
if (mHandle.isNothing()) {
|
||||
return;
|
||||
}
|
||||
|
||||
CloseThemeData(mHandle.value());
|
||||
mHandle = Nothing();
|
||||
if (HANDLE rawHandle = mHandle.extract()) {
|
||||
CloseThemeData(rawHandle);
|
||||
}
|
||||
}
|
||||
|
||||
nsUXThemeData::ThemeHandle::operator HANDLE() {
|
||||
|
|
Загрузка…
Ссылка в новой задаче