author | Bob Owen <bobowencode@gmail.com> |
Thu, 15 Dec 2016 10:55:10 +0000 | |
changeset 325942 | 7fe29922e32c564ec9a8e551312d0165d5834fec |
parent 325941 | 70487414c27a1c1d1e78880a26d7644686ab6242 |
child 325943 | 8f305096ee45414d41363526617a55633c83ecbf |
push id | 84842 |
push user | bobowencode@gmail.com |
push date | Thu, 15 Dec 2016 10:55:32 +0000 |
treeherder | mozilla-inbound@7fe29922e32c [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | milan |
bugs | 1321522 |
milestone | 53.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
|
gfx/2d/Logging.h | file | annotate | diff | comparison | revisions | |
gfx/2d/RecordedEvent.cpp | file | annotate | diff | comparison | revisions |
--- a/gfx/2d/Logging.h +++ b/gfx/2d/Logging.h @@ -125,16 +125,17 @@ enum class LogReason : int { InvalidCommandList, AsyncTransactionTimeout, // 30 TextureCreation, InvalidCacheSurface, AlphaWithBasicClient, UnbalancedClipStack, ProcessingError, InvalidDrawTarget, + NativeFontResourceNotFound, // End MustBeLessThanThis = 101, }; struct BasicLogger { // For efficiency, this method exists and copies the logic of the // OutputMessage below. If making any changes here, also make it
--- a/gfx/2d/RecordedEvent.cpp +++ b/gfx/2d/RecordedEvent.cpp @@ -1639,16 +1639,22 @@ RecordedFontDescriptor::RecordedFontDesc mData.resize(size); aStream.read((char*)&mData[0], size); } bool RecordedScaledFontCreation::PlayEvent(Translator *aTranslator) const { NativeFontResource *fontResource = aTranslator->LookupNativeFontResource(mFontDataKey); + if (!fontResource) { + gfxDevCrash(LogReason::NativeFontResourceNotFound) << + "NativeFontResource lookup failed for key |" << hexa(mFontDataKey) << "|."; + return false; + } + RefPtr<ScaledFont> scaledFont = fontResource->CreateScaledFont(mIndex, mGlyphSize); aTranslator->AddScaledFont(mRefPtr, scaledFont); return true; } void RecordedScaledFontCreation::RecordToStream(std::ostream &aStream) const {