Instead of WeakPtr.
Created attachment 430332 [details] patch
Created attachment 430333 [details] patch
Committed r278355 (238387@main): <https://commits.webkit.org/238387@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 430333 [details].
<rdar://problem/78767262>
Comment on attachment 430333 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=430333&action=review > Source/WebCore/style/StyleScope.cpp:671 > + resolverScopes.add(makeRef(*resolver), Vector<CheckedPtr<Scope>> { }).iterator->value.append(&scope); You add an empty vector, and append a single Scope. Does this vector always have only a single Scope? If so, why is ResolverScopes's ValueType using Vector<CheckedPtr<Scope>>?
Comment on attachment 430333 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=430333&action=review >> Source/WebCore/style/StyleScope.cpp:671 >> + resolverScopes.add(makeRef(*resolver), Vector<CheckedPtr<Scope>> { }).iterator->value.append(&scope); > > You add an empty vector, and append a single Scope. > Does this vector always have only a single Scope? > If so, why is ResolverScopes's ValueType using Vector<CheckedPtr<Scope>>? We're in a loop so we may add more scope than one to the Vector. (Note that add() is a no-op if the key already exists)
It would be nice to have a single-argument version of add (or ensure) where the value is default constructed.
(In reply to Antti Koivisto from comment #7) > It would be nice to have a single-argument version of add (or ensure) where > the value is default constructed. Maybe we can just add the default argument value to it...