Bug 205749

Summary: Crashes under -[WKWebView _addUpdateVisibleContentRectPreCommitHandler]_block_invoke
Product: WebKit Reporter: Tim Horton <thorton>
Component: New BugsAssignee: Tim Horton <thorton>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, commit-queue, simon.fraser, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch thorton: commit-queue+

Description Tim Horton 2020-01-03 14:00:31 PST
Crashes under -[WKWebView _addUpdateVisibleContentRectPreCommitHandler]_block_invoke
Comment 1 Tim Horton 2020-01-03 14:04:16 PST
Created attachment 386714 [details]
Patch
Comment 2 Tim Horton 2020-01-03 14:04:30 PST
<rdar://problem/56433624>
Comment 3 Simon Fraser (smfr) 2020-01-03 14:39:17 PST
Comment on attachment 386714 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=386714&action=review

> Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:3578
> +    RetainPtr<WKContentView> view = retainPtr(self);
> +    RetainPtr<WKWebView> webView = _webView.get();

Undo this part

> Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:6020
> +    [presentingViewController.transitionCoordinator animateAlongsideTransition:nil completion:[weakWebView = WeakObjCPtr<WKWebView>(self.webView), controller = _presentedFullScreenInputViewController] (id <UIViewControllerTransitionCoordinatorContext>) {

Can we just copy the weak ptr?

> Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:6041
> +    [[presentedController transitionCoordinator] animateAlongsideTransition:nil completion:[weakWebView = WeakObjCPtr<WKWebView>(self.webView), controller = presentedController] (id <UIViewControllerTransitionCoordinatorContext>) {

Ditto
Comment 4 Tim Horton 2020-01-03 16:15:02 PST
Created attachment 386725 [details]
Patch
Comment 5 Tim Horton 2020-01-03 17:58:16 PST
https://trac.webkit.org/changeset/254025/webkit