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); |
} |