Frequent crash under -[WKPDFView web_setMinimumSize:]_block_invoke
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 14 Dec 2015 22:12:02 +0000 (22:12 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 14 Dec 2015 22:12:02 +0000 (22:12 +0000)
commit745ee390d43007b45166a90dc87a81e860f8cfbc
tree90f263e1f8d4b838e8a2d424c41daa92764b752f
parent2e19607b6014b298514dd14b1b79592c73e55a30
Frequent crash under -[WKPDFView web_setMinimumSize:]_block_invoke
https://bugs.webkit.org/show_bug.cgi?id=152266
<rdar://problem/22092676>

Reviewed by Simon Fraser.

Source/WebKit2:

* UIProcess/ios/WKPDFView.mm:
(-[WKPDFView web_setMinimumSize:]):
We weren't retaining the UIScrollView, but depending on it surviving
into this block's invocation.

We don't need to do this asynchronously anymore because the referenced
bug is fixed, so make it happen synchronously. This also fixes the crash
because there's no opportunity for the scroll view to be released.

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2Cocoa/WKPDFViewResizeCrash.mm: Added.
Add a test that crashed before this change, and doesn't crash after.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@194060 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/ios/WKPDFView.mm
Tools/ChangeLog
Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
Tools/TestWebKitAPI/Tests/WebKit2Cocoa/WKPDFViewResizeCrash.mm [new file with mode: 0644]