Changeset 247134 in webkit


Ignore:
Timestamp:
Jul 3, 2019 8:39:48 PM (5 years ago)
Author:
rniwa@webkit.org
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):

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r247132 r247134  
     12019-07-03  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        Crash in WebDragClient::startDrag because GraphicsContext is nullptr
     4        https://bugs.webkit.org/show_bug.cgi?id=199491
     5
     6        Reviewed by Wenson Hsieh.
     7
     8        Added a nullptr check.
     9
     10        Unfortunately no new tests since we don't have a reproducible test case.
     11
     12        * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
     13        (WebKit::convertImageToBitmap):
     14
    1152019-07-03  Tim Horton  <timothy_horton@apple.com>
    216
  • trunk/Source/WebKit/WebProcess/WebCoreSupport/mac/WebDragClientMac.mm

    r244955 r247134  
    7070
    7171    auto graphicsContext = bitmap->createGraphicsContext();
     72    if (!graphicsContext)
     73        return nullptr;
    7274
    7375    RetainPtr<NSGraphicsContext> savedContext = [NSGraphicsContext currentContext];
Note: See TracChangeset for help on using the changeset viewer.