| OLD | NEW |
| 1 {% from 'utilities.cpp.tmpl' import v8_value_to_local_cpp_value %} | 1 {% from 'utilities.cpp.tmpl' import v8_value_to_local_cpp_value %} |
| 2 {% filter format_blink_cpp_source_code %} | 2 {% filter format_blink_cpp_source_code %} |
| 3 | 3 |
| 4 {% include 'copyright_block.txt' %} | 4 {% include 'copyright_block.txt' %} |
| 5 | 5 |
| 6 #include "{{cpp_class}}.h" | 6 #include "{{cpp_class}}.h" |
| 7 | 7 |
| 8 {% for filename in cpp_includes %} | 8 {% for filename in cpp_includes %} |
| 9 #include "{{filename}}" | 9 #include "{{filename}}" |
| 10 {% endfor %} | 10 {% endfor %} |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 return false; | 28 return false; |
| 29 | 29 |
| 30 ExecutionContext* context = scriptState->getExecutionContext(); | 30 ExecutionContext* context = scriptState->getExecutionContext(); |
| 31 DCHECK(context); | 31 DCHECK(context); |
| 32 if (context->activeDOMObjectsAreSuspended() || context->activeDOMObjectsAreS
topped()) | 32 if (context->activeDOMObjectsAreSuspended() || context->activeDOMObjectsAreS
topped()) |
| 33 return false; | 33 return false; |
| 34 | 34 |
| 35 if (m_callback.isEmpty()) | 35 if (m_callback.isEmpty()) |
| 36 return false; | 36 return false; |
| 37 | 37 |
| 38 // TODO(bashi): Make sure that using TrackExceptionState is OK. |
| 39 // crbug.com/653769 |
| 40 TrackExceptionState exceptionState; |
| 38 ScriptState::Scope scope(scriptState); | 41 ScriptState::Scope scope(scriptState); |
| 39 | 42 |
| 40 {% for argument in arguments %} | 43 {% for argument in arguments %} |
| 41 v8::Local<v8::Value> {{argument.argument_name}} = {{argument.cpp_value_to_v8
_value}}; | 44 v8::Local<v8::Value> {{argument.argument_name}} = {{argument.cpp_value_to_v8
_value}}; |
| 42 {% endfor %} | 45 {% endfor %} |
| 43 | 46 |
| 44 v8::Local<v8::Value> thisValue = toV8(scriptWrappable, scriptState->context(
)->Global(), scriptState->isolate()); | 47 v8::Local<v8::Value> thisValue = toV8(scriptWrappable, scriptState->context(
)->Global(), scriptState->isolate()); |
| 45 | 48 |
| 46 {% if arguments %} | 49 {% if arguments %} |
| 47 v8::Local<v8::Value> argv[] = { {{arguments | join(', ', 'argument_name')}}
}; | 50 v8::Local<v8::Value> argv[] = { {{arguments | join(', ', 'argument_name')}}
}; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 61 returnValue = cppValue; | 64 returnValue = cppValue; |
| 62 {% endif %} | 65 {% endif %} |
| 63 return true; | 66 return true; |
| 64 } | 67 } |
| 65 return false; | 68 return false; |
| 66 } | 69 } |
| 67 | 70 |
| 68 } // namespace blink | 71 } // namespace blink |
| 69 | 72 |
| 70 {% endfilter %}{# format_blink_cpp_source_code #} | 73 {% endfilter %}{# format_blink_cpp_source_code #} |
| OLD | NEW |