| OLD | NEW |
| 1 {# http://www.chromium.org/blink/coding-style#TOC-License #} | 1 {# http://www.chromium.org/blink/coding-style#TOC-License #} |
| 2 /* | 2 /* |
| 3 * Copyright (C) 2013 Google Inc. All rights reserved. | 3 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 // This file has been auto-generated by code_generator_v8.pm. DO NOT MODIFY! | 33 // This file has been auto-generated by code_generator_v8.pm. DO NOT MODIFY! |
| 34 | 34 |
| 35 #include "config.h" | 35 #include "config.h" |
| 36 {% filter conditional(conditional_string) %} | 36 {% filter conditional(conditional_string) %} |
| 37 #include "{{v8_class}}.h" | 37 #include "{{v8_class}}.h" |
| 38 | 38 |
| 39 {% for filename in cpp_includes if filename != '%s.h' % v8_class %} | 39 {% for filename in cpp_includes if filename != '%s.h' % v8_class %} |
| 40 #include "{{filename}}" | 40 #include "{{filename}}" |
| 41 {% endfor %} | 41 {% endfor %} |
| 42 | 42 |
| 43 {% if has_class_bindings %} |
| 43 namespace WebCore { | 44 namespace WebCore { |
| 44 | 45 |
| 45 static void initializeScriptWrappableForInterface({{cpp_class}}* object) | 46 static void initializeScriptWrappableForInterface({{cpp_class}}* object) |
| 46 { | 47 { |
| 47 if (ScriptWrappable::wrapperCanBeStoredInObject(object)) | 48 if (ScriptWrappable::wrapperCanBeStoredInObject(object)) |
| 48 ScriptWrappable::setTypeInfoInObject(object, &{{v8_class}}::wrapperTypeI
nfo); | 49 ScriptWrappable::setTypeInfoInObject(object, &{{v8_class}}::wrapperTypeI
nfo); |
| 49 else | 50 else |
| 50 ASSERT_NOT_REACHED(); | 51 ASSERT_NOT_REACHED(); |
| 51 } | 52 } |
| 52 | 53 |
| 53 } // namespace WebCore | 54 } // namespace WebCore |
| 54 | 55 |
| 55 // In ScriptWrappable::init, the use of a local function declaration has an issu
e on Windows: | 56 // In ScriptWrappable::init, the use of a local function declaration has an issu
e on Windows: |
| 56 // the local declaration does not pick up the surrounding namespace. Therefore,
we provide this function | 57 // the local declaration does not pick up the surrounding namespace. Therefore,
we provide this function |
| 57 // in the global namespace. | 58 // in the global namespace. |
| 58 // (More info on the MSVC bug here: http://connect.microsoft.com/VisualStudio/fe
edback/details/664619/the-namespace-of-local-function-declarations-in-c) | 59 // (More info on the MSVC bug here: http://connect.microsoft.com/VisualStudio/fe
edback/details/664619/the-namespace-of-local-function-declarations-in-c) |
| 59 void webCoreInitializeScriptWrappableForInterface(WebCore::{{cpp_class}}* object
) | 60 void webCoreInitializeScriptWrappableForInterface(WebCore::{{cpp_class}}* object
) |
| 60 { | 61 { |
| 61 WebCore::initializeScriptWrappableForInterface(object); | 62 WebCore::initializeScriptWrappableForInterface(object); |
| 62 } | 63 } |
| 63 | 64 |
| 65 {% endif %} |
| 64 namespace WebCore { | 66 namespace WebCore { |
| 65 {% set to_active_dom_object = '%s::toActiveDOMObject' % v8_class | 67 {% set to_active_dom_object = '%s::toActiveDOMObject' % v8_class |
| 66 if is_active_dom_object else '0' %} | 68 if is_active_dom_object else '0' %} |
| 67 {% set to_event_target = '%s::toEventTarget' % v8_class | 69 {% set to_event_target = '%s::toEventTarget' % v8_class |
| 68 if is_event_target else '0' %} | 70 if is_event_target else '0' %} |
| 69 {% set visit_dom_wrapper = '%s::visitDOMWrapper' % v8_class | 71 {% set visit_dom_wrapper = '%s::visitDOMWrapper' % v8_class |
| 70 if has_visit_dom_wrapper else '0' %} | 72 if has_visit_dom_wrapper else '0' %} |
| 71 {% set parent_wrapper_type_info = '&V8%s::wrapperTypeInfo' % parent_interface | 73 {% set parent_wrapper_type_info = '&V8%s::wrapperTypeInfo' % parent_interface |
| 72 if parent_interface else '0' %} | 74 if parent_interface else '0' %} |
| 73 {% set wrapper_type_prototype = 'WrapperTypeExceptionPrototype' if is_exception
else | 75 {% set wrapper_type_prototype = 'WrapperTypeExceptionPrototype' if is_exception
else |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 {% block get_template %}{% endblock %} | 169 {% block get_template %}{% endblock %} |
| 168 {% block has_instance %}{% endblock %} | 170 {% block has_instance %}{% endblock %} |
| 169 {% block to_native_with_type_check %}{% endblock %} | 171 {% block to_native_with_type_check %}{% endblock %} |
| 170 {% block install_per_context_attributes %}{% endblock %} | 172 {% block install_per_context_attributes %}{% endblock %} |
| 171 {% block install_per_context_methods %}{% endblock %} | 173 {% block install_per_context_methods %}{% endblock %} |
| 172 {% block to_active_dom_object %}{% endblock %} | 174 {% block to_active_dom_object %}{% endblock %} |
| 173 {% block to_event_target %}{% endblock %} | 175 {% block to_event_target %}{% endblock %} |
| 174 {% block get_shadow_object_template %}{% endblock %} | 176 {% block get_shadow_object_template %}{% endblock %} |
| 175 {% block wrap %}{% endblock %} | 177 {% block wrap %}{% endblock %} |
| 176 {% block create_wrapper %}{% endblock %} | 178 {% block create_wrapper %}{% endblock %} |
| 177 {% block deref_object_and_to_v8_no_inline %}{% endblock %} | 179 {% block deref_object %}{% endblock %} |
| 180 {% block to_v8_no_inline %}{% endblock %} |
| 178 } // namespace WebCore | 181 } // namespace WebCore |
| 179 {% endfilter %} | 182 {% endfilter %} |
| OLD | NEW |