From 7ca9a74fef3296cdf1385785b5e817e963bb4c35 Mon Sep 17 00:00:00 2001 From: Ben Wagner Date: Thu, 17 Aug 2017 14:05:04 -0400 Subject: Remove uses of sk_throw. The sk_throw macro is now an alias to SK_ABORT, but is often used when other macros better describe the situation. This change replaces sk_throw with SK_ABORT or SkASSERT_RELEASE as appropriate. Change-Id: I313facc6d535c8e8bec90ceeaf17ae3a381c48f3 Reviewed-on: https://skia-review.googlesource.com/35882 Reviewed-by: Yuqian Li Commit-Queue: Ben Wagner --- src/ports/SkFontHost_FreeType.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/ports') diff --git a/src/ports/SkFontHost_FreeType.cpp b/src/ports/SkFontHost_FreeType.cpp index 5af6190d91..f892438ca3 100644 --- a/src/ports/SkFontHost_FreeType.cpp +++ b/src/ports/SkFontHost_FreeType.cpp @@ -418,9 +418,7 @@ class AutoFTAccess { public: AutoFTAccess(const SkTypeface* tf) : fFaceRec(nullptr) { gFTMutex.acquire(); - if (!ref_ft_library()) { - sk_throw(); - } + SkASSERT_RELEASE(ref_ft_library()); fFaceRec = ref_ft_face(tf); } @@ -764,10 +762,7 @@ SkScalerContext_FreeType::SkScalerContext_FreeType(sk_sp typeface, , fStrikeIndex(-1) { SkAutoMutexAcquire ac(gFTMutex); - - if (!ref_ft_library()) { - sk_throw(); - } + SkASSERT_RELEASE(ref_ft_library()); fFaceRec.reset(ref_ft_face(this->getTypeface())); -- cgit v1.2.3