Title: [285976] trunk/Source/WebKit
- Revision
- 285976
- Author
- [email protected]
- Date
- 2021-11-17 19:54:56 -0800 (Wed, 17 Nov 2021)
Log Message
Protect against null SharedBitmaps when starting a drag
https://bugs.webkit.org/show_bug.cgi?id=233217
<rdar://problem/85478309>
Reviewed by Wenson Hsieh.
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::startDrag):
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (285975 => 285976)
--- trunk/Source/WebKit/ChangeLog 2021-11-18 03:46:53 UTC (rev 285975)
+++ trunk/Source/WebKit/ChangeLog 2021-11-18 03:54:56 UTC (rev 285976)
@@ -1,3 +1,14 @@
+2021-11-17 Cameron McCormack <[email protected]>
+
+ Protect against null SharedBitmaps when starting a drag
+ https://bugs.webkit.org/show_bug.cgi?id=233217
+ <rdar://problem/85478309>
+
+ Reviewed by Wenson Hsieh.
+
+ * UIProcess/ios/PageClientImplIOS.mm:
+ (WebKit::PageClientImpl::startDrag):
+
2021-11-17 Wenson Hsieh <[email protected]>
[Live Text] Plumb an identifier string through `ChromeClient::requestTextRecognition()`
Modified: trunk/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm (285975 => 285976)
--- trunk/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm 2021-11-18 03:46:53 UTC (rev 285975)
+++ trunk/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm 2021-11-18 03:54:56 UTC (rev 285976)
@@ -910,7 +910,10 @@
void PageClientImpl::startDrag(const DragItem& item, const ShareableBitmap::Handle& image)
{
- [m_contentView _startDrag:ShareableBitmap::create(image)->makeCGImageCopy() item:item];
+ auto bitmap = ShareableBitmap::create(image);
+ if (!bitmap)
+ return;
+ [m_contentView _startDrag:bitmap->makeCGImageCopy() item:item];
}
void PageClientImpl::willReceiveEditDragSnapshot()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes