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..b7c8ee4cafb4ed780014e8b48129b7252df39fa2 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,6 +92,10 @@ 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. |
+# Since V8 dosn't provide Promise primitive object currently, |
+# PRIMITIVE_TYPES doesn't contain Promise. |
yusukesuzuki
2013/09/04 06:37:00
Since V8 doesn't provide Promise primitive object
|
PRIMITIVE_TYPES = set([ |
'boolean', |
'void', |
@@ -211,6 +216,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]) |