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

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: 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
Index: Source/bindings/scripts/v8_dictionary.py
diff --git a/Source/bindings/scripts/v8_dictionary.py b/Source/bindings/scripts/v8_dictionary.py
index 6dc772fdcf99944f5204b50dc7bcc8302e07093a..53892bc917ef282e972ed0e5325e36f76f6332d4 100644
--- a/Source/bindings/scripts/v8_dictionary.py
+++ b/Source/bindings/scripts/v8_dictionary.py
@@ -52,12 +52,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:

Powered by Google App Engine
This is Rietveld 408576698