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

Unified Diff: third_party/WebKit/Source/modules/csspaint/CSSPaintDefinition.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/csspaint/CSSPaintDefinition.h
diff --git a/third_party/WebKit/Source/modules/csspaint/CSSPaintDefinition.h b/third_party/WebKit/Source/modules/csspaint/CSSPaintDefinition.h
index 2c95acb9b49f7d295555bf3f8012c080f256e834..adcd75cc99f8ad197f48ce163bd439fd84002cbc 100644
--- a/third_party/WebKit/Source/modules/csspaint/CSSPaintDefinition.h
+++ b/third_party/WebKit/Source/modules/csspaint/CSSPaintDefinition.h
@@ -8,7 +8,9 @@
#include "core/CSSPropertyNames.h"
#include "core/css/CSSSyntaxDescriptor.h"
#include "core/css/cssom/CSSStyleValue.h"
-#include "platform/bindings/ScopedPersistent.h"
+#include "platform/bindings/ScriptWrappable.h"
+#include "platform/bindings/TraceWrapperMember.h"
+#include "platform/bindings/TraceWrapperV8Reference.h"
#include "platform/geometry/IntSize.h"
#include "platform/heap/Handle.h"
#include "v8/include/v8.h"
@@ -23,7 +25,8 @@ class ScriptState;
// the author. It will store the properties for invalidation and input argument
// types as well.
class CSSPaintDefinition final
- : public GarbageCollectedFinalized<CSSPaintDefinition> {
+ : public GarbageCollectedFinalized<CSSPaintDefinition>,
+ public TraceWrapperBase {
public:
static CSSPaintDefinition* Create(
ScriptState*,
@@ -62,6 +65,7 @@ class CSSPaintDefinition final
}
DEFINE_INLINE_TRACE(){};
+ DECLARE_TRACE_WRAPPERS();
private:
CSSPaintDefinition(ScriptState*,
@@ -77,13 +81,13 @@ class CSSPaintDefinition final
RefPtr<ScriptState> script_state_;
// This object keeps the class instance object, constructor function and
- // paint function alive. This object needs to be destroyed to break a
- // reference cycle between it and the PaintWorkletGlobalScope.
- ScopedPersistent<v8::Function> constructor_;
- ScopedPersistent<v8::Function> paint_;
+ // paint function alive. It participates in wrapper tracing as it holds onto
+ // V8 wrappers.
+ TraceWrapperV8Reference<v8::Function> constructor_;
+ TraceWrapperV8Reference<v8::Function> paint_;
// At the moment there is only ever one instance of a paint class per type.
- ScopedPersistent<v8::Object> instance_;
+ TraceWrapperV8Reference<v8::Object> instance_;
bool did_call_constructor_;

Powered by Google App Engine
This is Rietveld 408576698