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

Unified Diff: third_party/WebKit/Source/bindings/scripts/v8_types.py

Issue 2611823003: ABANDONED CL: Changes to compile and pass tests after Big Blink Rename (excluding functions). (Closed)
Patch Set: Inducing merge conflicts to force human review and changes after rename. Created 3 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/bindings/scripts/v8_types.py
diff --git a/third_party/WebKit/Source/bindings/scripts/v8_types.py b/third_party/WebKit/Source/bindings/scripts/v8_types.py
index ec7af0a77932b25708de186b51475696705c99ab..5638aa4d6b742cda272e0a6d9279ac997306b920 100644
--- a/third_party/WebKit/Source/bindings/scripts/v8_types.py
+++ b/third_party/WebKit/Source/bindings/scripts/v8_types.py
@@ -144,11 +144,11 @@ def cpp_type(idl_type, extended_attributes=None, raw_type=False, used_as_rvalue_
"""
def string_mode():
if idl_type.is_nullable:
- return 'TreatNullAndUndefinedAsNullString'
+ return 'kTreatNullAndUndefinedAsNullString'
if extended_attributes.get('TreatNullAs') == 'EmptyString':
- return 'TreatNullAsEmptyString'
+ return 'kTreatNullAsEmptyString'
if extended_attributes.get('TreatNullAs') == 'NullString':
- return 'TreatNullAsNullString'
+ return 'kTreatNullAsNullString'
return ''
extended_attributes = extended_attributes or {}
@@ -562,11 +562,11 @@ def v8_value_to_cpp_value(idl_type, extended_attributes, v8_value, variable_name
base_idl_type = 'FlexibleArrayBufferView'
if idl_type.is_integer_type:
- configuration = 'NormalConversion'
+ configuration = 'kNormalConversion'
if 'EnforceRange' in extended_attributes:
- configuration = 'EnforceRange'
+ configuration = 'kEnforceRange'
elif 'Clamp' in extended_attributes:
- configuration = 'Clamp'
+ configuration = 'kClamp'
arguments = ', '.join([v8_value, configuration, 'exceptionState'])
elif idl_type.v8_conversion_needs_exception_state:
arguments = ', '.join([v8_value, 'exceptionState'])
@@ -579,7 +579,8 @@ def v8_value_to_cpp_value(idl_type, extended_attributes, v8_value, variable_name
'{v8_value}->Is{idl_type}() ? '
'V8{idl_type}::toImpl(v8::Local<v8::{idl_type}>::Cast({v8_value})) : 0')
elif idl_type.is_union_type:
- nullable = 'UnionTypeConversionMode::Nullable' if idl_type.includes_nullable_type else 'UnionTypeConversionMode::NotNullable'
+ nullable = 'UnionTypeConversionMode::kNullable' if idl_type.includes_nullable_type \
+ else 'UnionTypeConversionMode::kNotNullable'
cpp_expression_format = 'V8{idl_type}::toImpl({isolate}, {v8_value}, {variable_name}, %s, exceptionState)' % nullable
elif idl_type.use_output_parameter_for_result:
cpp_expression_format = 'V8{idl_type}::toImpl({isolate}, {v8_value}, {variable_name}, exceptionState)'

Powered by Google App Engine
This is Rietveld 408576698