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

Unified Diff: third_party/WebKit/Source/core/style/StyleFetchedImageSet.cpp

Issue 1536113003: Oilpan: prefinalize StyleFetchedImage* image resource clients. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 | « third_party/WebKit/Source/core/style/StyleFetchedImageSet.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/style/StyleFetchedImageSet.cpp
diff --git a/third_party/WebKit/Source/core/style/StyleFetchedImageSet.cpp b/third_party/WebKit/Source/core/style/StyleFetchedImageSet.cpp
index d34c7c165871b02e167d6992f285dc09303beedd..08971341c336635d36e9a4419ceb15666f0b245e 100644
--- a/third_party/WebKit/Source/core/style/StyleFetchedImageSet.cpp
+++ b/third_party/WebKit/Source/core/style/StyleFetchedImageSet.cpp
@@ -41,11 +41,20 @@ StyleFetchedImageSet::StyleFetchedImageSet(ImageResource* image, float imageScal
{
m_isImageResourceSet = true;
m_bestFitImage->addClient(this);
+#if ENABLE(OILPAN)
+ ThreadState::current()->registerPreFinalizer(this);
+#endif
}
-
StyleFetchedImageSet::~StyleFetchedImageSet()
{
+#if !ENABLE(OILPAN)
+ dispose();
+#endif
+}
+
+void StyleFetchedImageSet::dispose()
+{
m_bestFitImage->removeClient(this);
}
« no previous file with comments | « third_party/WebKit/Source/core/style/StyleFetchedImageSet.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698