Bug 205749 - Crashes under -[WKWebView _addUpdateVisibleContentRectPreCommitHandler]_block_invoke
Summary: Crashes under -[WKWebView _addUpdateVisibleContentRectPreCommitHandler]_block...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tim Horton
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-01-03 14:00 PST by Tim Horton
Modified: 2020-01-03 17:58 PST (History)
4 users (show)

See Also:


Attachments
Patch (74.27 KB, patch)
2020-01-03 14:04 PST, Tim Horton
no flags Details | Formatted Diff | Diff
Patch (72.35 KB, patch)
2020-01-03 16:15 PST, Tim Horton
thorton: commit-queue+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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