Bug 207929

Summary: [iOS] Safari sometimes crashes under ViewGestureController::beginSwipeGesture
Product: WebKit Reporter: Wenson Hsieh <wenson_hsieh>
Component: WebKit2Assignee: Wenson Hsieh <wenson_hsieh>
Status: RESOLVED FIXED    
Severity: Normal CC: bdakin, cdumez, commit-queue, ddkilzer, thorton, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
With logging thorton: review+, commit-queue: commit-queue-

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>