Null deref in userInterfaceLayoutDirection under ViewGestureController::handleSwipeGe...
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 13 Feb 2019 07:36:30 +0000 (07:36 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 13 Feb 2019 07:36:30 +0000 (07:36 +0000)
commit0df94b3a2a4afbdfb5be92a4e23dec3003d08cf7
tree6f68632d468fd316aa7e11c57d241164db7ef41e
parentd1d11cee6df6537a567880bbb57db8f2e548a4a5
Null deref in userInterfaceLayoutDirection under ViewGestureController::handleSwipeGesture
https://bugs.webkit.org/show_bug.cgi?id=194569
<rdar://problem/46711049>

Reviewed by Wenson Hsieh.

* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::handleSwipeGesture):
It is conceivable that we could get here if the client closes the page
e.g. in the callback from willEndSwipeGesture. We already guarded against
this ... one line too late! Rearrange the lines so we don't call into
WebPageProxy at all if we don't have a drawing area (which is a strict subset
of the time that isValid would return true). This is a speculative fix,
since I can no longer reproduce the crash on demand.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@241349 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/mac/ViewGestureControllerMac.mm