| Summary: | CSSValuePool's constant CSS values should not be allocated dynamically (and same for Vectors) | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Yusuke Suzuki <ysuzuki> | ||||||
| Component: | CSS | Assignee: | Yusuke Suzuki <ysuzuki> | ||||||
| Status: | RESOLVED FIXED | ||||||||
| Severity: | Normal | CC: | esprehn+autocc, ews-watchlist, glenn, gyuyoung.kim, macpherson, mark.lam, menard, 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=204520 | ||||||||
| Attachments: |
|
||||||||
|
Description
Yusuke Suzuki
2020-02-12 14:42:12 PST
Let's introduce static CSSValues which can be shared by multiple threads, the concept is the same to StaticStringImpl. Further aggressive thing is like, encoding some of CSSValues into a pointer and using it as a value. But for now, let's just start fixing it. Created attachment 390583 [details]
Patch
Created attachment 390588 [details]
Patch
Comment on attachment 390583 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=390583&action=review > Source/WebCore/css/CSSValue.h:68 > + // Custoized deref() to ensure operator delete is called on /Custoized/Customized/ > Source/WebCore/css/CSSValuePool.h:51 > + friend class WTF::LazyNeverDestroyed<StaticCSSValuePool>; The WTF qualifier here is not needed. Comment on attachment 390588 [details]
Patch
r=me with fixes for previously posted comments.
Comment on attachment 390588 [details]
Patch
Thanks, fixed.
Committed r256494: <https://trac.webkit.org/changeset/256494> |