[Unix] Adopt UnixFileDescriptor in IPC::Attachment
Created attachment 456697 [details] Patch
Comment on attachment 456697 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=456697&action=review It seems there's a caller missing in GTK. > Source/WebKit/Platform/IPC/unix/ConnectionUnix.cpp:520 > + if (!!attachments[i].fd()) { I think it's worth adding Attachment::isValid() or isNull() or bool operator
Created attachment 456796 [details] Patch for landing
Comment on attachment 456796 [details] Patch for landing View in context: https://bugs.webkit.org/attachment.cgi?id=456796&action=review > Source/WebKit/Shared/glib/UserMessage.cpp:94 > - if (g_unix_fd_list_append(result.fileDescriptors.get(), attachment.releaseFileDescriptor(), nullptr) == -1) > + if (g_unix_fd_list_append(result.fileDescriptors.get(), attachment.fd().release(), nullptr) == -1) Now that I see this again, I find a bit weird that the returned fd that it's still owned by the attachment can be released. Could we remove the non const getter and make attachment.release().release() instead? or maybe keep the releaseFileDescriptor() method in attachment that returns m_fd.release() instead?
Created attachment 456801 [details] Patch for landing Less getters, more releasing.
Created attachment 456806 [details] Patch for landing Fixed the reviewed-by line.
Comment on attachment 456806 [details] Patch for landing Clearing flags on attachment: 456806 Committed r292458 (249309@trunk): <https://commits.webkit.org/249309@trunk>
All reviewed patches have been landed. Closing bug.
<rdar://problem/91346350>