| Index: Source/bindings/scripts/callbackImplementation.template
|
| diff --git a/Source/bindings/scripts/callbackImplementation.template b/Source/bindings/scripts/callbackImplementation.template
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..43cedba8c94b3af530d3bc623eb8961ac6b07acf
|
| --- /dev/null
|
| +++ b/Source/bindings/scripts/callbackImplementation.template
|
| @@ -0,0 +1,70 @@
|
| +/*
|
| + This file is part of the Blink open source project.
|
| + This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY!
|
| +
|
| + This library is free software; you can redistribute it and/or
|
| + modify it under the terms of the GNU Library General Public
|
| + License as published by the Free Software Foundation; either
|
| + version 2 of the License, or (at your option) any later version.
|
| +
|
| + This library is distributed in the hope that it will be useful,
|
| + but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
| + Library General Public License for more details.
|
| +
|
| + You should have received a copy of the GNU Library General Public License
|
| + along with this library; see the file COPYING.LIB. If not, write to
|
| + the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
| + Boston, MA 02111-1307, USA.
|
| +*/
|
| +
|
| +#include "config.h"
|
| +{{conditional_if}}
|
| +{%- for filename in main_includes %}
|
| +#include "{{ filename }}"
|
| +{%- endfor %}
|
| +{% for filename in sub_includes %}
|
| +#include "{{ filename }}"
|
| +{%- endfor %}
|
| +
|
| +namespace WebCore {
|
| +
|
| +{{v8_class_name}}::{{v8_class_name}}(v8::Handle<v8::Object> callback, ScriptExecutionContext* context)
|
| + : ActiveDOMCallback(context)
|
| + , m_callback(callback)
|
| + , m_world(DOMWrapperWorld::current())
|
| +{
|
| +}
|
| +
|
| +{{v8_class_name}}::~{{v8_class_name}}()
|
| +{
|
| +}
|
| +
|
| +// Functions
|
| +
|
| +{% for definition in web_core_definitions -%}
|
| +{{definition["signature"]}}
|
| +{
|
| + if (!canInvokeCallback())
|
| + return true;
|
| +
|
| + v8::Isolate* isolate = v8::Isolate::GetCurrent();
|
| + v8::HandleScope handleScope(isolate);
|
| +
|
| + v8::Handle<v8::Context> v8Context = toV8Context(scriptExecutionContext(), m_world.get());
|
| + if (v8Context.IsEmpty())
|
| + return true;
|
| +
|
| + v8::Context::Scope scope(v8Context);
|
| +
|
| +
|
| + {{definition["prepare_js_parameters"] | indent(4)}}
|
| +
|
| + bool callbackReturnValue = false;
|
| + return !invokeCallback(m_callback.newLocal(isolate), {{definition["number_of_parameters"]}}, argv, callbackReturnValue, scriptExecutionContext());
|
| +}
|
| +{% endfor %}
|
| +} // namespace WebCore
|
| +
|
| +{{conditional_endif}}
|
| +
|
|
|