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

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

Issue 713683003: IDL: Support optional union type arguments with default values (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: add unit tests Created 6 years, 1 month 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_union.py
diff --git a/Source/bindings/scripts/v8_union.py b/Source/bindings/scripts/v8_union.py
index 791e95ea7d0c650c598a6e126cb6c562a17189a5..9d4fae6132ef654bde08bbfb2c4e7a71f452d2fb 100644
--- a/Source/bindings/scripts/v8_union.py
+++ b/Source/bindings/scripts/v8_union.py
@@ -74,17 +74,11 @@ def container_context(union_type, interfaces_info):
if dictionary_type:
raise Exception('%s is ambiguous.' % union_type.name)
dictionary_type = context
- elif member.base_type == 'boolean':
- if boolean_type:
- raise Exception('%s is ambiguous.' % union_type.name)
+ elif member is union_type.boolean_member_type:
boolean_type = context
- elif member.is_numeric_type:
- if numeric_type:
- raise Exception('%s is ambiguous.' % union_type.name)
+ elif member is union_type.numeric_member_type:
numeric_type = context
- elif member.is_string_type:
- if string_type:
- raise Exception('%s is ambiguous.' % union_type.name)
+ elif member is union_type.string_member_type:
string_type = context
else:
raise Exception('%s is not supported as an union member.' % member.name)

Powered by Google App Engine
This is Rietveld 408576698