Bug 302540
| Summary: | VMManager::singleton() is not thread safe. | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Mark Lam <mark.lam> |
| Component: | JavaScriptCore | Assignee: | Mark Lam <mark.lam> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Mark Lam
VMManager::singleton() may be called concurrently from multiple threads. Hence, the initialization of the singleton instance needs to be done in a thread safe manner. To fix this, we'll switch from using a NeverDestroyed<VMManager> to a LazyNeverDestroyed<VMManager>, and initialize it within a std::call_once, which is thread safe.
rdar://116953427
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Mark Lam
Correction, radar link should be:
rdar://164580639
Mark Lam
Pull request: https://github.com/WebKit/WebKit/pull/53944
EWS
Committed 303054@main (01e8c830aad1): <https://commits.webkit.org/303054@main>
Reviewed commits have been landed. Closing PR #53944 and removing active labels.