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

Unified Diff: third_party/WebKit/Source/platform/graphics/paint/PropertyTreeState.h

Issue 2572423002: [SPv2] Use PassRefPtr in PropertyTreeState setter and remove meaningless DCHECK (Closed)
Patch Set: that makes sense. thanks! Created 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/graphics/paint/PropertyTreeState.h
diff --git a/third_party/WebKit/Source/platform/graphics/paint/PropertyTreeState.h b/third_party/WebKit/Source/platform/graphics/paint/PropertyTreeState.h
index 0204844235482c817b3b3089078fd63d1a110951..c59fc27f16496f21a0052eded86c7f093ef9d3da 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/PropertyTreeState.h
+++ b/third_party/WebKit/Source/platform/graphics/paint/PropertyTreeState.h
@@ -38,36 +38,32 @@ class PropertyTreeState {
DCHECK(!m_transform || !m_transform->hasOneRef());
return m_transform.get();
}
- void setTransform(const TransformPaintPropertyNode* node) {
- m_transform = node;
- DCHECK(!node->hasOneRef());
+ void setTransform(RefPtr<const TransformPaintPropertyNode> node) {
+ m_transform = std::move(node);
}
const ClipPaintPropertyNode* clip() const {
DCHECK(!m_clip || !m_clip->hasOneRef());
return m_clip.get();
}
- void setClip(const ClipPaintPropertyNode* node) {
- m_clip = node;
- DCHECK(!node->hasOneRef());
+ void setClip(RefPtr<const ClipPaintPropertyNode> node) {
+ m_clip = std::move(node);
}
const EffectPaintPropertyNode* effect() const {
DCHECK(!m_effect || !m_effect->hasOneRef());
return m_effect.get();
}
- void setEffect(const EffectPaintPropertyNode* node) {
- m_effect = node;
- DCHECK(!node->hasOneRef());
+ void setEffect(RefPtr<const EffectPaintPropertyNode> node) {
+ m_effect = std::move(node);
}
const ScrollPaintPropertyNode* scroll() const {
DCHECK(!m_scroll || !m_scroll->hasOneRef());
return m_scroll.get();
}
- void setScroll(const ScrollPaintPropertyNode* node) {
- m_scroll = node;
- DCHECK(!node->hasOneRef());
+ void setScroll(RefPtr<const ScrollPaintPropertyNode> node) {
+ m_scroll = std::move(node);
}
private:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698