WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 238801
[Unix] Adopt UnixFileDescriptor in IPC::Attachment
https://bugs.webkit.org/show_bug.cgi?id=238801
Summary
[Unix] Adopt UnixFileDescriptor in IPC::Attachment
Zan Dobersek
Reported
2022-04-05 06:06:53 PDT
[Unix] Adopt UnixFileDescriptor in IPC::Attachment
Attachments
Patch
(22.14 KB, patch)
2022-04-05 06:08 PDT
,
Zan Dobersek
no flags
Details
Formatted Diff
Diff
Patch for landing
(22.30 KB, patch)
2022-04-06 02:42 PDT
,
Zan Dobersek
no flags
Details
Formatted Diff
Diff
Patch for landing
(22.24 KB, patch)
2022-04-06 04:01 PDT
,
Zan Dobersek
no flags
Details
Formatted Diff
Diff
Patch for landing
(22.25 KB, patch)
2022-04-06 04:14 PDT
,
Zan Dobersek
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Zan Dobersek
Comment 1
2022-04-05 06:08:16 PDT
Created
attachment 456697
[details]
Patch
Carlos Garcia Campos
Comment 2
2022-04-06 00:39:12 PDT
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
Zan Dobersek
Comment 3
2022-04-06 02:42:06 PDT
Created
attachment 456796
[details]
Patch for landing
Carlos Garcia Campos
Comment 4
2022-04-06 03:35:19 PDT
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?
Zan Dobersek
Comment 5
2022-04-06 04:01:01 PDT
Created
attachment 456801
[details]
Patch for landing Less getters, more releasing.
Zan Dobersek
Comment 6
2022-04-06 04:14:33 PDT
Created
attachment 456806
[details]
Patch for landing Fixed the reviewed-by line.
Zan Dobersek (Reviews)
Comment 7
2022-04-06 04:16:38 PDT
Comment on
attachment 456806
[details]
Patch for landing Clearing flags on attachment: 456806 Committed
r292458
(
249309@trunk
): <
https://commits.webkit.org/249309@trunk
>
Zan Dobersek (Reviews)
Comment 8
2022-04-06 04:16:43 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 9
2022-04-06 04:17:16 PDT
<
rdar://problem/91346350
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug