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

Unified Diff: Source/core/rendering/ClipRects.h

Issue 647393002: Oilpan: Forbid adoptRef(X*) where X is RefCountedGarbageCollected (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 1 month 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 | Source/core/rendering/RenderLayerClipper.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/ClipRects.h
diff --git a/Source/core/rendering/ClipRects.h b/Source/core/rendering/ClipRects.h
index 581677492bcfec697127e1c3027c7369b20943fc..18e891e82d5f95aafd9d9f929f41f51d580450a3 100644
--- a/Source/core/rendering/ClipRects.h
+++ b/Source/core/rendering/ClipRects.h
@@ -27,10 +27,11 @@
#define ClipRects_h
#include "core/rendering/ClipRect.h"
+#include "wtf/RefCounted.h"
namespace blink {
-class ClipRects {
+class ClipRects : public RefCounted<ClipRects> {
WTF_MAKE_FAST_ALLOCATED;
public:
static PassRefPtr<ClipRects> create()
@@ -44,8 +45,7 @@ public:
}
ClipRects()
- : m_refCnt(1)
- , m_fixed(0)
+ : m_fixed(0)
{
}
@@ -69,13 +69,6 @@ public:
bool fixed() const { return static_cast<bool>(m_fixed); }
void setFixed(bool fixed) { m_fixed = fixed ? 1 : 0; }
- void ref() { m_refCnt++; }
- void deref()
- {
- if (!--m_refCnt)
- delete this;
- }
-
bool operator==(const ClipRects& other) const
{
return m_overflowClipRect == other.overflowClipRect()
@@ -98,7 +91,6 @@ private:
: m_overflowClipRect(r)
, m_fixedClipRect(r)
, m_posClipRect(r)
- , m_refCnt(1)
, m_fixed(0)
{
}
@@ -107,7 +99,6 @@ private:
: m_overflowClipRect(other.overflowClipRect())
, m_fixedClipRect(other.fixedClipRect())
, m_posClipRect(other.posClipRect())
- , m_refCnt(1)
, m_fixed(other.fixed())
{
}
@@ -115,8 +106,7 @@ private:
ClipRect m_overflowClipRect;
ClipRect m_fixedClipRect;
ClipRect m_posClipRect;
- unsigned m_refCnt : 31;
- unsigned m_fixed : 1;
+ unsigned m_fixed;
};
} // namespace blink
« no previous file with comments | « no previous file | Source/core/rendering/RenderLayerClipper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698