Skip to content
Permalink
Browse files
Fix over-retain in SharedBufferCF's createCFData().
<https://webkit.org/b/131139>

Constructing the return type (RetainPtr<CFDataRef>) will also retain
the pointee, so this would end up leaking.

Reviewed by Anders Carlsson.

* platform/cf/SharedBufferCF.cpp:
(WebCore::SharedBuffer::createCFData):

Canonical link: https://commits.webkit.org/149249@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@166751 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Andreas Kling committed Apr 3, 2014
1 parent feee0d1 commit c5e5712e5354c6120cf61567bb0c578bd56742ec
Showing 2 changed files with 15 additions and 4 deletions.
@@ -1,3 +1,16 @@
2014-04-03 Andreas Kling <akling@apple.com>

Fix over-retain in SharedBufferCF's createCFData().
<https://webkit.org/b/131139>

Constructing the return type (RetainPtr<CFDataRef>) will also retain
the pointee, so this would end up leaking.

Reviewed by Anders Carlsson.

* platform/cf/SharedBufferCF.cpp:
(WebCore::SharedBuffer::createCFData):

2014-04-03 Brent Fulgham <bfulgham@apple.com>

[Win] Turn on ENABLE_CSS_GRID_LAYOUT
@@ -54,10 +54,8 @@ SharedBuffer::SharedBuffer(CFDataRef cfData)
#if !USE(FOUNDATION)
RetainPtr<CFDataRef> SharedBuffer::createCFData()
{
if (m_cfData) {
CFRetain(m_cfData.get());
return m_cfData.get();
}
if (m_cfData)
return m_cfData;

// Internal data in SharedBuffer can be segmented. We need to get the contiguous buffer.
const Vector<char>& contiguousBuffer = buffer();

0 comments on commit c5e5712

Please sign in to comment.