WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
235730
Begin using coroutines in testing code
https://bugs.webkit.org/show_bug.cgi?id=235730
Summary
Begin using coroutines in testing code
Alex Christensen
Reported
2022-01-27 13:27:16 PST
Begin using coroutines in testing code
Attachments
Patch
(8.02 KB, patch)
2022-01-27 13:29 PST
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
Patch
(8.74 KB, patch)
2022-05-18 13:17 PDT
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
Patch
(8.88 KB, patch)
2022-05-18 13:31 PDT
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Alex Christensen
Comment 1
2022-01-27 13:29:09 PST
Created
attachment 450171
[details]
Patch
Darin Adler
Comment 2
2022-01-30 23:14:03 PST
Comment on
attachment 450171
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=450171&action=review
> Tools/TestWebKitAPI/cocoa/HTTPServer.h:65 > + enum class UseCoroutines : bool { Yes }; > + HTTPServer(UseCoroutines, Function<CoroutineHandle(Connection)>&&, Protocol = Protocol::Http);
I don’t think we need this UseCoroutines::Yes argument. The Function argument already takes CoroutineHandle, so this should be found by normal overloading.
> Tools/TestWebKitAPI/cocoa/HTTPServer.mm:53 > + for (auto& handle : coroutineHandles) > + handle.destroy();
Maybe we should wrap the coroutine handle in a type of our own that does a destroy in the handle’s destructor. Then we would not need this. Like CoroutineHandle could do this.
> Tools/TestWebKitAPI/cocoa/HTTPServer.mm:452 > + return Awaitable(*this);
This return statement slices the Awaitable, copying out only the suspend_never base class part of the object. I don’t think that’s what you wanted to do here.
Darin Adler
Comment 3
2022-02-03 04:38:43 PST
Comment on
attachment 450171
[details]
Patch review- because of the slice problem; not sure how the test works!
Radar WebKit Bug Importer
Comment 4
2022-02-03 13:28:14 PST
<
rdar://problem/88452783
>
Alex Christensen
Comment 5
2022-05-18 13:15:22 PDT
Comment on
attachment 450171
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=450171&action=review
>> Tools/TestWebKitAPI/cocoa/HTTPServer.h:65 >> + HTTPServer(UseCoroutines, Function<CoroutineHandle(Connection)>&&, Protocol = Protocol::Http); > > I don’t think we need this UseCoroutines::Yes argument. The Function argument already takes CoroutineHandle, so this should be found by normal overloading.
The Function returns a CoroutineHandle but takes the same parameter, a Connection. We currently do need UseCoroutines because otherwise it thinks the constructor is ambiguous.
Alex Christensen
Comment 6
2022-05-18 13:17:43 PDT
Created
attachment 459553
[details]
Patch
Alex Christensen
Comment 7
2022-05-18 13:31:00 PDT
Created
attachment 459554
[details]
Patch
EWS
Comment 8
2022-05-19 10:40:26 PDT
Committed
r294492
(
250751@main
): <
https://commits.webkit.org/250751@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 459554
[details]
.
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