| 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 6146238c740ee40050d1a8a9b76532efc58ab139..0fc3327b6d19f57c5fdbe4690e100f60653626e6 100644
|
| --- a/third_party/WebKit/Source/bindings/templates/dictionary_v8.cpp.tmpl
|
| +++ b/third_party/WebKit/Source/bindings/templates/dictionary_v8.cpp.tmpl
|
| @@ -12,9 +12,9 @@ namespace blink {
|
|
|
| {% 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;
|
| }
|
| @@ -23,14 +23,14 @@ 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 %}
|
| }
|
|
|
| {% if parent_v8_class %}
|
| {{parent_v8_class}}::toImpl(isolate, v8Value, impl, exceptionState);
|
| - if (exceptionState.hadException())
|
| + if (exceptionState.HadException())
|
| return;
|
|
|
| {% endif %}
|
| @@ -38,21 +38,21 @@ void {{v8_class}}::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value, {{
|
| {% if members %}
|
| v8::TryCatch block(isolate);
|
| v8::Local<v8::Object> v8Object;
|
| - if (!v8Call(v8Value->ToObject(isolate->GetCurrentContext()), v8Object, block)) {
|
| - exceptionState.rethrowV8Exception(block.Exception());
|
| + if (!V8Call(v8Value->ToObject(isolate->GetCurrentContext()), v8Object, block)) {
|
| + exceptionState.RethrowV8Exception(block.Exception());
|
| return;
|
| }
|
| {% endif %}
|
| {% for member in members %}
|
| {% filter runtime_enabled(member.runtime_enabled_feature_name) %}
|
| v8::Local<v8::Value> {{member.name}}Value;
|
| - if (!v8Object->Get(isolate->GetCurrentContext(), v8AtomicString(isolate, "{{member.name}}")).ToLocal(&{{member.name}}Value)) {
|
| - exceptionState.rethrowV8Exception(block.Exception());
|
| + if (!v8Object->Get(isolate->GetCurrentContext(), V8AtomicString(isolate, "{{member.name}}")).ToLocal(&{{member.name}}Value)) {
|
| + 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.
|
| @@ -63,22 +63,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 %}
|
| @@ -89,7 +89,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);
|
| @@ -105,17 +105,17 @@ bool toV8{{cpp_class}}(const {{cpp_class}}& impl, v8::Local<v8::Object> dictiona
|
| {% for member in members %}
|
| if (impl.{{member.has_method_name}}()) {
|
| {% if member.is_object %}
|
| - DCHECK(impl.{{member.getter_name}}().isObject());
|
| + DCHECK(impl.{{member.getter_name}}().IsObject());
|
| {% endif %}
|
| - if (!v8CallBoolean(dictionary->CreateDataProperty(isolate->GetCurrentContext(), v8AtomicString(isolate, "{{member.name}}"), {{member.cpp_value_to_v8_value}})))
|
| + if (!V8CallBoolean(dictionary->CreateDataProperty(isolate->GetCurrentContext(), V8AtomicString(isolate, "{{member.name}}"), {{member.cpp_value_to_v8_value}})))
|
| return false;
|
| {% if member.v8_default_value %}
|
| } else {
|
| - if (!v8CallBoolean(dictionary->CreateDataProperty(isolate->GetCurrentContext(), v8AtomicString(isolate, "{{member.name}}"), {{member.v8_default_value}})))
|
| + if (!V8CallBoolean(dictionary->CreateDataProperty(isolate->GetCurrentContext(), V8AtomicString(isolate, "{{member.name}}"), {{member.v8_default_value}})))
|
| return false;
|
| {% elif member.is_nullable %}
|
| } else {
|
| - if (!v8CallBoolean(dictionary->CreateDataProperty(isolate->GetCurrentContext(), v8AtomicString(isolate, "{{member.name}}"), v8::Null(isolate))))
|
| + if (!V8CallBoolean(dictionary->CreateDataProperty(isolate->GetCurrentContext(), V8AtomicString(isolate, "{{member.name}}"), v8::Null(isolate))))
|
| return false;
|
| {% elif member.is_required %}
|
| } else {
|
| @@ -127,7 +127,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;
|
|
|