Index: Source/bindings/scripts/code_generator_v8.py |
diff --git a/Source/bindings/scripts/code_generator_v8.py b/Source/bindings/scripts/code_generator_v8.py |
index 0e647b49f749dc6951e431c48ed5340f24398a0a..1231a5bb49256d06b62f84c78d8d02bf015a0395 100644 |
--- a/Source/bindings/scripts/code_generator_v8.py |
+++ b/Source/bindings/scripts/code_generator_v8.py |
@@ -84,6 +84,7 @@ CPP_TYPE_SPECIAL_CONVERSION_RULES = { |
'byte': 'int', |
'boolean': 'bool', |
'DOMString': 'const String&', |
+ 'Promise': 'ScriptPromise', |
} |
CPP_UNSIGNED_TYPES = set([ |
'octet', |
@@ -91,10 +92,13 @@ CPP_UNSIGNED_TYPES = set([ |
'unsigned long', |
'unsigned short', |
]) |
+# Promise is not yet in the Web IDL spec but is going to be speced |
+# as primitive types in the future. |
PRIMITIVE_TYPES = set([ |
'boolean', |
'void', |
'Date', |
+ 'Promise', |
'byte', |
'octet', |
'short', |
@@ -211,6 +215,8 @@ def uncapitalize(name): |
def includes_for_type(data_type): |
if primitive_type(data_type) or data_type == 'DOMString': |
return set() |
+ if data_type == 'Promise': |
+ return set(['ScriptPromise.h']) |
if array_or_sequence_type(data_type): |
return includes_for_type(array_or_sequence_type(data_type)) |
return set(['V8%s.h' % data_type]) |