• ggaren@apple.com's avatar
    Added an ASSERT to catch an implausible but theoretically possible leak. · dd5604e7
    ggaren@apple.com authored
            
    Reviewed by Dan Bernstein.
    
    In theory, if malloc allocated a UChar buffer directly after a StringImpl,
    the StringImpl might incorrecly assume that the UChar buffer was inline,
    and fail to delete it.
            
    This ASSERT is somewhat academic, since we don't use the same allocator
    in debug builds, but oh well.
    
    * platform/text/StringImpl.cpp:
    (WebCore::StringImpl::StringImpl):
    (WebCore::StringImpl::createUninitialized):
    * platform/text/StringImpl.h: Separated the inline buffer StringImpl
    constructor from the out-of-line buffer StringImpl constructor. Made
    the former ASSERT that its buffer was indeed inline, and the latter ASSERT
    that its buffer was indeed not inline.
    
    
    
    git-svn-id: svn://svn.chromium.org/blink/trunk@54460 bbb929c8-8fbe-4397-9dbb-9b2b20218538
    dd5604e7
ChangeLog 161 KB