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

Unified Diff: third_party/WebKit/Source/core/css/CSSCrossfadeValue.cpp

Issue 1555633002: Oilpan: prefinalize CSSCrossfadeValue. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: whitespace 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/css/CSSCrossfadeValue.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/css/CSSCrossfadeValue.cpp
diff --git a/third_party/WebKit/Source/core/css/CSSCrossfadeValue.cpp b/third_party/WebKit/Source/core/css/CSSCrossfadeValue.cpp
index 402e574fd740aa078e3ab25199cf87153cb56a6f..d9d4263a4ba97c8631f16d0dba6cebb98f6e5ea7 100644
--- a/third_party/WebKit/Source/core/css/CSSCrossfadeValue.cpp
+++ b/third_party/WebKit/Source/core/css/CSSCrossfadeValue.cpp
@@ -93,8 +93,29 @@ static Image* renderableImageForCSSValue(CSSValue* value, const LayoutObject* la
return cachedImage->image();
}
+CSSCrossfadeValue::CSSCrossfadeValue(PassRefPtrWillBeRawPtr<CSSValue> fromValue, PassRefPtrWillBeRawPtr<CSSValue> toValue, PassRefPtrWillBeRawPtr<CSSPrimitiveValue> percentageValue)
+ : CSSImageGeneratorValue(CrossfadeClass)
+ , m_fromValue(fromValue)
+ , m_toValue(toValue)
+ , m_percentageValue(percentageValue)
+ , m_cachedFromImage(nullptr)
+ , m_cachedToImage(nullptr)
+ , m_crossfadeSubimageObserver(this)
+{
+#if ENABLE(OILPAN)
+ ThreadState::current()->registerPreFinalizer(this);
+#endif
+}
+
CSSCrossfadeValue::~CSSCrossfadeValue()
{
+#if !ENABLE(OILPAN)
+ dispose();
+#endif
+}
+
+void CSSCrossfadeValue::dispose()
+{
if (m_cachedFromImage)
m_cachedFromImage->removeClient(&m_crossfadeSubimageObserver);
if (m_cachedToImage)
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSCrossfadeValue.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698