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

Unified Diff: third_party/WebKit/Source/core/style/StyleFetchedImage.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
Index: third_party/WebKit/Source/core/style/StyleFetchedImage.cpp
diff --git a/third_party/WebKit/Source/core/style/StyleFetchedImage.cpp b/third_party/WebKit/Source/core/style/StyleFetchedImage.cpp
index 838103d195999b68bb434aec34c573f2d54b7cb5..30e6b1f7931c22cda2e70cb3f2dabe35546ab275 100644
--- a/third_party/WebKit/Source/core/style/StyleFetchedImage.cpp
+++ b/third_party/WebKit/Source/core/style/StyleFetchedImage.cpp
@@ -39,10 +39,20 @@ StyleFetchedImage::StyleFetchedImage(ImageResource* image, Document* document, c
{
m_isImageResource = true;
m_image->addClient(this);
+#if ENABLE(OILPAN)
+ ThreadState::current()->registerPreFinalizer(this);
+#endif
}
StyleFetchedImage::~StyleFetchedImage()
{
+#if !ENABLE(OILPAN)
+ dispose();
+#endif
+}
+
+void StyleFetchedImage::dispose()
+{
m_image->removeClient(this);
}
« no previous file with comments | « third_party/WebKit/Source/core/style/StyleFetchedImage.h ('k') | third_party/WebKit/Source/core/style/StyleFetchedImageSet.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698