Bug 207929 - [iOS] Safari sometimes crashes under ViewGestureController::beginSwipeGesture
Summary: [iOS] Safari sometimes crashes under ViewGestureController::beginSwipeGesture
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Wenson Hsieh
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-02-18 21:43 PST by Wenson Hsieh
Modified: 2020-02-19 12:05 PST (History)
6 users (show)

See Also:


Attachments
Patch (2.58 KB, patch)
2020-02-18 22:26 PST, Wenson Hsieh
no flags Details | Formatted Diff | Diff
Patch (3.82 KB, patch)
2020-02-19 08:01 PST, Wenson Hsieh
no flags Details | Formatted Diff | Diff
With logging (3.96 KB, patch)
2020-02-19 08:58 PST, Wenson Hsieh
thorton: review+
commit-queue: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Wenson Hsieh 2020-02-18 21:43:22 PST
<rdar://problem/59493326>
Comment 1 Wenson Hsieh 2020-02-18 22:26:46 PST Comment hidden (obsolete)
Comment 2 Tim Horton 2020-02-18 22:50:03 PST
Please make sure that the SPI notifications are all called (and layer tree unfreeze, etc.)
Comment 3 Wenson Hsieh 2020-02-19 07:49:43 PST
(In reply to Tim Horton from comment #2)
> Please make sure that the SPI notifications are all called (and layer tree
> unfreeze, etc.)

Good point! With my first patch, -_webViewDidBeginNavigationGesture: could get called before bailing from the null check, which would lead to imbalanced SPI delegate calls (to be fair, only in the case where we would otherwise crash the UI process).

Another approach I tried initially was to move the null check before the didBegin call, such that the delegate would never need to be notified in the first place. I avoided this out of compat fear (i.e. the case where a client could depend on being able to adjust the back/forward list right before we proceed with the swipe).

I think I’ll go for this original approach again, and double check to see if any of our clients actually take advantage of this functionality.
Comment 4 Wenson Hsieh 2020-02-19 08:01:43 PST Comment hidden (obsolete)
Comment 5 Wenson Hsieh 2020-02-19 08:58:30 PST
Created attachment 391167 [details]
With logging
Comment 6 WebKit Commit Bot 2020-02-19 12:02:07 PST Comment hidden (obsolete)
Comment 7 Wenson Hsieh 2020-02-19 12:05:03 PST
Committed r256933: <https://trac.webkit.org/changeset/256933>