| Index: third_party/WebKit/Source/bindings/templates/dictionary_v8.cpp.tmpl
|
| diff --git a/third_party/WebKit/Source/bindings/templates/dictionary_v8.cpp.tmpl b/third_party/WebKit/Source/bindings/templates/dictionary_v8.cpp.tmpl
|
| index cad3566b8f85d33da7330d02acd7e53152a698bd..7b718cb97970be6ce85266ae5c9ec91121df109b 100644
|
| --- a/third_party/WebKit/Source/bindings/templates/dictionary_v8.cpp.tmpl
|
| +++ b/third_party/WebKit/Source/bindings/templates/dictionary_v8.cpp.tmpl
|
| @@ -17,16 +17,16 @@ static const v8::Eternal<v8::Name>* eternal{{v8_class}}Keys(v8::Isolate* isolate
|
| "{{member.name}}",
|
| {% endfor %}
|
| };
|
| - return V8PerIsolateData::from(isolate)->findOrCreateEternalNameCache(
|
| + return V8PerIsolateData::From(isolate)->FindOrCreateEternalNameCache(
|
| kKeys, kKeys, WTF_ARRAY_LENGTH(kKeys));
|
| }
|
| {% endif %}
|
|
|
| {% from 'utilities.cpp.tmpl' import v8_value_to_local_cpp_value %}
|
| void {{v8_class}}::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value, {{cpp_class}}& impl, ExceptionState& exceptionState) {
|
| - if (isUndefinedOrNull(v8Value)) {
|
| + if (IsUndefinedOrNull(v8Value)) {
|
| {% if required_member_names %}
|
| - exceptionState.throwTypeError("Missing required member(s): {{required_member_names|join(', ')}}.");
|
| + exceptionState.ThrowTypeError("Missing required member(s): {{required_member_names|join(', ')}}.");
|
| {% endif %}
|
| return;
|
| }
|
| @@ -35,7 +35,7 @@ void {{v8_class}}::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value, {{
|
| // Do nothing.
|
| return;
|
| {% else %}
|
| - exceptionState.throwTypeError("cannot convert to dictionary.");
|
| + exceptionState.ThrowTypeError("cannot convert to dictionary.");
|
| return;
|
| {% endif %}
|
| }
|
| @@ -44,7 +44,7 @@ void {{v8_class}}::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value, {{
|
|
|
| {% if parent_v8_class %}
|
| {{parent_v8_class}}::toImpl(isolate, v8Value, impl, exceptionState);
|
| - if (exceptionState.hadException())
|
| + if (exceptionState.HadException())
|
| return;
|
|
|
| {% endif %}
|
| @@ -58,12 +58,12 @@ void {{v8_class}}::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value, {{
|
| {% filter runtime_enabled(member.runtime_enabled_feature_name) %}
|
| v8::Local<v8::Value> {{member.name}}Value;
|
| if (!v8Object->Get(context, keys[{{loop.index0}}].Get(isolate)).ToLocal(&{{member.name}}Value)) {
|
| - exceptionState.rethrowV8Exception(block.Exception());
|
| + exceptionState.RethrowV8Exception(block.Exception());
|
| return;
|
| }
|
| if ({{member.name}}Value.IsEmpty() || {{member.name}}Value->IsUndefined()) {
|
| {% if member.is_required %}
|
| - exceptionState.throwTypeError("required member {{member.name}} is undefined.");
|
| + exceptionState.ThrowTypeError("required member {{member.name}} is undefined.");
|
| return;
|
| {% else %}
|
| // Do nothing.
|
| @@ -74,22 +74,22 @@ void {{v8_class}}::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value, {{
|
| {% endif %}
|
| } else {
|
| {% if member.deprecate_as %}
|
| - Deprecation::countDeprecation(currentExecutionContext(isolate), UseCounter::{{member.deprecate_as}});
|
| + Deprecation::CountDeprecation(CurrentExecutionContext(isolate), UseCounter::k{{member.deprecate_as}});
|
| {% endif %}
|
| {{v8_value_to_local_cpp_value(member) | indent}}
|
| {% if member.is_interface_type %}
|
| if (!{{member.name}}) {
|
| - exceptionState.throwTypeError("member {{member.name}} is not of type {{member.idl_type}}.");
|
| + exceptionState.ThrowTypeError("member {{member.name}} is not of type {{member.idl_type}}.");
|
| return;
|
| }
|
| {% endif %}
|
| {% if member.enum_values %}
|
| {{declare_enum_validation_variable(member.enum_values) | indent}}
|
| - if (!isValidEnum({{member.name}}, validValues, WTF_ARRAY_LENGTH(validValues), "{{member.enum_type}}", exceptionState))
|
| + if (!IsValidEnum({{member.name}}, validValues, WTF_ARRAY_LENGTH(validValues), "{{member.enum_type}}", exceptionState))
|
| return;
|
| {% elif member.is_object %}
|
| - if (!{{member.name}}.isObject()) {
|
| - exceptionState.throwTypeError("member {{member.name}} is not an object.");
|
| + if (!{{member.name}}.IsObject()) {
|
| + exceptionState.ThrowTypeError("member {{member.name}} is not an object.");
|
| return;
|
| }
|
| {% endif %}
|
| @@ -100,7 +100,7 @@ void {{v8_class}}::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value, {{
|
| {% endfor %}
|
| }
|
|
|
| -v8::Local<v8::Value> {{cpp_class}}::toV8Impl(v8::Local<v8::Object> creationContext, v8::Isolate* isolate) const {
|
| +v8::Local<v8::Value> {{cpp_class}}::ToV8Impl(v8::Local<v8::Object> creationContext, v8::Isolate* isolate) const {
|
| v8::Local<v8::Object> v8Object = v8::Object::New(isolate);
|
| if (!toV8{{cpp_class}}(*this, v8Object, creationContext, isolate))
|
| return v8::Undefined(isolate);
|
| @@ -122,7 +122,7 @@ bool toV8{{cpp_class}}(const {{cpp_class}}& impl, v8::Local<v8::Object> dictiona
|
| bool {{member.name}}HasValueOrDefault = false;
|
| if (impl.{{member.has_method_name}}()) {
|
| {% if member.is_object %}
|
| - DCHECK(impl.{{member.getter_name}}().isObject());
|
| + DCHECK(impl.{{member.getter_name}}().IsObject());
|
| {% endif %}
|
| {{member.name}}Value = {{member.cpp_value_to_v8_value}};
|
| {{member.name}}HasValueOrDefault = true;
|
| @@ -144,7 +144,7 @@ bool toV8{{cpp_class}}(const {{cpp_class}}& impl, v8::Local<v8::Object> dictiona
|
| If there is not, then the compiler will inline this call into the only branch that sets it to true.
|
| Either way, the code is efficient and the variable is completely elided. #}
|
| if ({{member.name}}HasValueOrDefault &&
|
| - !v8CallBoolean(dictionary->CreateDataProperty(context, keys[{{loop.index0}}].Get(isolate), {{member.name}}Value))) {
|
| + !V8CallBoolean(dictionary->CreateDataProperty(context, keys[{{loop.index0}}].Get(isolate), {{member.name}}Value))) {
|
| return false;
|
| }
|
|
|
| @@ -152,7 +152,7 @@ bool toV8{{cpp_class}}(const {{cpp_class}}& impl, v8::Local<v8::Object> dictiona
|
| return true;
|
| }
|
|
|
| -{{cpp_class}} NativeValueTraits<{{cpp_class}}>::nativeValue(v8::Isolate* isolate, v8::Local<v8::Value> value, ExceptionState& exceptionState) {
|
| +{{cpp_class}} NativeValueTraits<{{cpp_class}}>::NativeValue(v8::Isolate* isolate, v8::Local<v8::Value> value, ExceptionState& exceptionState) {
|
| {{cpp_class}} impl;
|
| {{v8_class}}::toImpl(isolate, value, impl, exceptionState);
|
| return impl;
|
|
|