| 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 11 matching lines...) Expand all Loading... |
| 22 { | 22 { |
| 23 } | 23 } |
| 24 | 24 |
| 25 bool {{cpp_class}}::call({{argument_declarations | join(', ')}}) | 25 bool {{cpp_class}}::call({{argument_declarations | join(', ')}}) |
| 26 { | 26 { |
| 27 if (!scriptState->contextIsValid()) | 27 if (!scriptState->contextIsValid()) |
| 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()) |
| 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. | 38 // TODO(bashi): Make sure that using TrackExceptionState is OK. |
| 39 // crbug.com/653769 | 39 // crbug.com/653769 |
| 40 TrackExceptionState exceptionState; | 40 TrackExceptionState exceptionState; |
| 41 ScriptState::Scope scope(scriptState); | 41 ScriptState::Scope scope(scriptState); |
| 42 | 42 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 64 returnValue = cppValue; | 64 returnValue = cppValue; |
| 65 {% endif %} | 65 {% endif %} |
| 66 return true; | 66 return true; |
| 67 } | 67 } |
| 68 return false; | 68 return false; |
| 69 } | 69 } |
| 70 | 70 |
| 71 } // namespace blink | 71 } // namespace blink |
| 72 | 72 |
| 73 {% endfilter %}{# format_blink_cpp_source_code #} | 73 {% endfilter %}{# format_blink_cpp_source_code #} |
| OLD | NEW |