Certain PDF files can cause a crash under allScriptsInPDFDocument() in WebPDFDocumentExtras.mm. Sample crash log: 1 com.apple.CoreFoundation 0x7fff8df5da72 CFDataGetBytePtr + 0x12 (CFInternal.h:602) 2 com.apple.WebKit 0x7fff95670cb7 allScriptsInPDFDocument(PDFDocument*) + 0x167 (WebPDFDocumentExtras.mm:115) 3 com.apple.WebKit 0x7fff95670793 -[WebPDFRepresentation finishedLoadingWithDataSource:] + 0x143 (WebPDFRepresentation.mm:129) 4 com.apple.WebCore 0x7fff93e1b6ec WebCore::FrameLoader::finishedLoadingDocument(WebCore::DocumentLoader*) + 0x30 (FrameLoader.cpp:2732) 5 com.apple.WebCore 0x7fff93e18538 WebCore::DocumentLoader::finishedLoading() + 0x38 (DocumentLoader.cpp:267) 6 com.apple.WebCore 0x7fff93eac292 WebCore::FrameLoader::finishedLoading() + 0x48 (ResourceErrorBase.h:40) 7 com.apple.WebCore 0x7fff93eac1ad WebCore::MainResourceLoader::didFinishLoading() + 0x2f (MainResourceLoader.cpp:424)
<rdar://problem/8105430>
Created attachment 60943 [details] Proposed patch
Committed revision 62835.