Title: [119458] trunk/Source/WebCore
- Revision
- 119458
- Author
- [email protected]
- Date
- 2012-06-04 22:01:57 -0700 (Mon, 04 Jun 2012)
Log Message
Leaking ClipRects
https://bugs.webkit.org/show_bug.cgi?id=88282
Reviewed by Dan Bernstein.
In r118562 I made the ClipRectsCache use RefPtr<ClipRects>. However, ClipRects
was initialized with m_refCnt=0, not 1 as adoptRef() and friends expect. Also,
there was a manual ref() in RenderLayer::updateClipRects() which this patch removes.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateClipRects):
* rendering/RenderLayer.h:
(WebCore::ClipRects::ClipRects):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (119457 => 119458)
--- trunk/Source/WebCore/ChangeLog 2012-06-05 04:49:54 UTC (rev 119457)
+++ trunk/Source/WebCore/ChangeLog 2012-06-05 05:01:57 UTC (rev 119458)
@@ -1,3 +1,19 @@
+2012-06-04 Simon Fraser <[email protected]>
+
+ Leaking ClipRects
+ https://bugs.webkit.org/show_bug.cgi?id=88282
+
+ Reviewed by Dan Bernstein.
+
+ In r118562 I made the ClipRectsCache use RefPtr<ClipRects>. However, ClipRects
+ was initialized with m_refCnt=0, not 1 as adoptRef() and friends expect. Also,
+ there was a manual ref() in RenderLayer::updateClipRects() which this patch removes.
+
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::updateClipRects):
+ * rendering/RenderLayer.h:
+ (WebCore::ClipRects::ClipRects):
+
2012-06-04 Emil A Eklund <[email protected]> and Levi Weintraub <[email protected]>
Add missing FractionalLayoutUnit += operator and move LineWidth to use all floats
Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (119457 => 119458)
--- trunk/Source/WebCore/rendering/RenderLayer.cpp 2012-06-05 04:49:54 UTC (rev 119457)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp 2012-06-05 05:01:57 UTC (rev 119458)
@@ -3794,7 +3794,6 @@
else
m_clipRectsCache->m_clipRects[clipRectsType] = ClipRects::create(clipRects);
- m_clipRectsCache->m_clipRects[clipRectsType]->ref();
#ifndef NDEBUG
m_clipRectsCache->m_clipRectsRoot[clipRectsType] = rootLayer;
#endif
Modified: trunk/Source/WebCore/rendering/RenderLayer.h (119457 => 119458)
--- trunk/Source/WebCore/rendering/RenderLayer.h 2012-06-05 04:49:54 UTC (rev 119457)
+++ trunk/Source/WebCore/rendering/RenderLayer.h 2012-06-05 05:01:57 UTC (rev 119458)
@@ -140,7 +140,7 @@
}
ClipRects()
- : m_refCnt(0)
+ : m_refCnt(1)
, m_fixed(false)
{
}
@@ -194,7 +194,7 @@
: m_overflowClipRect(r)
, m_fixedClipRect(r)
, m_posClipRect(r)
- , m_refCnt(0)
+ , m_refCnt(1)
, m_fixed(false)
{
}
@@ -203,7 +203,7 @@
: m_overflowClipRect(other.overflowClipRect())
, m_fixedClipRect(other.fixedClipRect())
, m_posClipRect(other.posClipRect())
- , m_refCnt(0)
+ , m_refCnt(1)
, m_fixed(other.fixed())
{
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes