Bug 183554 - [Web Animations] Fix some WebAnimation lifecycle issues in preparation for declarative animations support
Summary: [Web Animations] Fix some WebAnimation lifecycle issues in preparation for de...
Status: RESOLVED DUPLICATE of bug 183504
Alias: None
Product: WebKit
Classification: Unclassified
Component: Animations (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Antoine Quint
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-11 19:26 PDT by Antoine Quint
Modified: 2018-03-12 06:03 PDT (History)
1 user (show)

See Also:


Attachments
Patch (4.90 KB, patch)
2018-03-11 19:31 PDT, Antoine Quint
dino: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Antoine Quint 2018-03-11 19:26:38 PDT
[Web Animations] Fix some WebAnimation lifecycle issues in preparation for declarative animations support
Comment 1 Antoine Quint 2018-03-11 19:31:06 PDT
Created attachment 335564 [details]
Patch
Comment 2 Dean Jackson 2018-03-12 02:59:52 PDT
Comment on attachment 335564 [details]
Patch

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

> Source/WebCore/animation/WebAnimation.cpp:664
> +    MicrotaskQueue::mainThreadQueue().append(std::make_unique<VoidMicrotask>([this, protectedThis = makeRef(*this)] () {
> +        this->performMicrotask();
> +    }));

No need for the this in []. Just use protectedThis->performMicrotask()
Comment 3 Antoine Quint 2018-03-12 03:04:58 PDT
(In reply to Dean Jackson from comment #2)
> Comment on attachment 335564 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=335564&action=review
> 
> > Source/WebCore/animation/WebAnimation.cpp:664
> > +    MicrotaskQueue::mainThreadQueue().append(std::make_unique<VoidMicrotask>([this, protectedThis = makeRef(*this)] () {
> > +        this->performMicrotask();
> > +    }));
> 
> No need for the this in []. Just use protectedThis->performMicrotask()

It actually is needed, the compiler says "'this' cannot be implicitly captured in this context" otherwise.
Comment 4 Antoine Quint 2018-03-12 06:03:55 PDT

*** This bug has been marked as a duplicate of bug 183504 ***