[webkit-changes] [WebKit/WebKit] 570db2: Fix Usage of IOObjects on Mac

Rose noreply at github.com
Mon Feb 13 15:15:28 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 570db2bde74d80b5aba9333e2fff3c835dedd80f
      https://github.com/WebKit/WebKit/commit/570db2bde74d80b5aba9333e2fff3c835dedd80f
  Author: Rose <83477269+AtariDreams at users.noreply.github.com>
  Date:   2023-02-13 (Mon, 13 Feb 2023)

  Changed paths:
    M Source/WTF/wtf/PlatformHave.h
    M Source/WebCore/platform/graphics/mac/GraphicsChecksMac.cpp
    M Tools/DumpRenderTree/mac/LayoutTestHelper.m

  Log Message:
  -----------
  Fix Usage of IOObjects on Mac
https://bugs.webkit.org/show_bug.cgi?id=251859

Reviewed by Brent Fulgham.

IOMasterPort is deprecated, but still used up until Big Sur, so let's
add a check for IOMainPort and then use it if the OS has it.

Additionally, there is an unnecessary retain + release before
IOServiceOpen, so let's remove that.

*Source/WTF/wtf/PlatformHave.h: Add check for IOMainPort
*Source/WebCore/platform/graphics/mac/GraphicsChecksMac.cpp: Rename
masterPort to mainPort and remove pointless initialization. Also remove
unneeded IOObjectRetain and IOObjectRelease calls in the same exact
codepath. Replace calls from IOMasterPort to IOMainPort
*Tools/DumpRenderTree/mac/LayoutTestHelper.m: Rename masterPort to
mainPort. Replace calls from IOMasterPort to IOMainPort

Canonical link: https://commits.webkit.org/260226@main




More information about the webkit-changes mailing list