mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 06:43:32 +00:00
bug 636968 - check windows API calls for failure in InitDwriteBG. r=jdaggett a=roc
This commit is contained in:
parent
38f3bd0582
commit
dfae62cacd
@ -2762,19 +2762,24 @@ static DWORD InitDwriteBG(LPVOID lpdwThreadParam)
|
||||
SetThreadPriority(GetCurrentThread(), THREAD_MODE_BACKGROUND_BEGIN);
|
||||
LOGREGISTRY(L"loading dwrite.dll");
|
||||
HMODULE dwdll = LoadLibraryW(L"dwrite.dll");
|
||||
DWriteCreateFactoryFunc createDWriteFactory = (DWriteCreateFactoryFunc)
|
||||
GetProcAddress(dwdll, "DWriteCreateFactory");
|
||||
if (createDWriteFactory) {
|
||||
LOGREGISTRY(L"creating dwrite factory");
|
||||
IDWriteFactory *factory;
|
||||
HRESULT hr = createDWriteFactory(
|
||||
DWRITE_FACTORY_TYPE_SHARED,
|
||||
__uuidof(IDWriteFactory),
|
||||
reinterpret_cast<IUnknown**>(&factory));
|
||||
|
||||
LOGREGISTRY(L"dwrite factory done");
|
||||
factory->Release();
|
||||
LOGREGISTRY(L"freed factory");
|
||||
if (dwdll) {
|
||||
DWriteCreateFactoryFunc createDWriteFactory = (DWriteCreateFactoryFunc)
|
||||
GetProcAddress(dwdll, "DWriteCreateFactory");
|
||||
if (createDWriteFactory) {
|
||||
LOGREGISTRY(L"creating dwrite factory");
|
||||
IDWriteFactory *factory;
|
||||
HRESULT hr = createDWriteFactory(
|
||||
DWRITE_FACTORY_TYPE_SHARED,
|
||||
__uuidof(IDWriteFactory),
|
||||
reinterpret_cast<IUnknown**>(&factory));
|
||||
if (SUCCEEDED(hr)) {
|
||||
LOGREGISTRY(L"dwrite factory done");
|
||||
factory->Release();
|
||||
LOGREGISTRY(L"freed factory");
|
||||
} else {
|
||||
LOGREGISTRY(L"failed to create factory");
|
||||
}
|
||||
}
|
||||
}
|
||||
SetThreadPriority(GetCurrentThread(), THREAD_MODE_BACKGROUND_END);
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user