[webkit-reviews] review granted: [Bug 207342] REGRESSION (r255953): [ iOS Mac ] imported/w3c/web-platform-tests/web-animations/timing-model/timelines/update-and-send-events.html is crashing : [Attachment 390066] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Feb 7 02:08:33 PST 2020


youenn fablet <youennf at gmail.com> has granted Antoine Quint
<graouts at webkit.org>'s request for review:
Bug 207342: REGRESSION (r255953): [ iOS Mac ]
imported/w3c/web-platform-tests/web-animations/timing-model/timelines/update-an
d-send-events.html is crashing
https://bugs.webkit.org/show_bug.cgi?id=207342

Attachment 390066: Patch

https://bugs.webkit.org/attachment.cgi?id=390066&action=review




--- Comment #7 from youenn fablet <youennf at gmail.com> ---
Comment on attachment 390066
  --> https://bugs.webkit.org/attachment.cgi?id=390066
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=390066&action=review

> Source/WebCore/dom/Document.cpp:2582
> +    Vector<RefPtr<DocumentTimeline>> timelines;

How about Vector<Ref<>>?

> Source/WebCore/dom/Document.cpp:2584
> +	   timelines.append(&timeline);

reserveInitialCapacity/uncheckedAppend.
But we should really have a WeakHashSet -> Vector routine.

> Source/WebCore/dom/Document.cpp:2586
> +	   timeline->detachFromDocument();

I am not clear why we need to take a strong reference. Can you detail why in
the change log?

Also, can we do something like (without the vector creation):
for (auto& timeline : std::exchange(timelines, { }))
    timeline->detachFromDocument();


More information about the webkit-reviews mailing list