WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WONTFIX
205036
Allow _WKRemoteObjectRegistry to pass a nil reply block
https://bugs.webkit.org/show_bug.cgi?id=205036
Summary
Allow _WKRemoteObjectRegistry to pass a nil reply block
Alex Christensen
Reported
2019-12-09 16:41:08 PST
Allow _WKRemoteObjectRegistry to pass a nil reply block
Attachments
Patch
(10.40 KB, patch)
2019-12-09 16:42 PST
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Alex Christensen
Comment 1
2019-12-09 16:42:49 PST
Created
attachment 385208
[details]
Patch
Sam Weinig
Comment 2
2019-12-09 19:17:29 PST
Comment on
attachment 385208
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=385208&action=review
> Source/WebKit/ChangeLog:4 > + Allow _WKRemoteObjectRegistry to pass a nil reply block > +
https://bugs.webkit.org/show_bug.cgi?id=205036
Why are you making this change? What advantage is there to supporting nil reply blocks?
Alex Christensen
Comment 3
2019-12-09 21:12:20 PST
Without this change, I either have to have two selectors (one with a completion block, one without), or I have to pass a boolean parameter indicating whether to call the completion block (which results in a wasted IPC). See
rdar://problem/57081053
for why I want an optional reply.
Sam Weinig
Comment 4
2019-12-10 08:35:40 PST
(In reply to Alex Christensen from
comment #3
)
> Without this change, I either have to have two selectors (one with a > completion block, one without), or I have to pass a boolean parameter > indicating whether to call the completion block (which results in a wasted > IPC). See
rdar://problem/57081053
for why I want an optional reply.
I think having a two selectors sounds better. What is the downside to that? Or, alternatively, what would the downside of passing an empty block be?
Sam Weinig
Comment 5
2019-12-10 08:36:55 PST
(In reply to Sam Weinig from
comment #4
)
> (In reply to Alex Christensen from
comment #3
) > > Without this change, I either have to have two selectors (one with a > > completion block, one without), or I have to pass a boolean parameter > > indicating whether to call the completion block (which results in a wasted > > IPC). See
rdar://problem/57081053
for why I want an optional reply. > > I think having a two selectors sounds better. What is the downside to that? > Or, alternatively, what would the downside of passing an empty block be?
Oh, actually, I see the downside of the empty block case, so now I am just curious what the downside of two selectors is?
Alex Christensen
Comment 6
2019-12-10 08:58:57 PST
I think it unnecessarily clutters up the interface. Blocks can be nil everywhere else in the language, why not at this interface? I think this makes remote objects more useable
Sam Weinig
Comment 7
2019-12-10 18:20:43 PST
(In reply to Alex Christensen from
comment #6
)
> I think it unnecessarily clutters up the interface. Blocks can be nil > everywhere else in the language, why not at this interface? I think this > makes remote objects more useable
I don't think that is generally true that nil can be passed everywhere else, but in this case, this SPI is meant to parallel NSXPCConnection, which, does not allow nil blocks, and keeping that consistency seems like a good thing.
Alex Christensen
Comment 8
2019-12-11 10:24:52 PST
Whatever. I'm just adding double selectors for now.
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