| 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 {% for method in methods if not method.custom %} | 57 {% for method in methods if not method.custom %} |
| 58 {{method.return_cpp_type}} {{v8_class}}::{{method.name}}({{method.argument_decla
rations | join(', ')}}) | 58 {{method.return_cpp_type}} {{v8_class}}::{{method.name}}({{method.argument_decla
rations | join(', ')}}) |
| 59 { | 59 { |
| 60 {% set return_default = 'return true' | 60 {% set return_default = 'return true' |
| 61 if method.return_idl_type == 'boolean' else 'return' %}{# void #} | 61 if method.return_idl_type == 'boolean' else 'return' %}{# void #} |
| 62 if (!canInvokeCallback()) | 62 if (!canInvokeCallback()) |
| 63 {{return_default}}; | 63 {{return_default}}; |
| 64 | 64 |
| 65 v8::HandleScope handleScope(m_isolate); | 65 v8::HandleScope handleScope(m_isolate); |
| 66 | 66 |
| 67 v8::Handle<v8::Context> v8Context = toV8Context(executionContext(), m_world.
get()); | 67 v8::Handle<v8::Context> v8Context = toV8Context(executionContext(), m_world)
; |
| 68 if (v8Context.IsEmpty()) | 68 if (v8Context.IsEmpty()) |
| 69 {{return_default}}; | 69 {{return_default}}; |
| 70 | 70 |
| 71 v8::Context::Scope scope(v8Context); | 71 v8::Context::Scope scope(v8Context); |
| 72 {% if method.call_with_this_handle %} | 72 {% if method.call_with_this_handle %} |
| 73 v8::Handle<v8::Value> thisHandle = thisValue.v8Value(); | 73 v8::Handle<v8::Value> thisHandle = thisValue.v8Value(); |
| 74 if (thisHandle.IsEmpty()) { | 74 if (thisHandle.IsEmpty()) { |
| 75 if (!isScriptControllerTerminating()) | 75 if (!isScriptControllerTerminating()) |
| 76 CRASH(); | 76 CRASH(); |
| 77 {{return_default}}; | 77 {{return_default}}; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 96 {% if method.return_idl_type == 'boolean' %} | 96 {% if method.return_idl_type == 'boolean' %} |
| 97 return invokeCallback(m_callback.newLocal(m_isolate), {{this_handle_paramete
r}}{{method.arguments | length}}, argv, executionContext(), m_isolate); | 97 return invokeCallback(m_callback.newLocal(m_isolate), {{this_handle_paramete
r}}{{method.arguments | length}}, argv, executionContext(), m_isolate); |
| 98 {% else %}{# void #} | 98 {% else %}{# void #} |
| 99 invokeCallback(m_callback.newLocal(m_isolate), {{this_handle_parameter}}{{me
thod.arguments | length}}, argv, executionContext(), m_isolate); | 99 invokeCallback(m_callback.newLocal(m_isolate), {{this_handle_parameter}}{{me
thod.arguments | length}}, argv, executionContext(), m_isolate); |
| 100 {% endif %} | 100 {% endif %} |
| 101 } | 101 } |
| 102 | 102 |
| 103 {% endfor %} | 103 {% endfor %} |
| 104 } // namespace WebCore | 104 } // namespace WebCore |
| 105 {% endfilter %} | 105 {% endfilter %} |
| OLD | NEW |