WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
262437
NativePromise should provide a safe way to pass some argument types
https://bugs.webkit.org/show_bug.cgi?id=262437
Summary
NativePromise should provide a safe way to pass some argument types
Jean-Yves Avenard [:jya]
Reported
2023-09-30 00:34:21 PDT
Currently, it's up to the NativePromise producer and callback to deal with object that can only ever exists on a single thread at the same time (like WTFString or Exception). Ideally, the NativePromise could automatically deal with those objects and call isolatedCopy() or crossThreadyCopy() automatically. One way would be to wrap all results in a `ParameterStorage` class that would automatically have a store and load method that deal with the required calls as needed.
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2023-09-30 00:34:39 PDT
<
rdar://problem/116274506
>
Jean-Yves Avenard [:jya]
Comment 2
2023-10-01 02:15:46 PDT
Actually, there's already `crossThreadCopy()` utility that stores data in a CrossThreadCopier class. we will use that (will need additional specialisation)
Jean-Yves Avenard [:jya]
Comment 3
2023-10-01 22:52:38 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/18484
EWS
Comment 4
2023-10-04 16:21:06 PDT
Committed
268880@main
(0345168e97b5): <
https://commits.webkit.org/268880@main
> Reviewed commits have been landed. Closing PR #18484 and removing active labels.
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