| Index: third_party/WebKit/Source/bindings/templates/callback_function.h.tmpl
|
| diff --git a/third_party/WebKit/Source/bindings/templates/callback_function.h.tmpl b/third_party/WebKit/Source/bindings/templates/callback_function.h.tmpl
|
| index 59f5a90933636dccb43e229873fdef4472d155e0..fd90cbf9c25e6a1204d37ce233c94055db07f319 100644
|
| --- a/third_party/WebKit/Source/bindings/templates/callback_function.h.tmpl
|
| +++ b/third_party/WebKit/Source/bindings/templates/callback_function.h.tmpl
|
| @@ -16,42 +16,37 @@ class ScriptState;
|
| class {{forward_declaration}};
|
| {% endfor %}
|
|
|
| -class {{exported}}{{cpp_class}} final : public GarbageCollectedFinalized<{{cpp_class}}>,
|
| - public TraceWrapperBase {
|
| +class {{exported}}{{cpp_class}} final : public GarbageCollectedFinalized<{{cpp_class}}>, public TraceWrapperBase {
|
| + public:
|
| + static {{cpp_class}}* create(ScriptState* scriptState, v8::Local<v8::Function> callback) {
|
| + return new {{cpp_class}}(scriptState, callback);
|
| + }
|
|
|
| -public:
|
| - static {{cpp_class}}* create(ScriptState* scriptState, v8::Local<v8::Function> callback)
|
| - {
|
| - return new {{cpp_class}}(scriptState, callback);
|
| - }
|
| + ~{{cpp_class}}() = default;
|
|
|
| - ~{{cpp_class}}() = default;
|
| + DECLARE_TRACE();
|
| + DECLARE_TRACE_WRAPPERS();
|
|
|
| - DECLARE_TRACE();
|
| - DECLARE_TRACE_WRAPPERS();
|
| + bool call({{argument_declarations | join(', ')}});
|
|
|
| - bool call({{argument_declarations | join(', ')}});
|
| + v8::Local<v8::Function> v8Value(v8::Isolate* isolate) {
|
| + return m_callback.newLocal(isolate);
|
| + }
|
|
|
| - v8::Local<v8::Function> v8Value(v8::Isolate* isolate)
|
| - {
|
| - return m_callback.newLocal(isolate);
|
| - }
|
| + void setWrapperReference(v8::Isolate* isolate, const v8::Persistent<v8::Object>& wrapper) {
|
| + DCHECK(!m_callback.isEmpty());
|
| + m_callback.setReference(wrapper, isolate);
|
| + }
|
|
|
| - void setWrapperReference(v8::Isolate* isolate, const v8::Persistent<v8::Object>& wrapper)
|
| - {
|
| - DCHECK(!m_callback.isEmpty());
|
| - m_callback.setReference(wrapper, isolate);
|
| - }
|
| + private:
|
| + {{cpp_class}}(ScriptState*, v8::Local<v8::Function>);
|
|
|
| -private:
|
| - {{cpp_class}}(ScriptState*, v8::Local<v8::Function>);
|
| -
|
| - RefPtr<ScriptState> m_scriptState;
|
| - ScopedPersistent<v8::Function> m_callback;
|
| + RefPtr<ScriptState> m_scriptState;
|
| + ScopedPersistent<v8::Function> m_callback;
|
| };
|
|
|
| -} // namespace blink
|
| +} // namespace blink
|
|
|
| -#endif // {{cpp_class}}_h
|
| +#endif // {{cpp_class}}_h
|
|
|
| {% endfilter %}{# format_blink_cpp_source_code #}
|
|
|