[webkit-reviews] review granted: [Bug 183161] [Web Animations] Correct implementation of pending tasks and promises : [Attachment 334685] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Feb 27 11:24:05 PST 2018


Dean Jackson <dino at apple.com> has granted Antoine Quint <graouts at apple.com>'s
request for review:
Bug 183161: [Web Animations] Correct implementation of pending tasks and
promises
https://bugs.webkit.org/show_bug.cgi?id=183161

Attachment 334685: Patch

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




--- Comment #2 from Dean Jackson <dino at apple.com> ---
Comment on attachment 334685
  --> https://bugs.webkit.org/attachment.cgi?id=334685
Patch

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

> Source/WebCore/animation/WebAnimation.cpp:942
> +		   document->postTask([this] (auto&) {
> +		       if (hasPendingPauseTask() && m_timeline)
> +			   runPendingPauseTask();
> +		   });

I don't understand the build errors here, sorry. You could try [protectedThis =
makeRef(*this)] and then protectedThis->hasPendingPauseTask()

> Source/WebCore/animation/WebAnimation.h:149
> +    UniqueRef<ReadyPromise> m_readyPromise;
> +    UniqueRef<FinishedPromise> m_finishedPromise;

I didn't really understand the message from the changelog about this. Why store
refs, instead of the promises directly? Then instead of clear(), you'd call
clear and assign a new instance.


More information about the webkit-reviews mailing list