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

Unified Diff: third_party/WebKit/Source/modules/compositorworker/AnimatorDefinition.h

Issue 2903703003: Use wrapper tracing for worklets. (Closed)
Patch Set: Separating in two CLs Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/compositorworker/AnimatorDefinition.h
diff --git a/third_party/WebKit/Source/modules/compositorworker/AnimatorDefinition.h b/third_party/WebKit/Source/modules/compositorworker/AnimatorDefinition.h
index b59cf65da38b71807602bb46b99ea4754f761a22..483f3b447f33ce8180390a2d532845799a4848d2 100644
--- a/third_party/WebKit/Source/modules/compositorworker/AnimatorDefinition.h
+++ b/third_party/WebKit/Source/modules/compositorworker/AnimatorDefinition.h
@@ -5,7 +5,8 @@
#ifndef AnimatorDefinition_h
#define AnimatorDefinition_h
-#include "platform/bindings/ScopedPersistent.h"
+#include "platform/bindings/ScriptWrappable.h"
+#include "platform/bindings/TraceWrapperV8Reference.h"
#include "platform/heap/Handle.h"
#include "v8/include/v8.h"
@@ -17,23 +18,23 @@ namespace blink {
// It can be used to instantiate new animators and also to call the Javascript
// 'animate' callback on a given instance.
class AnimatorDefinition final
- : public GarbageCollectedFinalized<AnimatorDefinition> {
+ : public GarbageCollectedFinalized<AnimatorDefinition>,
+ public TraceWrapperBase {
public:
AnimatorDefinition(v8::Isolate*,
v8::Local<v8::Function> constructor,
v8::Local<v8::Function> animate);
~AnimatorDefinition();
DEFINE_INLINE_TRACE() {}
+ DECLARE_TRACE_WRAPPERS();
v8::Local<v8::Function> ConstructorLocal(v8::Isolate*);
private:
// This object keeps the constructor function, and animate function alive.
- // It needs to be destroyed to break a reference cycle between it and the
- // AnimationWorkletGlobalScope. This cycle is broken in
- // |AnimationWorkletGlobalScope::Dispose()|.
- ScopedPersistent<v8::Function> constructor_;
- ScopedPersistent<v8::Function> animate_;
+ // It participates in wrapper tracing as it holds onto V8 wrappers.
+ TraceWrapperV8Reference<v8::Function> constructor_;
+ TraceWrapperV8Reference<v8::Function> animate_;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698