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

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

Issue 1579573002: Count feature usage for the current context instead of the calling one (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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' import declare_enum_validation_variable %} 1 {% from 'utilities.cpp' import declare_enum_validation_variable %}
2 {% include 'copyright_block.txt' %} 2 {% include 'copyright_block.txt' %}
3 #include "{{v8_original_class}}.h" 3 #include "{{v8_original_class}}.h"
4 4
5 {% for filename in cpp_includes if filename != '%s.h' % v8_class %} 5 {% for filename in cpp_includes if filename != '%s.h' % v8_class %}
6 #include "{{filename}}" 6 #include "{{filename}}"
7 {% endfor %} 7 {% endfor %}
8 8
9 namespace blink { 9 namespace blink {
10 10
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 return; 55 return;
56 {% else %} 56 {% else %}
57 // Do nothing. 57 // Do nothing.
58 {% endif %} 58 {% endif %}
59 {% if member.is_nullable %} 59 {% if member.is_nullable %}
60 } else if ({{member.name}}Value->IsNull()) { 60 } else if ({{member.name}}Value->IsNull()) {
61 impl.{{member.null_setter_name}}(); 61 impl.{{member.null_setter_name}}();
62 {% endif %} 62 {% endif %}
63 } else { 63 } else {
64 {% if member.deprecate_as %} 64 {% if member.deprecate_as %}
65 UseCounter::countDeprecationIfNotPrivateScript(isolate, callingExecu tionContext(isolate), UseCounter::{{member.deprecate_as}}); 65 UseCounter::countDeprecationIfNotPrivateScript(isolate, currentExecu tionContext(isolate), UseCounter::{{member.deprecate_as}});
66 {% endif %} 66 {% endif %}
67 {{v8_value_to_local_cpp_value(member) | indent(12)}} 67 {{v8_value_to_local_cpp_value(member) | indent(12)}}
68 {% if member.is_interface_type %} 68 {% if member.is_interface_type %}
69 if (!{{member.name}} && !{{member.name}}Value->IsNull()) { 69 if (!{{member.name}} && !{{member.name}}Value->IsNull()) {
70 exceptionState.throwTypeError("member {{member.name}} is not of type {{member.idl_type}}."); 70 exceptionState.throwTypeError("member {{member.name}} is not of type {{member.idl_type}}.");
71 return; 71 return;
72 } 72 }
73 {% endif %} 73 {% endif %}
74 {% if member.enum_values %} 74 {% if member.enum_values %}
75 {{declare_enum_validation_variable(member.enum_values) | indent(12)} } 75 {{declare_enum_validation_variable(member.enum_values) | indent(12)} }
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 } 124 }
125 125
126 {{cpp_class}} NativeValueTraits<{{cpp_class}}>::nativeValue(v8::Isolate* isolate , v8::Local<v8::Value> value, ExceptionState& exceptionState) 126 {{cpp_class}} NativeValueTraits<{{cpp_class}}>::nativeValue(v8::Isolate* isolate , v8::Local<v8::Value> value, ExceptionState& exceptionState)
127 { 127 {
128 {{cpp_class}} impl; 128 {{cpp_class}} impl;
129 {{v8_class}}::toImpl(isolate, value, impl, exceptionState); 129 {{v8_class}}::toImpl(isolate, value, impl, exceptionState);
130 return impl; 130 return impl;
131 } 131 }
132 132
133 } // namespace blink 133 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/bindings/templates/constants.cpp ('k') | third_party/WebKit/Source/bindings/templates/interface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698