Title: [216080] trunk/Source/WebKit2
Revision
216080
Author
aes...@apple.com
Date
2017-05-02 11:43:33 -0700 (Tue, 02 May 2017)

Log Message

REGRESSION (r213036): Crash in -[WKContentView _webTouchEventsRecognized:] when a touch event arrives after a WebPageProxy has been invalidated
https://bugs.webkit.org/show_bug.cgi?id=171539
<rdar://problem/31614982>

Reviewed by Tim Horton.

Prior to r213036, the layer tree transaction at last touch start was tracked by
WebPageProxy::handleTouchEventSynchronously(), which would ask the drawing area proxy for
its most recent transaction ID after ensuring that the WebPageProxy was valid.

r213036 moved the tracking up to -[WKContentView _webTouchEventsRecognized:], but failed to
check if _page was valid before asking for its drawing area proxy's last transaction ID; the
drawing area proxy is set to null on WebPageProxy invalidation.

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _webTouchEventsRecognized:]): Added an early return if _page isn't valid.

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (216079 => 216080)


--- trunk/Source/WebKit2/ChangeLog	2017-05-02 18:02:50 UTC (rev 216079)
+++ trunk/Source/WebKit2/ChangeLog	2017-05-02 18:43:33 UTC (rev 216080)
@@ -1,3 +1,22 @@
+2017-05-02  Andy Estes  <aes...@apple.com>
+
+        REGRESSION (r213036): Crash in -[WKContentView _webTouchEventsRecognized:] when a touch event arrives after a WebPageProxy has been invalidated
+        https://bugs.webkit.org/show_bug.cgi?id=171539
+        <rdar://problem/31614982>
+
+        Reviewed by Tim Horton.
+
+        Prior to r213036, the layer tree transaction at last touch start was tracked by
+        WebPageProxy::handleTouchEventSynchronously(), which would ask the drawing area proxy for
+        its most recent transaction ID after ensuring that the WebPageProxy was valid.
+
+        r213036 moved the tracking up to -[WKContentView _webTouchEventsRecognized:], but failed to
+        check if _page was valid before asking for its drawing area proxy's last transaction ID; the
+        drawing area proxy is set to null on WebPageProxy invalidation.
+
+        * UIProcess/ios/WKContentViewInteraction.mm:
+        (-[WKContentView _webTouchEventsRecognized:]): Added an early return if _page isn't valid.
+
 2017-05-02  Carlos Garcia Campos  <cgar...@igalia.com>
 
         Web Automation: generate resizeWindowOfBrowsingContext and moveWindowOfBrowsingContext for all platforms

Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm (216079 => 216080)


--- trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm	2017-05-02 18:02:50 UTC (rev 216079)
+++ trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm	2017-05-02 18:43:33 UTC (rev 216080)
@@ -878,6 +878,9 @@
 
 - (void)_webTouchEventsRecognized:(UIWebTouchEventsGestureRecognizer *)gestureRecognizer
 {
+    if (!_page->isValid())
+        return;
+
     const _UIWebTouchEvent* lastTouchEvent = gestureRecognizer.lastTouchEvent;
 
     _lastInteractionLocation = lastTouchEvent->locationInDocumentCoordinates;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to