-
oliver authored
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: http://svn.webkit.org/repository/webkit/trunk@20858 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1c8776d9