[webkit-changes] [WebKit/WebKit] 96ebc7: [WK2][GLib] Add ArgumentCoder<GRefPtr<GUnixFDList>...

Žan Doberšek noreply at github.com
Sun Nov 6 00:42:40 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 96ebc7619894c35e64d5155eaf81d2963d4bd4a8
      https://github.com/WebKit/WebKit/commit/96ebc7619894c35e64d5155eaf81d2963d4bd4a8
  Author: Žan Doberšek <zdobersek at igalia.com>
  Date:   2022-11-05 (Sat, 05 Nov 2022)

  Changed paths:
    M Source/WebKit/Shared/glib/ArgumentCodersGLib.cpp
    M Source/WebKit/Shared/glib/ArgumentCodersGLib.h
    M Source/WebKit/Shared/glib/UserMessage.cpp

  Log Message:
  -----------
  [WK2][GLib] Add ArgumentCoder<GRefPtr<GUnixFDList>> specialization
https://bugs.webkit.org/show_bug.cgi?id=247522

Reviewed by Michael Catanzaro.

Move encoding and decoding logic for GUnixFDList objects into a separate
ArgumentCoder specialization, removing the logic from the UserMessage
class's encoding and decoding methods.

Nullness of a GRefPtr<GUnixFDList> is preserved, and a file descriptor
leak during decoding is fixed. When encoding, the gathered UnixFileDescriptor
objects should be moved through the encoder to avoid further duplication,
but this will only work later once other specific ArgumentCoder specializations
properly handle rvalues.

* Source/WebKit/Shared/glib/ArgumentCodersGLib.cpp:
(IPC::ArgumentCoder<GRefPtr<GUnixFDList>>::encode):
(IPC::ArgumentCoder<GRefPtr<GUnixFDList>>::decode):
* Source/WebKit/Shared/glib/ArgumentCodersGLib.h:
* Source/WebKit/Shared/glib/UserMessage.cpp:
(WebKit::UserMessage::encode const):
(WebKit::UserMessage::decode):

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




More information about the webkit-changes mailing list