Bug 308686
| Summary: | JSNativeStdFunction should be able to safely capture | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Kai Tamkun <k_tamkun> |
| Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Kai Tamkun
Currently, there's no way to safely keep the captures of lambdas passed to JSNativeStdFunction::create alive other than use of Strong, which has its own problems.
If JSNativeStdFunction kept a FixedVector of WriteBarriers to captured values, it could keep them alive at least as long as the JSNativeStdFunction is alive without Strong cycle issues.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/171220159>
Kai Tamkun
Pull request: https://github.com/WebKit/WebKit/pull/59467
EWS
Committed 308472@main (8ed6b76ec394): <https://commits.webkit.org/308472@main>
Reviewed commits have been landed. Closing PR #59467 and removing active labels.