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

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

Issue 1853743005: Oilpan: Remove WillBe types (part 13) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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, v8_value_to_loc al_cpp_value, check_origin_trial %} 1 {% from 'utilities.cpp' import declare_enum_validation_variable, v8_value_to_loc al_cpp_value, check_origin_trial %}
2 2
3 {##############################################################################} 3 {##############################################################################}
4 {% macro generate_method(method, world_suffix) %} 4 {% macro generate_method(method, world_suffix) %}
5 {% if method.returns_promise and method.has_exception_state %} 5 {% if method.returns_promise and method.has_exception_state %}
6 static void {{method.name}}{{method.overload_index}}Method{{world_suffix}}Promis e(const v8::FunctionCallbackInfo<v8::Value>& info, ExceptionState& exceptionStat e) 6 static void {{method.name}}{{method.overload_index}}Method{{world_suffix}}Promis e(const v8::FunctionCallbackInfo<v8::Value>& info, ExceptionState& exceptionStat e)
7 {% else %} 7 {% else %}
8 static void {{method.name}}{{method.overload_index}}Method{{world_suffix}}(const v8::FunctionCallbackInfo<v8::Value>& info) 8 static void {{method.name}}{{method.overload_index}}Method{{world_suffix}}(const v8::FunctionCallbackInfo<v8::Value>& info)
9 {% endif %} 9 {% endif %}
10 { 10 {
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 {% endif %} 109 {% endif %}
110 {% endfor %} 110 {% endfor %}
111 } 111 }
112 {% endmacro %} 112 {% endmacro %}
113 113
114 114
115 {######################################} 115 {######################################}
116 {% macro generate_argument_var_declaration(argument) %} 116 {% macro generate_argument_var_declaration(argument) %}
117 {# FIXME: remove EventListener special case #} 117 {# FIXME: remove EventListener special case #}
118 {% if argument.idl_type == 'EventListener' %} 118 {% if argument.idl_type == 'EventListener' %}
119 RefPtrWillBeRawPtr<{{argument.idl_type}}> {{argument.name}} 119 RawPtr<{{argument.idl_type}}> {{argument.name}}
120 {%- else %} 120 {%- else %}
121 {{argument.cpp_type}} {{argument.name}} 121 {{argument.cpp_type}} {{argument.name}}
122 {%- endif %}{# argument.idl_type == 'EventListener' #} 122 {%- endif %}{# argument.idl_type == 'EventListener' #}
123 {% endmacro %} 123 {% endmacro %}
124 124
125 125
126 {######################################} 126 {######################################}
127 {% macro generate_argument(method, argument, world_suffix) %} 127 {% macro generate_argument(method, argument, world_suffix) %}
128 {% if argument.is_optional_without_default_value %} 128 {% if argument.is_optional_without_default_value %}
129 {# Optional arguments without a default value generate an early call with 129 {# Optional arguments without a default value generate an early call with
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 {# [CallWith=ScriptState] #} 244 {# [CallWith=ScriptState] #}
245 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); 245 ScriptState* scriptState = ScriptState::current(info.GetIsolate());
246 {% endif %} 246 {% endif %}
247 {% if method.is_call_with_execution_context %} 247 {% if method.is_call_with_execution_context %}
248 {# [ConstructorCallWith=ExecutionContext] #} 248 {# [ConstructorCallWith=ExecutionContext] #}
249 {# [CallWith=ExecutionContext] #} 249 {# [CallWith=ExecutionContext] #}
250 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate()); 250 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate());
251 {% endif %} 251 {% endif %}
252 {% if method.is_call_with_script_arguments %} 252 {% if method.is_call_with_script_arguments %}
253 {# [CallWith=ScriptArguments] #} 253 {# [CallWith=ScriptArguments] #}
254 RefPtrWillBeRawPtr<ScriptArguments> scriptArguments(ScriptArguments::create(scri ptState, info, {{method.number_of_arguments}})); 254 RawPtr<ScriptArguments> scriptArguments(ScriptArguments::create(scriptState, inf o, {{method.number_of_arguments}}));
255 {% endif %} 255 {% endif %}
256 {% if method.is_call_with_document %} 256 {% if method.is_call_with_document %}
257 {# [ConstructorCallWith=Document] #} 257 {# [ConstructorCallWith=Document] #}
258 Document& document = *toDocument(currentExecutionContext(info.GetIsolate())); 258 Document& document = *toDocument(currentExecutionContext(info.GetIsolate()));
259 {% endif %} 259 {% endif %}
260 {# Call #} 260 {# Call #}
261 {% if method.idl_type == 'void' %} 261 {% if method.idl_type == 'void' %}
262 {{cpp_value}}; 262 {{cpp_value}};
263 {% elif method.is_implemented_in_private_script %} 263 {% elif method.is_implemented_in_private_script %}
264 {{method.cpp_type}} result{{method.cpp_type_initializer}}; 264 {{method.cpp_type}} result{{method.cpp_type_initializer}};
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 {##############################################################################} 468 {##############################################################################}
469 {% macro generate_post_message_impl() %} 469 {% macro generate_post_message_impl() %}
470 void postMessageImpl(const char* interfaceName, {{cpp_class}}* instance, const v 8::FunctionCallbackInfo<v8::Value>& info) 470 void postMessageImpl(const char* interfaceName, {{cpp_class}}* instance, const v 8::FunctionCallbackInfo<v8::Value>& info)
471 { 471 {
472 ExceptionState exceptionState(ExceptionState::ExecutionContext, "postMessage ", interfaceName, info.Holder(), info.GetIsolate()); 472 ExceptionState exceptionState(ExceptionState::ExecutionContext, "postMessage ", interfaceName, info.Holder(), info.GetIsolate());
473 if (UNLIKELY(info.Length() < 1)) { 473 if (UNLIKELY(info.Length() < 1)) {
474 setMinimumArityTypeError(exceptionState, 1, info.Length()); 474 setMinimumArityTypeError(exceptionState, 1, info.Length());
475 exceptionState.throwIfNeeded(); 475 exceptionState.throwIfNeeded();
476 return; 476 return;
477 } 477 }
478 OwnPtrWillBeRawPtr<MessagePortArray> ports = adoptPtrWillBeNoop(new MessageP ortArray); 478 RawPtr<MessagePortArray> ports = adoptPtrWillBeNoop(new MessagePortArray);
479 ArrayBufferArray arrayBuffers; 479 ArrayBufferArray arrayBuffers;
480 ImageBitmapArray imageBitmaps; 480 ImageBitmapArray imageBitmaps;
481 if (info.Length() > 1) { 481 if (info.Length() > 1) {
482 const int transferablesArgIndex = 1; 482 const int transferablesArgIndex = 1;
483 if (!SerializedScriptValue::extractTransferables(info.GetIsolate(), info [transferablesArgIndex], transferablesArgIndex, *ports, arrayBuffers, imageBitma ps, exceptionState)) { 483 if (!SerializedScriptValue::extractTransferables(info.GetIsolate(), info [transferablesArgIndex], transferablesArgIndex, *ports, arrayBuffers, imageBitma ps, exceptionState)) {
484 exceptionState.throwIfNeeded(); 484 exceptionState.throwIfNeeded();
485 return; 485 return;
486 } 486 }
487 } 487 }
488 RefPtr<SerializedScriptValue> message = SerializedScriptValueFactory::instan ce().create(info.GetIsolate(), info[0], ports.get(), &arrayBuffers, &imageBitmap s, exceptionState); 488 RefPtr<SerializedScriptValue> message = SerializedScriptValueFactory::instan ce().create(info.GetIsolate(), info[0], ports.get(), &arrayBuffers, &imageBitmap s, exceptionState);
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
701 {% filter runtime_enabled(method.overloads.runtime_enabled_function_all 701 {% filter runtime_enabled(method.overloads.runtime_enabled_function_all
702 if method.overloads else 702 if method.overloads else
703 method.runtime_enabled_function) %} 703 method.runtime_enabled_function) %}
704 const V8DOMConfiguration::MethodConfiguration {{method.name}}MethodConfiguration = {{method_configuration(method)}}; 704 const V8DOMConfiguration::MethodConfiguration {{method.name}}MethodConfiguration = {{method_configuration(method)}};
705 V8DOMConfiguration::installMethod(isolate, v8::Local<v8::Object>(), prototypeObj ect, interfaceObject, defaultSignature, {{method.name}}MethodConfiguration); 705 V8DOMConfiguration::installMethod(isolate, v8::Local<v8::Object>(), prototypeObj ect, interfaceObject, defaultSignature, {{method.name}}MethodConfiguration);
706 {% endfilter %}{# runtime_enabled() #} 706 {% endfilter %}{# runtime_enabled() #}
707 {% endfilter %}{# exposed() #} 707 {% endfilter %}{# exposed() #}
708 {% endfor %} 708 {% endfor %}
709 {% endif %} 709 {% endif %}
710 {%- endmacro %} 710 {%- endmacro %}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698