Changeset 259505 in webkit


Ignore:
Timestamp:
Apr 3, 2020 1:13:41 PM (4 years ago)
Author:
ddkilzer@apple.com
Message:

[Cocoa] Update MESSAGE_CHECK macros used in WebProcessProxy::didCreateSleepDisabler/WebProcessProxy::didDestroySleepDisabler
<https://webkit.org/b/209981>
<rdar://problem/61237674>

Reviewed by Darin Adler.

  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::didCreateSleepDisabler):

  • Remove MESSAGE_CHECK for identifier since decoding detects invalid values.
  • Add MESSAGE_CHECK for reason since a NULL string would cause CFStringCreateWithCString() to crash later.

(WebKit::WebProcessProxy::didDestroySleepDisabler):

  • Remove MESSAGE_CHECK for identifier since decoding detects invalid values.
Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r259476 r259505  
     12020-04-03  David Kilzer  <ddkilzer@apple.com>
     2
     3        [Cocoa] Update MESSAGE_CHECK macros used in WebProcessProxy::didCreateSleepDisabler/WebProcessProxy::didDestroySleepDisabler
     4        <https://webkit.org/b/209981>
     5        <rdar://problem/61237674>
     6
     7        Reviewed by Darin Adler.
     8
     9        * UIProcess/WebProcessProxy.cpp:
     10        (WebKit::WebProcessProxy::didCreateSleepDisabler):
     11        - Remove MESSAGE_CHECK for `identifier` since decoding detects
     12          invalid values.
     13        - Add MESSAGE_CHECK for `reason` since a NULL string would cause
     14          CFStringCreateWithCString() to crash later.
     15        (WebKit::WebProcessProxy::didDestroySleepDisabler):
     16        - Remove MESSAGE_CHECK for `identifier` since decoding detects
     17          invalid values.
     18
    1192020-04-03  Megan Gardner  <megan_gardner@apple.com>
    220
  • trunk/Source/WebKit/UIProcess/WebProcessProxy.cpp

    r259307 r259505  
    17831783void WebProcessProxy::didCreateSleepDisabler(SleepDisablerIdentifier identifier, const String& reason, bool display)
    17841784{
    1785     MESSAGE_CHECK(identifier);
     1785    MESSAGE_CHECK(!reason.isNull());
    17861786    auto sleepDisabler = makeUnique<WebCore::SleepDisabler>(reason.utf8().data(), display ? PAL::SleepDisabler::Type::Display : PAL::SleepDisabler::Type::System);
    17871787    m_sleepDisablers.add(identifier, WTFMove(sleepDisabler));
     
    17901790void WebProcessProxy::didDestroySleepDisabler(SleepDisablerIdentifier identifier)
    17911791{
    1792     MESSAGE_CHECK(identifier);
    17931792    m_sleepDisablers.remove(identifier);
    17941793}
Note: See TracChangeset for help on using the changeset viewer.