Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(304)

Side by Side Diff: third_party/WebKit/Source/modules/compositorworker/WindowAnimationWorklet.cpp

Issue 2629593004: Disambiguate LifecycleObserver::contextDestroyed (Closed)
Patch Set: temp Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "modules/compositorworker/WindowAnimationWorklet.h" 5 #include "modules/compositorworker/WindowAnimationWorklet.h"
6 6
7 #include "core/dom/Document.h" 7 #include "core/dom/Document.h"
8 #include "core/frame/LocalDOMWindow.h" 8 #include "core/frame/LocalDOMWindow.h"
9 #include "core/frame/LocalFrame.h" 9 #include "core/frame/LocalFrame.h"
10 #include "modules/compositorworker/AnimationWorklet.h" 10 #include "modules/compositorworker/AnimationWorklet.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 48
49 // Break the following cycle when the context gets detached. 49 // Break the following cycle when the context gets detached.
50 // Otherwise, the worklet object will leak. 50 // Otherwise, the worklet object will leak.
51 // 51 //
52 // window => window.animationWorklet 52 // window => window.animationWorklet
53 // => WindowAnimationWorklet 53 // => WindowAnimationWorklet
54 // => AnimationWorklet <--- break this reference 54 // => AnimationWorklet <--- break this reference
55 // => ThreadedWorkletMessagingProxy 55 // => ThreadedWorkletMessagingProxy
56 // => Document 56 // => Document
57 // => ... => window 57 // => ... => window
58 void WindowAnimationWorklet::contextDestroyed() { 58 void WindowAnimationWorklet::contextDestroyed(ExecutionContext*) {
59 m_animationWorklet = nullptr; 59 m_animationWorklet = nullptr;
60 } 60 }
61 61
62 DEFINE_TRACE(WindowAnimationWorklet) { 62 DEFINE_TRACE(WindowAnimationWorklet) {
63 visitor->trace(m_animationWorklet); 63 visitor->trace(m_animationWorklet);
64 Supplement<LocalDOMWindow>::trace(visitor); 64 Supplement<LocalDOMWindow>::trace(visitor);
65 ContextLifecycleObserver::trace(visitor); 65 ContextLifecycleObserver::trace(visitor);
66 } 66 }
67 67
68 } // namespace blink 68 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698