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

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

Issue 1531443003: [bindings] Implement an ExperimentEnabled IDL extended attribute. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More sharing. Created 4 years, 12 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 'conversions.cpp' import declare_enum_validation_variable %} 1 {% from 'conversions.cpp' import declare_enum_validation_variable %}
2 {% include 'copyright_block.txt' %} 2 {% include 'copyright_block.txt' %}
3 #include "config.h" 3 #include "config.h"
4 #include "{{v8_original_class}}.h" 4 #include "{{v8_original_class}}.h"
5 5
6 {% for filename in cpp_includes if filename != '%s.h' % v8_class %} 6 {% for filename in cpp_includes if filename != '%s.h' % v8_class %}
7 #include "{{filename}}" 7 #include "{{filename}}"
8 {% endfor %} 8 {% endfor %}
9 9
10 namespace blink { 10 namespace blink {
(...skipping 23 matching lines...) Expand all
34 {% if members %} 34 {% if members %}
35 v8::TryCatch block(isolate); 35 v8::TryCatch block(isolate);
36 v8::Local<v8::Object> v8Object; 36 v8::Local<v8::Object> v8Object;
37 if (!v8Call(v8Value->ToObject(isolate->GetCurrentContext()), v8Object, block )) { 37 if (!v8Call(v8Value->ToObject(isolate->GetCurrentContext()), v8Object, block )) {
38 exceptionState.rethrowV8Exception(block.Exception()); 38 exceptionState.rethrowV8Exception(block.Exception());
39 return; 39 return;
40 } 40 }
41 {% endif %} 41 {% endif %}
42 {% for member in members %} 42 {% for member in members %}
43 {% if member.runtime_enabled_function %} 43 {% if member.runtime_enabled_function %}
44 if ({{member.runtime_enabled_function}}()) { 44 if ({{member.runtime_enabled_function}}) {
45 {% else %} 45 {% else %}
46 { 46 {
47 {% endif %} 47 {% endif %}
48 v8::Local<v8::Value> {{member.name}}Value; 48 v8::Local<v8::Value> {{member.name}}Value;
49 if (!v8Object->Get(isolate->GetCurrentContext(), v8String(isolate, "{{me mber.name}}")).ToLocal(&{{member.name}}Value)) { 49 if (!v8Object->Get(isolate->GetCurrentContext(), v8String(isolate, "{{me mber.name}}")).ToLocal(&{{member.name}}Value)) {
50 exceptionState.rethrowV8Exception(block.Exception()); 50 exceptionState.rethrowV8Exception(block.Exception());
51 return; 51 return;
52 } 52 }
53 if ({{member.name}}Value.IsEmpty() || {{member.name}}Value->IsUndefined( )) { 53 if ({{member.name}}Value.IsEmpty() || {{member.name}}Value->IsUndefined( )) {
54 {% if member.is_required %} 54 {% if member.is_required %}
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 } 125 }
126 126
127 {{cpp_class}} NativeValueTraits<{{cpp_class}}>::nativeValue(v8::Isolate* isolate , v8::Local<v8::Value> value, ExceptionState& exceptionState) 127 {{cpp_class}} NativeValueTraits<{{cpp_class}}>::nativeValue(v8::Isolate* isolate , v8::Local<v8::Value> value, ExceptionState& exceptionState)
128 { 128 {
129 {{cpp_class}} impl; 129 {{cpp_class}} impl;
130 {{v8_class}}::toImpl(isolate, value, impl, exceptionState); 130 {{v8_class}}::toImpl(isolate, value, impl, exceptionState);
131 return impl; 131 return impl;
132 } 132 }
133 133
134 } // namespace blink 134 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698