base::flat_set usage within blink

10 views
Skip to first unread message

Stefan Zager

unread,
2:01 PM (1 hour ago) 2:01 PM
to blink-dev
Hello,

By default, base::flat_set and base::flat_map cannot be used inside blink. However, there are about a dozen carve-outs, and I'm wondering how people would feel about relaxing the restriction more generally.

My guess is that there are two primary reasons for the restriction:

- No support for base:: containers of garbage-collected types
- Mixing redundant/overlapping WTF and base containers could create a big mess

Are the other reasons I'm not thinking of?

How hard would it be to modify the blink GC clang plugin to forbid base:: containers of garbage-collecte types?

My motivation here is that there are cases (including one I'm struggling with right now) where structured data is stored in a base:: container in cc/, passed to blink/, and then passed back to cc/. In some cases blink does not use or modify the container; it's just a conduit. In those cases, we either need to do a pointless round-trip base->WTF->base conversion; or we need to add entries to audit_non_blink_usage.py which creates a blind spot for enforcement.

Thoughts?
Reply all
Reply to author
Forward
0 new messages