Title: [266607] trunk/Source/WebKit
Revision
266607
Author
wenson_hs...@apple.com
Date
2020-09-04 07:57:24 -0700 (Fri, 04 Sep 2020)

Log Message

[macOS] UI process sometimes crashes under -[WKSharingServicePickerDelegate sharingService:didShareItems:]
https://bugs.webkit.org/show_bug.cgi?id=216167
<rdar://problem/68287449>

Reviewed by Anders Carlsson.

It's not clear what causes the array of items in this delegate method to be empty, but we should at least be
robust against this scenario and avoid crashing the application process.

* UIProcess/mac/WKSharingServicePickerDelegate.mm:
(-[WKSharingServicePickerDelegate sharingService:didShareItems:]):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (266606 => 266607)


--- trunk/Source/WebKit/ChangeLog	2020-09-04 14:43:10 UTC (rev 266606)
+++ trunk/Source/WebKit/ChangeLog	2020-09-04 14:57:24 UTC (rev 266607)
@@ -1,3 +1,17 @@
+2020-09-04  Wenson Hsieh  <wenson_hs...@apple.com>
+
+        [macOS] UI process sometimes crashes under -[WKSharingServicePickerDelegate sharingService:didShareItems:]
+        https://bugs.webkit.org/show_bug.cgi?id=216167
+        <rdar://problem/68287449>
+
+        Reviewed by Anders Carlsson.
+
+        It's not clear what causes the array of items in this delegate method to be empty, but we should at least be
+        robust against this scenario and avoid crashing the application process.
+
+        * UIProcess/mac/WKSharingServicePickerDelegate.mm:
+        (-[WKSharingServicePickerDelegate sharingService:didShareItems:]):
+
 2020-09-04  Kate Cheney  <katherine_che...@apple.com>
 
         WebProcessProxy::checkURLReceivedFromWebProcess() does not always need to check the back/forward list

Modified: trunk/Source/WebKit/UIProcess/mac/WKSharingServicePickerDelegate.mm (266606 => 266607)


--- trunk/Source/WebKit/UIProcess/mac/WKSharingServicePickerDelegate.mm	2020-09-04 14:43:10 UTC (rev 266606)
+++ trunk/Source/WebKit/UIProcess/mac/WKSharingServicePickerDelegate.mm	2020-09-04 14:57:24 UTC (rev 266607)
@@ -102,6 +102,9 @@
     if (!_handleEditingReplacement)
         return;
 
+    if (!items.count)
+        return;
+
     Vector<String> types;
     IPC::DataReference dataReference;
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to