-
andersca@apple.com authored
https://bugs.webkit.org/show_bug.cgi?id=121237 Reviewed by Darin Adler. Source/WebCore: This makes memory management cleared and fixes a leak in PDFDocumentImage::createPDFDocument. We use a RetainPtr subclass as a stopgap measure to prevent code that does [buffer->createNSData() autorelease] from compiling and crashing due to the NSData object being overreleased. * loader/ResourceBuffer.h: * loader/mac/ResourceBuffer.mm: (WebCore::ResourceBuffer::createNSData): * platform/SharedBuffer.h: (WebCore::SharedBuffer::NSDataRetainPtr::NSDataRetainPtr): * platform/graphics/mac/PDFDocumentImageMac.mm: (WebCore::PDFDocumentImage::createPDFDocument): * platform/mac/HTMLConverter.mm: (-[WebHTMLConverter _addAttachmentForElement:URL:needsParagraph:usePlaceholder:]): (fileWrapperForURL): * platform/mac/PasteboardMac.mm: (WebCore::fileWrapper): (WebCore::Pasteboard::read): (WebCore::documentFragmentWithRTF): (WebCore::fragmentFromWebArchive): * platform/mac/PlatformPasteboardMac.mm: (WebCore::PlatformPasteboard::setBufferForType): * platform/mac/SharedBufferMac.mm: (WebCore::SharedBuffer::createNSData): Source/WebKit/mac: Update for WebCore changes. This also fixes a leak where we'd create an NSFileWrapper from NSData but never release the data. * WebView/WebDataSource.mm: (-[WebDataSource data]): * WebView/WebHTMLRepresentation.mm: (-[WebHTMLRepresentation documentSource]): * WebView/WebHTMLView.mm: (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]): * WebView/WebResource.mm: (-[WebResource encodeWithCoder:]): (-[WebResource data]): Source/WebKit2: Update for WebCore changes. * UIProcess/API/mac/WKView.mm: (-[WKView writeSelectionToPasteboard:types:]): (-[WKView _setPromisedData:WebCore::withFileName:withExtension:withTitle:withURL:withVisibleURL:withArchive:WebCore::forPasteboard:]): (-[WKView namesOfPromisedFilesDroppedAtDestination:]): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155641 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ac6917cd