Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(136)

Side by Side Diff: third_party/WebKit/Source/bindings/templates/callback_function.cpp.tmpl

Issue 2433773006: Remove ExecutionContext::activeDOMObjectsAreStopped()
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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 #}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698