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

Unified Diff: Source/core/css/CSSSegmentedFontFace.h

Issue 18375005: [oilpan] Move CSSFontFace and 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
« no previous file with comments | « Source/core/css/CSSFontSelector.cpp ('k') | Source/core/css/CSSSegmentedFontFace.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/CSSSegmentedFontFace.h
diff --git a/Source/core/css/CSSSegmentedFontFace.h b/Source/core/css/CSSSegmentedFontFace.h
index 6507d1763228f16a75b04eb1a8e93f6df624c66b..61979172a7e96bd5216b8abcc48dd695d87d1600 100644
--- a/Source/core/css/CSSSegmentedFontFace.h
+++ b/Source/core/css/CSSSegmentedFontFace.h
@@ -26,9 +26,9 @@
#ifndef CSSSegmentedFontFace_h
#define CSSSegmentedFontFace_h
+#include "heap/Handle.h"
#include <wtf/HashMap.h>
#include <wtf/PassRefPtr.h>
-#include <wtf/RefCounted.h>
#include <wtf/Vector.h>
#include <wtf/unicode/Unicode.h>
@@ -40,28 +40,33 @@ class FontData;
class FontDescription;
class SegmentedFontData;
-class CSSSegmentedFontFace : public RefCounted<CSSSegmentedFontFace> {
+class CSSSegmentedFontFace : public HeapAllocatedFinalized<CSSSegmentedFontFace> {
+ DECLARE_GC_TYPE_MARKER
public:
- static PassRefPtr<CSSSegmentedFontFace> create(CSSFontSelector* selector) { return adoptRef(new CSSSegmentedFontFace(selector)); }
+ static Result<CSSSegmentedFontFace> create(CSSFontSelector* selector) { return adopt(new CSSSegmentedFontFace(selector)); }
~CSSSegmentedFontFace();
- CSSFontSelector* fontSelector() const { return m_fontSelector; }
+ CSSFontSelector* fontSelector() const { return m_fontSelector.get(); }
- void fontLoaded(CSSFontFace*);
+ void fontLoaded(Handle<CSSFontFace>);
- void appendFontFace(PassRefPtr<CSSFontFace>);
+ void appendFontFace(Handle<CSSFontFace>);
PassRefPtr<FontData> getFontData(const FontDescription&);
- class LoadFontCallback : public RefCounted<LoadFontCallback> {
+ class LoadFontCallback : public HeapAllocatedFinalized<LoadFontCallback> {
+ DECLARE_GC_TYPE_MARKER
public:
virtual ~LoadFontCallback() { }
- virtual void notifyLoaded(CSSSegmentedFontFace*) = 0;
- virtual void notifyError(CSSSegmentedFontFace*) = 0;
+ virtual void notifyLoaded(Handle<CSSSegmentedFontFace>) = 0;
+ virtual void notifyError(Handle<CSSSegmentedFontFace>) = 0;
+ virtual void accept(Visitor*) const = 0;
};
bool checkFont() const;
- void loadFont(const FontDescription&, PassRefPtr<LoadFontCallback> loadCallback);
+ void loadFont(const FontDescription&, Handle<LoadFontCallback> loadCallback);
+
+ void accept(Visitor*) const;
private:
CSSSegmentedFontFace(CSSFontSelector*);
@@ -70,10 +75,10 @@ private:
bool isValid() const;
bool isLoading() const;
- CSSFontSelector* m_fontSelector;
+ RefPtr<CSSFontSelector> m_fontSelector;
haraken 2013/07/04 08:03:44 Adding this RefPtr fixed the heap corruption in SV
HashMap<unsigned, RefPtr<SegmentedFontData> > m_fontDataTable;
- Vector<RefPtr<CSSFontFace>, 1> m_fontFaces;
- Vector<RefPtr<LoadFontCallback> > m_callbacks;
+ Vector<Member<CSSFontFace>, 1> m_fontFaces;
+ Vector<Member<LoadFontCallback> > m_callbacks;
};
} // namespace WebCore
« no previous file with comments | « Source/core/css/CSSFontSelector.cpp ('k') | Source/core/css/CSSSegmentedFontFace.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698