OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 25 matching lines...) Expand all Loading... |
36 {% endif %} | 36 {% endif %} |
37 #include "{{v8_class_name}}.h" | 37 #include "{{v8_class_name}}.h" |
38 | 38 |
39 {% for filename in cpp_includes %} | 39 {% for filename in cpp_includes %} |
40 #include "{{filename}}" | 40 #include "{{filename}}" |
41 {% endfor %} | 41 {% endfor %} |
42 namespace WebCore { | 42 namespace WebCore { |
43 | 43 |
44 {{v8_class_name}}::{{v8_class_name}}(v8::Handle<v8::Object> callback, ScriptExec
utionContext* context) | 44 {{v8_class_name}}::{{v8_class_name}}(v8::Handle<v8::Object> callback, ScriptExec
utionContext* context) |
45 : ActiveDOMCallback(context) | 45 : ActiveDOMCallback(context) |
46 , m_callback(callback) | 46 , m_callback(isolateForScriptExecutionContext(context), callback) |
47 , m_world(DOMWrapperWorld::current()) | 47 , m_world(DOMWrapperWorld::current()) |
48 { | 48 { |
49 } | 49 } |
50 | 50 |
51 {{v8_class_name}}::~{{v8_class_name}}() | 51 {{v8_class_name}}::~{{v8_class_name}}() |
52 { | 52 { |
53 } | 53 } |
54 | 54 |
55 {% for method in methods %} | 55 {% for method in methods %} |
56 {% if not method.custom %} | 56 {% if not method.custom %} |
(...skipping 29 matching lines...) Expand all Loading... |
86 return !invokeCallback(m_callback.newLocal(isolate), {{method.arguments | le
ngth}}, argv, callbackReturnValue, scriptExecutionContext(), isolate); | 86 return !invokeCallback(m_callback.newLocal(isolate), {{method.arguments | le
ngth}}, argv, callbackReturnValue, scriptExecutionContext(), isolate); |
87 } | 87 } |
88 | 88 |
89 {% endif %} | 89 {% endif %} |
90 {% endfor %}{# for method in methods #} | 90 {% endfor %}{# for method in methods #} |
91 } // namespace WebCore | 91 } // namespace WebCore |
92 | 92 |
93 {% if conditional_string %} | 93 {% if conditional_string %} |
94 #endif // {{conditional_string}} | 94 #endif // {{conditional_string}} |
95 {% endif %} | 95 {% endif %} |
OLD | NEW |