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

Unified Diff: Source/bindings/scripts/v8_attributes.py

Issue 357413003: IDL: Drop redundant null check for string and wrapper type attributes (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: updated Created 6 years, 6 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
« no previous file with comments | « no previous file | Source/bindings/scripts/v8_types.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/scripts/v8_attributes.py
diff --git a/Source/bindings/scripts/v8_attributes.py b/Source/bindings/scripts/v8_attributes.py
index c9d64402af6f4b457c2bf1ca0e35970a4825b631..86db49252e792ec216bbd7a8d5de29c8b904b856 100644
--- a/Source/bindings/scripts/v8_attributes.py
+++ b/Source/bindings/scripts/v8_attributes.py
@@ -94,7 +94,6 @@ def attribute_context(interface, attribute):
if is_constructor_attribute(attribute) else None,
'cpp_name': cpp_name(attribute),
'cpp_type': idl_type.cpp_type,
- 'cpp_value_to_v8_value': idl_type.cpp_value_to_v8_value(cpp_value='original', creation_context='info.Holder()'),
'deprecate_as': v8_utilities.deprecate_as(attribute), # [DeprecateAs]
'enum_validation_expression': idl_type.enum_validation_expression,
'has_custom_getter': has_custom_getter,
@@ -170,9 +169,10 @@ def getter_context(interface, attribute, context):
# FIXME: check if compilers are smart enough to inline this, and if so,
# always use a local variable (for readability and CG simplicity).
release = False
- if (idl_type.is_nullable or
+ if ((idl_type.is_nullable and not context['is_nullable_simple']) or
base_idl_type == 'EventHandler' or
'CachedAttribute' in extended_attributes or
+ 'LogPreviousValue' in extended_attributes or
Jens Widell 2014/07/01 06:43:22 Added this to avoid the [LogPreviousValue] code ca
haraken 2014/07/01 06:47:17 Yes, we're deprecating it with pmarch@.
'ReflectOnly' in extended_attributes or
context['is_keep_alive_for_gc'] or
context['is_getter_raises_exception']):
@@ -189,7 +189,9 @@ def getter_context(interface, attribute, context):
context.update({
'cpp_value': cpp_value,
- 'cpp_value_to_v8_value': idl_type.cpp_value_to_v8_value(cpp_value=cpp_value, creation_context='info.Holder()'),
+ 'cpp_value_to_v8_value': idl_type.cpp_value_to_v8_value(
+ cpp_value=cpp_value, creation_context='info.Holder()',
+ extended_attributes=extended_attributes),
Jens Widell 2014/07/01 06:43:23 Passing 'extended_attributes' here since it affect
'v8_set_return_value_for_main_world': v8_set_return_value_statement(for_main_world=True),
'v8_set_return_value': v8_set_return_value_statement(),
})
« no previous file with comments | « no previous file | Source/bindings/scripts/v8_types.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698