2007-04-11 Oliver Hunt <oliver@apple.com>
authoroliver <oliver@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 12 Apr 2007 06:42:45 +0000 (06:42 +0000)
committeroliver <oliver@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 12 Apr 2007 06:42:45 +0000 (06:42 +0000)
commit4ed669cfc26b42762f677ae3cc185915f2835853
tree1174b7c51c811e5e3142c77c724e7a6fab48ecba
parent7765d280e936ffc637ee634d52b207fe5503163d
2007-04-11  Oliver Hunt  <oliver@apple.com>

        Reviewed by Maciej.

WebCore:
        Adding RetainPtr to the many global obj-c pointers we use in
        C/C++ methods.  This is necessary to prevent GC from collecting
        globals we want to keep around.

        We use RetainPtr in obj-c++ and c++ files, and CFRetain/Release in pure
        obj-c.

        Also made the Pasteboard::m_pasteboard a RetainPtr although it
        shouldn't be necessary as the only NSPasteboard instances that
        should ever be inserted are the system clipboard and dragging
        pasteboard.  Neither of which should ever be collected.

        * page/mac/WebCoreFrameBridge.mm:
        (_getPreSmartSet):
        (_getPostSmartSet):
        * platform/Pasteboard.h:
        * platform/graphics/mac/ColorMac.mm:
        (WebCore::nsColor):
        * platform/graphics/mac/GraphicsContextMac.mm:
        (WebCore::GraphicsContext::drawLineForMisspellingOrBadGrammar):
        * platform/mac/FontDataMac.mm:
        (WebCore::webFallbackFontFamily):
        * platform/mac/PasteboardMac.mm:
        (WebCore::writableTypesForURL):
        (WebCore::writableTypesForImage):
        (WebCore::Pasteboard::clear):
        (WebCore::Pasteboard::writeSelection):
        (WebCore::Pasteboard::writeURL):
        (WebCore::Pasteboard::writeFileWrapperAsRTFDAttachment):
        (WebCore::Pasteboard::writeImage):
        (WebCore::Pasteboard::canSmartReplace):
        (WebCore::Pasteboard::plainText):
        (WebCore::Pasteboard::documentFragment):

WebKit:
        Adding RetainPtr to the many global obj-c pointers we use in
        C/C++ methods.  This is necessary to prevent GC from collecting
        globals we want to keep around.

        We use RetainPtr in obj-c++ and c++ files, and CFRetain/Release in pure
        obj-c.

        This fixes <rdar://problem/5058731> -- Crash in
        WebCore::DragData::containsCompatibleContent due to early release
        of types array

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@20858 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
WebCore/ChangeLog
WebCore/page/mac/WebCoreFrameBridge.mm
WebCore/platform/Pasteboard.h
WebCore/platform/graphics/mac/ColorMac.mm
WebCore/platform/graphics/mac/GraphicsContextMac.mm
WebCore/platform/mac/FontDataMac.mm
WebCore/platform/mac/PasteboardMac.mm
WebKit/ChangeLog
WebKit/Misc/WebLocalizableStrings.m
WebKit/Misc/WebNSPasteboardExtras.mm
WebKit/Misc/WebNSURLExtras.m
WebKit/Misc/WebStringTruncator.m
WebKit/WebCoreSupport/WebPasteboardHelper.mm