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

Unified Diff: Source/core/css/CSSFontFace.cpp

Issue 18882002: [oilpan] Move CSSSegmentedFontFace to the managed heap (Closed) Base URL: svn://svn.chromium.org/blink/branches/oilpan
Patch Set: Created 7 years, 5 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: 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;

Powered by Google App Engine
This is Rietveld 408576698