Title: [247134] trunk/Source/WebKit
Revision
247134
Author
rn...@webkit.org
Date
2019-07-03 20:39:48 -0700 (Wed, 03 Jul 2019)

Log Message

Crash in WebDragClient::startDrag because GraphicsContext is nullptr
https://bugs.webkit.org/show_bug.cgi?id=199491

Reviewed by Wenson Hsieh.

Added a nullptr check.

Unfortunately no new tests since we don't have a reproducible test case.

* WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
(WebKit::convertImageToBitmap):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (247133 => 247134)


--- trunk/Source/WebKit/ChangeLog	2019-07-04 03:23:39 UTC (rev 247133)
+++ trunk/Source/WebKit/ChangeLog	2019-07-04 03:39:48 UTC (rev 247134)
@@ -1,3 +1,17 @@
+2019-07-03  Ryosuke Niwa  <rn...@webkit.org>
+
+        Crash in WebDragClient::startDrag because GraphicsContext is nullptr
+        https://bugs.webkit.org/show_bug.cgi?id=199491
+
+        Reviewed by Wenson Hsieh.
+
+        Added a nullptr check.
+
+        Unfortunately no new tests since we don't have a reproducible test case.
+
+        * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
+        (WebKit::convertImageToBitmap):
+
 2019-07-03  Tim Horton  <timothy_hor...@apple.com>
 
         Data Detectors are not working for context menus in clients that use the legacy preview API

Modified: trunk/Source/WebKit/WebProcess/WebCoreSupport/mac/WebDragClientMac.mm (247133 => 247134)


--- trunk/Source/WebKit/WebProcess/WebCoreSupport/mac/WebDragClientMac.mm	2019-07-04 03:23:39 UTC (rev 247133)
+++ trunk/Source/WebKit/WebProcess/WebCoreSupport/mac/WebDragClientMac.mm	2019-07-04 03:39:48 UTC (rev 247134)
@@ -69,6 +69,8 @@
         return nullptr;
 
     auto graphicsContext = bitmap->createGraphicsContext();
+    if (!graphicsContext)
+        return nullptr;
 
     RetainPtr<NSGraphicsContext> savedContext = [NSGraphicsContext currentContext];
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to