Bug 262872
| Summary: | [NativePromise] Shouldn't require to copy the resolved value when the promise isn't exclusive | ||
|---|---|---|---|
| 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 | ||
| Bug Depends on: | |||
| Bug Blocks: | 262989 | ||
Jean-Yves Avenard [:jya]
Right now, when chaining promises that aren't exclusive, it requires to copy the resolve/reject value from one promise to the other as the promise itself owns the data that will be passed around.
This prevents being able to chain promises for objects that do not have a copy constructor (like unique_ptr).
Instead, we could either have the chained promise keeps a reference to the original promise, or store the data in a refcounted container and share that across instead.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/116664254>
Jean-Yves Avenard [:jya]
Pull request: https://github.com/WebKit/WebKit/pull/18840
EWS
Committed 269241@main (c1b873c21745): <https://commits.webkit.org/269241@main>
Reviewed commits have been landed. Closing PR #18840 and removing active labels.