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

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

Issue 2903703003: Use wrapper tracing for worklets. (Closed)
Patch Set: 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..f2c0b0e777eca9636a402b48231fafa77e4d8351 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,13 +18,15 @@ 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*);
@@ -32,8 +35,8 @@ class AnimatorDefinition final
// 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_;
+ TraceWrapperV8Reference<v8::Function> constructor_;
+ TraceWrapperV8Reference<v8::Function> animate_;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698