Commit f016bb32 authored by ager@chromium.org's avatar ager@chromium.org

Oilpan: Fix leaks through RenderStyle objects.

RenderStyle objects are not on the heap and they keep the CSSFontSelector
and its associated ResourceFetcher alive. We turned raw pointers to the
document in CSSFontSelector and ResourceFetcher into traced Members. That
will leak until we can also trace through the RenderStyle structure.

See crbug.com/383860 for details.

This fixed the leaks by using WeakMembers to the document in these two
places. We really should trace through all of this but that is going
to be a larger change and we should fix this leak now.

R=haraken@chromium.org, oilpan-reviews@chromium.org, sigbjornf@opera.com
BUG=383860

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

git-svn-id: svn://svn.chromium.org/blink/trunk@176034 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 28db8f16
...@@ -86,7 +86,10 @@ private: ...@@ -86,7 +86,10 @@ private:
void dispatchInvalidationCallbacks(); void dispatchInvalidationCallbacks();
RawPtrWillBeMember<Document> m_document; // FIXME: Oilpan: Ideally this should just be a traced Member but that will
// currently leak because RenderStyle and its data are not on the heap.
// See crbug.com/383860 for details.
RawPtrWillBeWeakMember<Document> m_document;
// FIXME: Move to Document or StyleEngine. // FIXME: Move to Document or StyleEngine.
FontFaceCache m_fontFaceCache; FontFaceCache m_fontFaceCache;
WillBeHeapHashSet<RawPtrWillBeWeakMember<CSSFontSelectorClient> > m_clients; WillBeHeapHashSet<RawPtrWillBeWeakMember<CSSFontSelectorClient> > m_clients;
......
...@@ -205,7 +205,10 @@ private: ...@@ -205,7 +205,10 @@ private:
HashSet<String> m_validatedURLs; HashSet<String> m_validatedURLs;
mutable DocumentResourceMap m_documentResources; mutable DocumentResourceMap m_documentResources;
RawPtrWillBeMember<Document> m_document; // FIXME: Oilpan: Ideally this should just be a traced Member but that will
// currently leak because RenderStyle and its data are not on the heap.
// See crbug.com/383860 for details.
RawPtrWillBeWeakMember<Document> m_document;
DocumentLoader* m_documentLoader; DocumentLoader* m_documentLoader;
int m_requestCount; int m_requestCount;
......
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