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

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

Issue 474173002: IDL: Use IdlNullableType wrapper to represent nullable types (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: cleanup Created 6 years, 4 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 | « Source/bindings/scripts/idl_types.py ('k') | 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_dictionary.py
diff --git a/Source/bindings/scripts/v8_dictionary.py b/Source/bindings/scripts/v8_dictionary.py
index fd10f8c2a027973335a2f0aa1dfccd37c15eb382..69fd1c082bb946f79594e24767d3281f697c7ee3 100644
--- a/Source/bindings/scripts/v8_dictionary.py
+++ b/Source/bindings/scripts/v8_dictionary.py
@@ -6,7 +6,6 @@
implementation classes that are used by blink's core/modules.
"""
-import copy
import operator
from v8_globals import includes
import v8_types
@@ -52,12 +51,9 @@ def member_context(member):
idl_type.add_includes_for_type()
def idl_type_for_default_value():
- copied_type = copy.copy(idl_type)
- # IdlType for default values shouldn't be nullable. Otherwise,
- # it will generate meaningless expression like
- # 'String("default value").isNull() ? ...'.
- copied_type.is_nullable = False
- return copied_type
+ if idl_type.is_nullable:
+ return idl_type.inner_type
+ return idl_type
def default_values():
if not member.default_value:
« no previous file with comments | « Source/bindings/scripts/idl_types.py ('k') | Source/bindings/scripts/v8_types.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698