Title: [248725] branches/safari-608-branch/Source/WebKit
Revision
248725
Author
alanc...@apple.com
Date
2019-08-15 10:20:59 -0700 (Thu, 15 Aug 2019)

Log Message

Cherry-pick r248690. rdar://problem/54333950

    v3: CrashTracer: Regression : MobileSafari at UIKitCore: -[UITargetedPreview initWithView:parameters:]
    https://bugs.webkit.org/show_bug.cgi?id=200634

    Patch by Luming Yin <luming_...@apple.com> on 2019-08-14
    Reviewed by Simon Fraser.

    Under rare race conditions, the WKContentView may no longer have an associated window. However,
    UIContextMenuInteraction may still attempt initialize a UITargetedPreview with the orphaned
    WKContentView. Speculative fix for crashes under such scenarios, so that we can continue without
    a context menu configuration to prevent the UIKit exception.

    * UIProcess/ios/WKContentViewInteraction.mm:
    (-[WKContentView continueContextMenuInteraction:]):

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248690 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Diff

Modified: branches/safari-608-branch/Source/WebKit/ChangeLog (248724 => 248725)


--- branches/safari-608-branch/Source/WebKit/ChangeLog	2019-08-15 17:20:57 UTC (rev 248724)
+++ branches/safari-608-branch/Source/WebKit/ChangeLog	2019-08-15 17:20:59 UTC (rev 248725)
@@ -1,3 +1,38 @@
+2019-08-15  Alan Coon  <alanc...@apple.com>
+
+        Cherry-pick r248690. rdar://problem/54333950
+
+    v3: CrashTracer: Regression : MobileSafari at UIKitCore: -[UITargetedPreview initWithView:parameters:]
+    https://bugs.webkit.org/show_bug.cgi?id=200634
+    
+    Patch by Luming Yin <luming_...@apple.com> on 2019-08-14
+    Reviewed by Simon Fraser.
+    
+    Under rare race conditions, the WKContentView may no longer have an associated window. However,
+    UIContextMenuInteraction may still attempt initialize a UITargetedPreview with the orphaned
+    WKContentView. Speculative fix for crashes under such scenarios, so that we can continue without
+    a context menu configuration to prevent the UIKit exception.
+    
+    * UIProcess/ios/WKContentViewInteraction.mm:
+    (-[WKContentView continueContextMenuInteraction:]):
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248690 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2019-08-14  Luming Yin  <luming_...@apple.com>
+
+            v3: CrashTracer: Regression : MobileSafari at UIKitCore: -[UITargetedPreview initWithView:parameters:]
+            https://bugs.webkit.org/show_bug.cgi?id=200634
+
+            Reviewed by Simon Fraser.
+
+            Under rare race conditions, the WKContentView may no longer have an associated window. However,
+            UIContextMenuInteraction may still attempt initialize a UITargetedPreview with the orphaned
+            WKContentView. Speculative fix for crashes under such scenarios, so that we can continue without
+            a context menu configuration to prevent the UIKit exception.
+
+            * UIProcess/ios/WKContentViewInteraction.mm:
+            (-[WKContentView continueContextMenuInteraction:]):
+
 2019-08-13  Alan Coon  <alanc...@apple.com>
 
         Cherry-pick r248634. rdar://problem/54282811

Modified: branches/safari-608-branch/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm (248724 => 248725)


--- branches/safari-608-branch/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm	2019-08-15 17:20:57 UTC (rev 248724)
+++ branches/safari-608-branch/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm	2019-08-15 17:20:59 UTC (rev 248725)
@@ -7934,6 +7934,9 @@
 
 - (void)continueContextMenuInteraction:(void(^)(UIContextMenuConfiguration *))continueWithContextMenuConfiguration
 {
+    if (!self.window)
+        return continueWithContextMenuConfiguration(nil);
+
     if (!_positionInformation.touchCalloutEnabled)
         return continueWithContextMenuConfiguration(nil);
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to