[WTF] Remove RefCountedArray and use RefCountedFixedVector
Created attachment 447540 [details] Patch
Comment on attachment 447540 [details] Patch Thanks!
Related: In new code should start making our argument types and return types be Span<> instead of const Vector<>& or const FixedVector<>&. Find to still have argument types that are Vector<>&& or FixedVector<>&&, and return types that are Vector<> or FixedVector<>, but not references, because Span is more flexible and can return things from a std::array<>, a Vector<>, a FixedVector<>, a pointer to a single value, or a subspan of any of those. I think we’ll end up with better code.
Committed r287308 (245460@main): <https://commits.webkit.org/245460@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 447540 [details].
<rdar://problem/86760816>
(In reply to Darin Adler from comment #3) > Related: In new code should start making our argument types and return types > be Span<> instead of const Vector<>& or const FixedVector<>&. Find to still > have argument types that are Vector<>&& or FixedVector<>&&, and return types > that are Vector<> or FixedVector<>, but not references, because Span is more > flexible and can return things from a std::array<>, a Vector<>, a > FixedVector<>, a pointer to a single value, or a subspan of any of those. I > think we’ll end up with better code. Yeah, Span<> is useful, and we can probably use it more! But in this case, we are using RefCountedFixedVector (not FixedVector) intentionally here since FontCascadeDescription shares RefCountedFixedVector of the other FontCascadeDescription. And the existing method is returning `RefCountedFixedVector&` (previously, `RefCountedArray&`) to pass it to the other FontCascadeDescription sharing it. (that's why this is ref-counted, and neither Vector nor FixedVector).