Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(851)

Unified Diff: third_party/WebKit/Source/platform/fonts/mac/FontFamilyMatcherMac.mm

Issue 2807913002: Replace ASSERT, ASSERT_NOT_REACHED, and RELEASE_ASSERT in platform/fonts (Closed)
Patch Set: rebase Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/fonts/mac/FontFamilyMatcherMac.mm
diff --git a/third_party/WebKit/Source/platform/fonts/mac/FontFamilyMatcherMac.mm b/third_party/WebKit/Source/platform/fonts/mac/FontFamilyMatcherMac.mm
index 32bba2fa2cf377ca67cb046cd63ff03dba7646ac..2745db411f495bbdf8e474623d19db1802815b67 100644
--- a/third_party/WebKit/Source/platform/fonts/mac/FontFamilyMatcherMac.mm
+++ b/third_party/WebKit/Source/platform/fonts/mac/FontFamilyMatcherMac.mm
@@ -57,7 +57,8 @@ static CGFloat toYosemiteFontWeight(blink::FontWeight fontWeight) {
0x3fe1eb8520000000, // NSFontWeightHeavy
0x3fe3d70a40000000, // NSFontWeightBlack
};
- ASSERT(fontWeight >= 0 && fontWeight <= 8);
+ DCHECK_GE(fontWeight, 0);
+ DCHECK_LE(fontWeight, 8);
CGFloat* weight = reinterpret_cast<CGFloat*>(&nsFontWeights[fontWeight]);
return *weight;
}

Powered by Google App Engine
This is Rietveld 408576698