⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 119458 in webkit


Ignore:
Timestamp:
Jun 4, 2012, 10:01:57 PM (14 years ago)
Author:
Simon Fraser
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):

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r119456 r119458  
     12012-06-04  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Leaking ClipRects
     4        https://bugs.webkit.org/show_bug.cgi?id=88282
     5
     6        Reviewed by Dan Bernstein.
     7
     8        In r118562 I made the ClipRectsCache use RefPtr<ClipRects>. However, ClipRects
     9        was initialized with m_refCnt=0, not 1 as adoptRef() and friends expect. Also,
     10        there was a manual ref() in RenderLayer::updateClipRects() which this patch removes.
     11
     12        * rendering/RenderLayer.cpp:
     13        (WebCore::RenderLayer::updateClipRects):
     14        * rendering/RenderLayer.h:
     15        (WebCore::ClipRects::ClipRects):
     16
    1172012-06-04  Emil A Eklund  <eae@chromium.org> and Levi Weintraub  <leviw@chromium.org>
    218
  • trunk/Source/WebCore/rendering/RenderLayer.cpp

    r118612 r119458  
    37953795        m_clipRectsCache->m_clipRects[clipRectsType] = ClipRects::create(clipRects);
    37963796
    3797     m_clipRectsCache->m_clipRects[clipRectsType]->ref();
    37983797#ifndef NDEBUG
    37993798    m_clipRectsCache->m_clipRectsRoot[clipRectsType] = rootLayer;
  • trunk/Source/WebCore/rendering/RenderLayer.h

    r118562 r119458  
    141141
    142142    ClipRects()
    143         : m_refCnt(0)
     143        : m_refCnt(1)
    144144        , m_fixed(false)
    145145    {
     
    195195        , m_fixedClipRect(r)
    196196        , m_posClipRect(r)
    197         , m_refCnt(0)
     197        , m_refCnt(1)
    198198        , m_fixed(false)
    199199    {
     
    204204        , m_fixedClipRect(other.fixedClipRect())
    205205        , m_posClipRect(other.posClipRect())
    206         , m_refCnt(0)
     206        , m_refCnt(1)
    207207        , m_fixed(other.fixed())
    208208    {
Note: See TracChangeset for help on using the changeset viewer.