diff --git a/gfx/layers/LayerTreeInvalidation.cpp b/gfx/layers/LayerTreeInvalidation.cpp index 531f04ebc611..b0d5cc6d593f 100644 --- a/gfx/layers/LayerTreeInvalidation.cpp +++ b/gfx/layers/LayerTreeInvalidation.cpp @@ -483,11 +483,15 @@ CloneLayerTreePropertiesInternal(Layer* aRoot, bool aIsMask /* = false */) return MakeUnique(static_cast(aRoot)); case Layer::TYPE_IMAGE: return MakeUnique(static_cast(aRoot), aIsMask); - default: + case Layer::TYPE_CANVAS: + case Layer::TYPE_READBACK: + case Layer::TYPE_SHADOW: + case Layer::TYPE_PAINTED: return MakeUnique(aRoot); } - return UniquePtr(nullptr); + MOZ_ASSERT_UNREACHABLE("Unexpected root layer type"); + return MakeUnique(aRoot); } /* static */ UniquePtr diff --git a/gfx/thebes/gfxPlatform.cpp b/gfx/thebes/gfxPlatform.cpp index dc5824606ef1..bef8e712846f 100644 --- a/gfx/thebes/gfxPlatform.cpp +++ b/gfx/thebes/gfxPlatform.cpp @@ -2065,26 +2065,19 @@ gfxPlatform::GetLog(eGfxLog aWhichLog) switch (aWhichLog) { case eGfxLog_fontlist: return sFontlistLog; - break; case eGfxLog_fontinit: return sFontInitLog; - break; case eGfxLog_textrun: return sTextrunLog; - break; case eGfxLog_textrunui: return sTextrunuiLog; - break; case eGfxLog_cmapdata: return sCmapDataLog; - break; case eGfxLog_textperf: return sTextPerfLog; - break; - default: - break; } + MOZ_ASSERT_UNREACHABLE("Unexpected log type"); return nullptr; }