Skip to content
  • andersca@apple.com's avatar
    Add a new smart pointer type for fastMalloc'ed memory · fb72153f
    andersca@apple.com authored
    https://bugs.webkit.org/show_bug.cgi?id=120911
    
    Reviewed by Andreas Kling.
    
    Source/WebCore:
    
    Update for WTF changes.
    
    * platform/network/cf/FormDataStreamCFNet.cpp:
    (WebCore::advanceCurrentStream):
    
    Source/WTF:
    
    Due to an oversight on my part, Vector::releaseBuffer() currently returns an OwnPtr
    which means that its data will be freed with operator delete instead of fastFree.
    
    Fix this by introducing a new MllocPtr smart pointer class and change Vector::releaseBuffer() to return it instead.
    
    * WTF.pro:
    * WTF.vcxproj/WTF.vcxproj:
    * WTF.vcxproj/WTF.vcxproj.filters:
    * WTF.xcodeproj/project.pbxproj:
    * wtf/CMakeLists.txt:
    * wtf/FastAllocBase.h:
    * wtf/MallocPtr.h: Added.
    * wtf/Vector.h:
    * wtf/text/StringBuffer.h:
    * wtf/text/StringImpl.h:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155242 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    fb72153f