Bug 262437
Summary: | NativePromise should provide a safe way to pass some argument types | ||
---|---|---|---|
Product: | WebKit | Reporter: | Jean-Yves Avenard [:jya] <jean-yves.avenard> |
Component: | Web Template Framework | Assignee: | Jean-Yves Avenard [:jya] <jean-yves.avenard> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | webkit-bug-importer |
Priority: | P2 | Keywords: | InRadar |
Version: | WebKit Nightly Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=262660 |
Jean-Yves Avenard [:jya]
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
<rdar://problem/116274506>
Jean-Yves Avenard [:jya]
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]
Pull request: https://github.com/WebKit/WebKit/pull/18484
EWS
Committed 268880@main (0345168e97b5): <https://commits.webkit.org/268880@main>
Reviewed commits have been landed. Closing PR #18484 and removing active labels.