Index: Source/core/css/CSSFontFace.cpp |
diff --git a/Source/core/css/CSSFontFace.cpp b/Source/core/css/CSSFontFace.cpp |
index f0e611432ee4eb38e6ec2029bc361538a9edd467..b83b4594dcf0bb854a79806819a58613c055680a 100644 |
--- a/Source/core/css/CSSFontFace.cpp |
+++ b/Source/core/css/CSSFontFace.cpp |
@@ -57,14 +57,14 @@ bool CSSFontFace::isValid() const |
return false; |
} |
-void CSSFontFace::addedToSegmentedFontFace(CSSSegmentedFontFace* segmentedFontFace) |
+void CSSFontFace::addedToSegmentedFontFace(Handle<CSSSegmentedFontFace> segmentedFontFace) |
{ |
- m_segmentedFontFaces.add(segmentedFontFace); |
+ m_segmentedFontFaces.add(segmentedFontFace.raw()); |
} |
-void CSSFontFace::removedFromSegmentedFontFace(CSSSegmentedFontFace* segmentedFontFace) |
+void CSSFontFace::removedFromSegmentedFontFace(Handle<CSSSegmentedFontFace> segmentedFontFace) |
{ |
- m_segmentedFontFaces.remove(segmentedFontFace); |
+ m_segmentedFontFaces.remove(segmentedFontFace.raw()); |
} |
void CSSFontFace::addSource(PassOwnPtr<CSSFontFaceSource> source) |
@@ -87,6 +87,7 @@ void CSSFontFace::fontLoaded(CSSFontFaceSource* source) |
// Use one of the CSSSegmentedFontFaces' font selector. They all have |
// the same font selector, so it's wasteful to store it in the CSSFontFace. |
CSSFontSelector* fontSelector = (*m_segmentedFontFaces.begin())->fontSelector(); |
+ ASSERT(fontSelector); |
fontSelector->fontLoaded(); |
if (RuntimeEnabledFeatures::fontLoadEventsEnabled() && m_loadState == Loading) { |
@@ -109,6 +110,7 @@ PassRefPtr<SimpleFontData> CSSFontFace::getFontData(const FontDescription& fontD |
ASSERT(!m_segmentedFontFaces.isEmpty()); |
CSSFontSelector* fontSelector = (*m_segmentedFontFaces.begin())->fontSelector(); |
+ ASSERT(fontSelector); |
if (RuntimeEnabledFeatures::fontLoadEventsEnabled() && m_loadState == NotLoaded) |
notifyFontLoader(Loading); |
@@ -132,7 +134,9 @@ void CSSFontFace::notifyFontLoader(LoadState newState) |
{ |
m_loadState = newState; |
- Document* document = (*m_segmentedFontFaces.begin())->fontSelector()->document(); |
+ CSSFontSelector* fontSelector = (*m_segmentedFontFaces.begin())->fontSelector(); |
+ ASSERT(fontSelector); |
+ Document* document = fontSelector->document(); |
if (!document) |
return; |