| Index: Source/core/css/FontFaceCache.cpp
|
| diff --git a/Source/core/css/FontFaceCache.cpp b/Source/core/css/FontFaceCache.cpp
|
| index a85e9fa38b717455679aedeec71e2b3a1d82f5d8..c4ab2a56dc3c635810b38bde73caa9212c3f8424 100644
|
| --- a/Source/core/css/FontFaceCache.cpp
|
| +++ b/Source/core/css/FontFaceCache.cpp
|
| @@ -58,11 +58,11 @@ void FontFaceCache::addFontFace(CSSFontSelector* cssFontSelector, PassRefPtr<Fon
|
| {
|
| RefPtr<FontFace> fontFace = prpFontFace;
|
|
|
| - OwnPtr<TraitsMap>& familyFontFaces = m_fontFaces.add(fontFace->family(), nullptr).storedValue->value;
|
| + OwnPtrWillBeMember<TraitsMap>& familyFontFaces = m_fontFaces.add(fontFace->family(), nullptr).storedValue->value;
|
| if (!familyFontFaces)
|
| - familyFontFaces = adoptPtr(new TraitsMap);
|
| + familyFontFaces = adoptPtrWillBeNoop(new TraitsMap);
|
|
|
| - RefPtr<CSSSegmentedFontFace>& segmentedFontFace = familyFontFaces->add(fontFace->traits().mask(), nullptr).storedValue->value;
|
| + RefPtrWillBeMember<CSSSegmentedFontFace>& segmentedFontFace = familyFontFaces->add(fontFace->traits().mask(), nullptr).storedValue->value;
|
| if (!segmentedFontFace)
|
| segmentedFontFace = CSSSegmentedFontFace::create(cssFontSelector, fontFace->traits());
|
|
|
| @@ -92,7 +92,7 @@ void FontFaceCache::removeFontFace(FontFace* fontFace, bool cssConnected)
|
| TraitsMap::iterator familyFontFacesIter = familyFontFaces->find(fontFace->traits().mask());
|
| if (familyFontFacesIter == familyFontFaces->end())
|
| return;
|
| - RefPtr<CSSSegmentedFontFace> segmentedFontFace = familyFontFacesIter->value;
|
| + RefPtrWillBeRawPtr<CSSSegmentedFontFace> segmentedFontFace = familyFontFacesIter->value;
|
|
|
| segmentedFontFace->removeFontFace(fontFace);
|
| if (segmentedFontFace->isEmpty()) {
|
| @@ -193,12 +193,12 @@ CSSSegmentedFontFace* FontFaceCache::get(const FontDescription& fontDescription,
|
| if (!familyFontFaces || familyFontFaces->isEmpty())
|
| return 0;
|
|
|
| - OwnPtr<TraitsMap>& segmentedFontFaceCache = m_fonts.add(family, nullptr).storedValue->value;
|
| + OwnPtrWillBeMember<TraitsMap>& segmentedFontFaceCache = m_fonts.add(family, nullptr).storedValue->value;
|
| if (!segmentedFontFaceCache)
|
| - segmentedFontFaceCache = adoptPtr(new TraitsMap);
|
| + segmentedFontFaceCache = adoptPtrWillBeNoop(new TraitsMap);
|
|
|
| FontTraits traits = fontDescription.traits();
|
| - RefPtr<CSSSegmentedFontFace>& face = segmentedFontFaceCache->add(traits.mask(), nullptr).storedValue->value;
|
| + RefPtrWillBeMember<CSSSegmentedFontFace>& face = segmentedFontFaceCache->add(traits.mask(), nullptr).storedValue->value;
|
| if (!face) {
|
| for (TraitsMap::const_iterator i = familyFontFaces->begin(); i != familyFontFaces->end(); ++i) {
|
| CSSSegmentedFontFace* candidate = i->value.get();
|
| @@ -214,4 +214,10 @@ CSSSegmentedFontFace* FontFaceCache::get(const FontDescription& fontDescription,
|
| return face.get();
|
| }
|
|
|
| +void FontFaceCache::trace(Visitor* visitor)
|
| +{
|
| + visitor->trace(m_fontFaces);
|
| + visitor->trace(m_fonts);
|
| +}
|
| +
|
| }
|
|
|