Commit 4d5ed398 authored by tkent@chromium.org's avatar tkent@chromium.org

Oilpan: Change Persistent members of Resource subclasses to Member.

BUG=393516

Review URL: https://codereview.chromium.org/424723002

git-svn-id: svn://svn.chromium.org/blink/trunk@179038 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent c0f7f289
......@@ -60,6 +60,12 @@ void CSSStyleSheetResource::dispose()
m_parsedStyleSheetCache.clear();
}
void CSSStyleSheetResource::trace(Visitor* visitor)
{
visitor->trace(m_parsedStyleSheetCache);
StyleSheetResource::trace(visitor);
}
void CSSStyleSheetResource::didAddClient(ResourceClient* c)
{
ASSERT(c->resourceClientType() == StyleSheetResourceClient::expectedType());
......
......@@ -41,6 +41,7 @@ class CSSStyleSheetResource FINAL : public StyleSheetResource {
public:
CSSStyleSheetResource(const ResourceRequest&, const String& charset);
virtual ~CSSStyleSheetResource();
virtual void trace(Visitor*) OVERRIDE;
const String sheetText(bool enforceMIMEType = true, bool* hasValidMIMEType = 0) const;
......@@ -60,7 +61,7 @@ private:
String m_decodedSheetText;
RefPtrWillBePersistent<StyleSheetContents> m_parsedStyleSheetCache;
RefPtrWillBeMember<StyleSheetContents> m_parsedStyleSheetCache;
};
DEFINE_RESOURCE_TYPE_CASTS(CSSStyleSheet);
......
......@@ -42,6 +42,12 @@ DocumentResource::~DocumentResource()
{
}
void DocumentResource::trace(Visitor* visitor)
{
visitor->trace(m_document);
Resource::trace(visitor);
}
void DocumentResource::setEncoding(const String& chs)
{
m_decoder->setEncoding(chs, TextResourceDecoder::EncodingFromHTTPHeader);
......
......@@ -38,6 +38,7 @@ public:
DocumentResource(const ResourceRequest&, Type);
virtual ~DocumentResource();
virtual void trace(Visitor*) OVERRIDE;
Document* document() const { return m_document.get(); }
......@@ -48,7 +49,7 @@ public:
private:
PassRefPtrWillBeRawPtr<Document> createDocument(const KURL&);
RefPtrWillBePersistent<Document> m_document;
RefPtrWillBeMember<Document> m_document;
OwnPtr<TextResourceDecoder> m_decoder;
};
......
......@@ -87,6 +87,14 @@ FontResource::~FontResource()
{
}
void FontResource::trace(Visitor* visitor)
{
#if ENABLE(SVG_FONTS)
visitor->trace(m_externalSVGDocument);
#endif
Resource::trace(visitor);
}
void FontResource::load(ResourceFetcher*, const ResourceLoaderOptions& options)
{
// Don't load the file yet. Wait for an access before triggering the load.
......
......@@ -47,6 +47,7 @@ public:
FontResource(const ResourceRequest&);
virtual ~FontResource();
virtual void trace(Visitor*) OVERRIDE;
virtual void load(ResourceFetcher*, const ResourceLoaderOptions&) OVERRIDE;
......@@ -82,7 +83,7 @@ private:
Timer<FontResource> m_fontLoadWaitLimitTimer;
#if ENABLE(SVG_FONTS)
RefPtrWillBePersistent<Document> m_externalSVGDocument;
RefPtrWillBeMember<Document> m_externalSVGDocument;
#endif
friend class MemoryCache;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment