RESOLVED FIXED 207666
CSSValuePool's constant CSS values should not be allocated dynamically (and same for Vectors)
https://bugs.webkit.org/show_bug.cgi?id=207666
Summary CSSValuePool's constant CSS values should not be allocated dynamically (and s...
Yusuke Suzuki
Reported 2020-02-12 14:42:12 PST
This causes memory regression.
Attachments
Patch (19.56 KB, patch)
2020-02-12 16:20 PST, Yusuke Suzuki
no flags
Patch (20.03 KB, patch)
2020-02-12 16:34 PST, Yusuke Suzuki
mark.lam: review+
Yusuke Suzuki
Comment 1 2020-02-12 14:43:35 PST
Let's introduce static CSSValues which can be shared by multiple threads, the concept is the same to StaticStringImpl.
Yusuke Suzuki
Comment 2 2020-02-12 14:44:54 PST
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.
Radar WebKit Bug Importer
Comment 3 2020-02-12 16:09:46 PST
Yusuke Suzuki
Comment 4 2020-02-12 16:20:17 PST
Yusuke Suzuki
Comment 5 2020-02-12 16:34:57 PST
Mark Lam
Comment 6 2020-02-12 16:48:55 PST
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.
Mark Lam
Comment 7 2020-02-12 16:50:39 PST
Comment on attachment 390588 [details] Patch r=me with fixes for previously posted comments.
Yusuke Suzuki
Comment 8 2020-02-12 17:06:32 PST
Comment on attachment 390588 [details] Patch Thanks, fixed.
Yusuke Suzuki
Comment 9 2020-02-12 17:11:15 PST
Note You need to log in before you can comment on or make changes to this bug.