Chromium Code Reviews| Index: third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinition.h |
| diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinition.h b/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinition.h |
| index abed38bdb862d1b9c25793729af52e0394b3506b..00114ca3b4b2f3bb6178c237ad41bcef7d1d5b0e 100644 |
| --- a/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinition.h |
| +++ b/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinition.h |
| @@ -5,8 +5,8 @@ |
| #ifndef ScriptCustomElementDefinition_h |
| #define ScriptCustomElementDefinition_h |
| -#include "bindings/core/v8/ScopedPersistent.h" |
| #include "bindings/core/v8/ScriptState.h" |
| +#include "bindings/core/v8/TraceWrapperV8Reference.h" |
| #include "core/CoreExport.h" |
| #include "core/dom/custom/CustomElementDefinition.h" |
| #include "platform/wtf/Noncopyable.h" |
| @@ -32,6 +32,7 @@ class CORE_EXPORT ScriptCustomElementDefinition final |
| ScriptState*, |
| CustomElementRegistry*, |
| const CustomElementDescriptor&, |
| + CustomElementDefinition::Id, |
| const v8::Local<v8::Object>& constructor, |
| const v8::Local<v8::Function>& connected_callback, |
| const v8::Local<v8::Function>& disconnected_callback, |
| @@ -41,6 +42,8 @@ class CORE_EXPORT ScriptCustomElementDefinition final |
| virtual ~ScriptCustomElementDefinition() = default; |
| + DECLARE_VIRTUAL_TRACE_WRAPPERS(); |
| + |
| v8::Local<v8::Object> Constructor() const; |
| HTMLElement* CreateElementSync(Document&, const QualifiedName&) override; |
| @@ -88,11 +91,13 @@ class CORE_EXPORT ScriptCustomElementDefinition final |
| ExceptionState&); |
| RefPtr<ScriptState> script_state_; |
| - ScopedPersistent<v8::Object> constructor_; |
| - ScopedPersistent<v8::Function> connected_callback_; |
| - ScopedPersistent<v8::Function> disconnected_callback_; |
| - ScopedPersistent<v8::Function> adopted_callback_; |
| - ScopedPersistent<v8::Function> attribute_changed_callback_; |
| + // TODO(dominicc): Change these to Object, Function respectively |
| + // when TraceWrappers supports more than just v8::Value. |
| + TraceWrapperV8Reference<v8::Value> constructor_; |
|
Michael Lippautz
2017/04/19 08:49:12
The intention of the template was that you can kee
|
| + TraceWrapperV8Reference<v8::Value> connected_callback_; |
| + TraceWrapperV8Reference<v8::Value> disconnected_callback_; |
| + TraceWrapperV8Reference<v8::Value> adopted_callback_; |
| + TraceWrapperV8Reference<v8::Value> attribute_changed_callback_; |
| }; |
| } // namespace blink |