| Index: Source/core/css/CSSFontFace.cpp
|
| diff --git a/Source/core/css/CSSFontFace.cpp b/Source/core/css/CSSFontFace.cpp
|
| index f0e611432ee4eb38e6ec2029bc361538a9edd467..a3d3885cb0f379263b31802cb7f9360aa0dfd5f2 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,8 @@ 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();
|
| + if (!fontSelector)
|
| + return;
|
| fontSelector->fontLoaded();
|
|
|
| if (RuntimeEnabledFeatures::fontLoadEventsEnabled() && m_loadState == Loading) {
|
| @@ -109,6 +111,8 @@ PassRefPtr<SimpleFontData> CSSFontFace::getFontData(const FontDescription& fontD
|
|
|
| ASSERT(!m_segmentedFontFaces.isEmpty());
|
| CSSFontSelector* fontSelector = (*m_segmentedFontFaces.begin())->fontSelector();
|
| + if (!fontSelector)
|
| + return 0;
|
|
|
| if (RuntimeEnabledFeatures::fontLoadEventsEnabled() && m_loadState == NotLoaded)
|
| notifyFontLoader(Loading);
|
| @@ -132,7 +136,10 @@ void CSSFontFace::notifyFontLoader(LoadState newState)
|
| {
|
| m_loadState = newState;
|
|
|
| - Document* document = (*m_segmentedFontFaces.begin())->fontSelector()->document();
|
| + CSSFontSelector* fontSelector = (*m_segmentedFontFaces.begin())->fontSelector();
|
| + if (!fontSelector)
|
| + return;
|
| + Document* document = fontSelector->document();
|
| if (!document)
|
| return;
|
|
|
|
|