| OLD | NEW |
| (Empty) | |
| 1 /* |
| 2 This file is part of the Blink open source project. |
| 3 This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY! |
| 4 |
| 5 This library is free software; you can redistribute it and/or |
| 6 modify it under the terms of the GNU Library General Public |
| 7 License as published by the Free Software Foundation; either |
| 8 version 2 of the License, or (at your option) any later version. |
| 9 |
| 10 This library is distributed in the hope that it will be useful, |
| 11 but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 Library General Public License for more details. |
| 14 |
| 15 You should have received a copy of the GNU Library General Public License |
| 16 along with this library; see the file COPYING.LIB. If not, write to |
| 17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
| 18 Boston, MA 02111-1307, USA. |
| 19 */ |
| 20 |
| 21 #include "config.h" |
| 22 {{conditional_if}} |
| 23 {%- for filename in main_includes %} |
| 24 #include "{{ filename }}" |
| 25 {%- endfor %} |
| 26 {% for filename in sub_includes %} |
| 27 #include "{{ filename }}" |
| 28 {%- endfor %} |
| 29 |
| 30 namespace WebCore { |
| 31 |
| 32 {{v8_class_name}}::{{v8_class_name}}(v8::Handle<v8::Object> callback, ScriptExec
utionContext* context) |
| 33 : ActiveDOMCallback(context) |
| 34 , m_callback(callback) |
| 35 , m_world(DOMWrapperWorld::current()) |
| 36 { |
| 37 } |
| 38 |
| 39 {{v8_class_name}}::~{{v8_class_name}}() |
| 40 { |
| 41 } |
| 42 |
| 43 // Functions |
| 44 |
| 45 {% for definition in web_core_definitions -%} |
| 46 {{definition["signature"]}} |
| 47 { |
| 48 if (!canInvokeCallback()) |
| 49 return true; |
| 50 |
| 51 v8::Isolate* isolate = v8::Isolate::GetCurrent(); |
| 52 v8::HandleScope handleScope(isolate); |
| 53 |
| 54 v8::Handle<v8::Context> v8Context = toV8Context(scriptExecutionContext(), m_
world.get()); |
| 55 if (v8Context.IsEmpty()) |
| 56 return true; |
| 57 |
| 58 v8::Context::Scope scope(v8Context); |
| 59 |
| 60 |
| 61 {{definition["prepare_js_parameters"] | indent(4)}} |
| 62 |
| 63 bool callbackReturnValue = false; |
| 64 return !invokeCallback(m_callback.newLocal(isolate), {{definition["number_of
_parameters"]}}, argv, callbackReturnValue, scriptExecutionContext()); |
| 65 } |
| 66 {% endfor %} |
| 67 } // namespace WebCore |
| 68 |
| 69 {{conditional_endif}} |
| 70 |
| OLD | NEW |