Chromium Code Reviews| Index: third_party/WebKit/Source/modules/compositorworker/WindowAnimationWorklet.cpp |
| diff --git a/third_party/WebKit/Source/modules/compositorworker/WindowAnimationWorklet.cpp b/third_party/WebKit/Source/modules/compositorworker/WindowAnimationWorklet.cpp |
| index 3512051bf191613a1f4e16497cccfa9af04b78cf..a6d826e403652456541dcc960bda289becc5d809 100644 |
| --- a/third_party/WebKit/Source/modules/compositorworker/WindowAnimationWorklet.cpp |
| +++ b/third_party/WebKit/Source/modules/compositorworker/WindowAnimationWorklet.cpp |
| @@ -10,8 +10,7 @@ |
| namespace blink { |
| -WindowAnimationWorklet::WindowAnimationWorklet(LocalDOMWindow& window) |
| - : DOMWindowProperty(window.frame()) {} |
| +WindowAnimationWorklet::WindowAnimationWorklet(LocalDOMWindow& window) {} |
| const char* WindowAnimationWorklet::supplementName() { |
| return "WindowAnimationWorklet"; |
| @@ -30,24 +29,20 @@ WindowAnimationWorklet& WindowAnimationWorklet::from(LocalDOMWindow& window) { |
| // static |
| Worklet* WindowAnimationWorklet::animationWorklet(DOMWindow& window) { |
| - return from(toLocalDOMWindow(window)).animationWorklet(); |
| + return from(toLocalDOMWindow(window)) |
| + .animationWorklet(toLocalDOMWindow(window)); |
| } |
| -AnimationWorklet* WindowAnimationWorklet::animationWorklet() { |
| - if (!m_animationWorklet && frame()) |
| - m_animationWorklet = AnimationWorklet::create(frame()); |
| +AnimationWorklet* WindowAnimationWorklet::animationWorklet( |
| + LocalDOMWindow& window) { |
| + if (!m_animationWorklet) |
| + m_animationWorklet = AnimationWorklet::create(window.frame()); |
| return m_animationWorklet.get(); |
| } |
| -void WindowAnimationWorklet::frameDestroyed() { |
|
nhiroki
2016/12/13 09:49:01
This was added to fix memory leak:
https://coderev
|
| - m_animationWorklet.clear(); |
| - DOMWindowProperty::frameDestroyed(); |
| -} |
| - |
| DEFINE_TRACE(WindowAnimationWorklet) { |
| visitor->trace(m_animationWorklet); |
| Supplement<LocalDOMWindow>::trace(visitor); |
| - DOMWindowProperty::trace(visitor); |
| } |
| } // namespace blink |