author | Bob Owen <bobowencode@gmail.com> |
Fri, 18 Mar 2016 09:53:31 +0000 | |
changeset 289282 | 85e76ff91cb9995d14b30c87a0992b8566c9fca1 |
parent 289281 | f11c6068824f361d00e60e19518d780aa4c514cf |
child 289283 | 3cb3eb37b811f921781e99f28fbc37d383cb4b3f |
push id | 73785 |
push user | bobowencode@gmail.com |
push date | Fri, 18 Mar 2016 09:53:39 +0000 |
treeherder | mozilla-inbound@85e76ff91cb9 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | bas |
bugs | 1257124 |
milestone | 48.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/gfx/thebes/gfxDWriteCommon.cpp +++ b/gfx/thebes/gfxDWriteCommon.cpp @@ -3,16 +3,17 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "gfxDWriteCommon.h" #include <unordered_map> #include "mozilla/Atomics.h" +#include "mozilla/gfx/Logging.h" static mozilla::Atomic<uint64_t> sNextFontFileKey; static std::unordered_map<uint64_t, IDWriteFontFileStream*> sFontFileStreams; IDWriteFontFileLoader* gfxDWriteFontFileLoader::mInstance = nullptr; class gfxDWriteFontFileStream final : public IDWriteFontFileStream { @@ -153,16 +154,20 @@ HRESULT gfxDWriteFontFileLoader::CreateCustomFontFile(FallibleTArray<uint8_t>& aFontData, IDWriteFontFile** aFontFile, IDWriteFontFileStream** aFontFileStream) { MOZ_ASSERT(aFontFile); MOZ_ASSERT(aFontFileStream); IDWriteFactory *factory = gfxWindowsPlatform::GetPlatform()->GetDWriteFactory(); + if (!factory) { + gfxCriticalError() << "Failed to get DWrite Factory in CreateCustomFontFile."; + return E_FAIL; + } uint64_t fontFileKey = sNextFontFileKey++; RefPtr<IDWriteFontFileStream> ffsRef = new gfxDWriteFontFileStream(&aFontData, fontFileKey); sFontFileStreams[fontFileKey] = ffsRef; RefPtr<IDWriteFontFile> fontFile; HRESULT hr = factory->CreateCustomFontFileReference(&fontFileKey, sizeof(fontFileKey), Instance(), getter_AddRefs(fontFile)); if (FAILED(hr)) {