Title: [254769] trunk/Source/WebKit
Revision
254769
Author
[email protected]
Date
2020-01-17 15:35:43 -0800 (Fri, 17 Jan 2020)

Log Message

[iOS] ASSERTION FAILED: ASSERT_NOT_REACHED() in selectionChangedWithTouch(WKContentView*, WebCore::IntPoint const&, unsigned int, unsigned int, WebKit::CallbackBase::Error)
https://bugs.webkit.org/show_bug.cgi?id=206427

Reviewed by Wenson Hsieh.

Remove ASSERT_NOT_REACHED() usage in callbacks selectionChangedWithTouch() and selectionChangedWithGesture().
These callbacks can handle being- and should expect to sometimes be- invoked with a non-None error value.
In particular, if the WebProcess crashes then these callbacks will be invoked with error CallbackBase::Error::ProcessExited.

* UIProcess/ios/WKContentViewInteraction.mm:
(selectionChangedWithGesture): Remove ASSERT_NOT_REACHED() when an error occurs. This
function is capable of handling this error.
(selectionChangedWithTouch): Ditto.

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (254768 => 254769)


--- trunk/Source/WebKit/ChangeLog	2020-01-17 23:02:39 UTC (rev 254768)
+++ trunk/Source/WebKit/ChangeLog	2020-01-17 23:35:43 UTC (rev 254769)
@@ -1,3 +1,19 @@
+2020-01-17  Daniel Bates  <[email protected]>
+
+        [iOS] ASSERTION FAILED: ASSERT_NOT_REACHED() in selectionChangedWithTouch(WKContentView*, WebCore::IntPoint const&, unsigned int, unsigned int, WebKit::CallbackBase::Error)
+        https://bugs.webkit.org/show_bug.cgi?id=206427
+
+        Reviewed by Wenson Hsieh.
+
+        Remove ASSERT_NOT_REACHED() usage in callbacks selectionChangedWithTouch() and selectionChangedWithGesture().
+        These callbacks can handle being- and should expect to sometimes be- invoked with a non-None error value.
+        In particular, if the WebProcess crashes then these callbacks will be invoked with error CallbackBase::Error::ProcessExited.
+
+        * UIProcess/ios/WKContentViewInteraction.mm:
+        (selectionChangedWithGesture): Remove ASSERT_NOT_REACHED() when an error occurs. This
+        function is capable of handling this error.
+        (selectionChangedWithTouch): Ditto.
+
 2020-01-17  Brent Fulgham  <[email protected]>
 
         [iOS] Remove the IOHIDEventServiceFastPathUserClient IOKit class

Modified: trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm (254768 => 254769)


--- trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm	2020-01-17 23:02:39 UTC (rev 254768)
+++ trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm	2020-01-17 23:35:43 UTC (rev 254769)
@@ -3858,19 +3858,15 @@
 
 static void selectionChangedWithGesture(WKContentView *view, const WebCore::IntPoint& point, uint32_t gestureType, uint32_t gestureState, uint32_t flags, WebKit::CallbackBase::Error error)
 {
-    if (error != WebKit::CallbackBase::Error::None) {
-        ASSERT_NOT_REACHED();
+    if (error != WebKit::CallbackBase::Error::None)
         return;
-    }
     [(UIWKTextInteractionAssistant *)[view interactionAssistant] selectionChangedWithGestureAt:(CGPoint)point withGesture:toUIWKGestureType((WebKit::GestureType)gestureType) withState:toUIGestureRecognizerState(static_cast<WebKit::GestureRecognizerState>(gestureState)) withFlags:(toUIWKSelectionFlags((WebKit::SelectionFlags)flags))];
 }
 
 static void selectionChangedWithTouch(WKContentView *view, const WebCore::IntPoint& point, uint32_t touch, uint32_t flags, WebKit::CallbackBase::Error error)
 {
-    if (error != WebKit::CallbackBase::Error::None) {
-        ASSERT_NOT_REACHED();
+    if (error != WebKit::CallbackBase::Error::None)
         return;
-    }
     [(UIWKTextInteractionAssistant *)[view interactionAssistant] selectionChangedWithTouchAt:(CGPoint)point withSelectionTouch:toUIWKSelectionTouch((WebKit::SelectionTouch)touch) withFlags:static_cast<UIWKSelectionFlags>(flags)];
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to