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

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

Issue 606653006: bindings: Adds DOMArrayBuffer, etc. as thin wrappers for ArrayBuffer, etc. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Synced. Created 6 years, 2 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_interface.py
diff --git a/Source/bindings/scripts/v8_interface.py b/Source/bindings/scripts/v8_interface.py
index 9cb32a59af27c5984346bf23bf7c82a820cc6830..b0d6d70bd13631412f902e8de9e043f5c38f2419 100644
--- a/Source/bindings/scripts/v8_interface.py
+++ b/Source/bindings/scripts/v8_interface.py
@@ -82,6 +82,23 @@ def interface_context(interface):
header_includes.update(v8_types.includes_for_interface(parent_interface))
extended_attributes = interface.extended_attributes
+ is_array_type = IdlType(interface.name).is_array_buffer_or_view
haraken 2014/10/16 05:41:41 is_array_type => is_array_buffer_or_view (or simpl
Yuki 2014/10/16 14:21:50 Done.
+ is_typed_array_type = IdlType(interface.name).is_typed_array
+ if is_array_type:
+ includes.add('bindings/core/v8/V8ArrayBuffer.h')
+ if interface.name == 'ArrayBufferView':
+ includes.update((
+ 'bindings/core/v8/V8Int8Array.h',
+ 'bindings/core/v8/V8Int16Array.h',
+ 'bindings/core/v8/V8Int32Array.h',
+ 'bindings/core/v8/V8Uint8Array.h',
+ 'bindings/core/v8/V8Uint8ClampedArray.h',
+ 'bindings/core/v8/V8Uint16Array.h',
+ 'bindings/core/v8/V8Uint32Array.h',
+ 'bindings/core/v8/V8Float32Array.h',
+ 'bindings/core/v8/V8Float64Array.h',
+ 'bindings/core/v8/V8DataView.h'))
+
# [ActiveDOMObject]
is_active_dom_object = 'ActiveDOMObject' in extended_attributes
@@ -157,12 +174,15 @@ def interface_context(interface):
'header_includes': header_includes,
'interface_name': interface.name,
'is_active_dom_object': is_active_dom_object,
+ 'is_array_type': is_array_type,
haraken 2014/10/16 05:41:41 is_array_type => is_array_buffer
Yuki 2014/10/16 14:21:50 Done.
'is_check_security': is_check_security,
'is_dependent_lifetime': is_dependent_lifetime,
'is_event_target': inherits_interface(interface.name, 'EventTarget'),
'is_exception': interface.is_exception,
'is_node': inherits_interface(interface.name, 'Node'),
'is_script_wrappable': is_script_wrappable,
+ 'is_typed_array_type': is_typed_array_type,
+ 'is_v8object': not is_array_type, # The object is wrapped with v8::Object.
haraken 2014/10/16 05:41:41 Hmm, I'd prefer not introducing is_v8object, given
Yuki 2014/10/16 14:21:50 Done.
'iterator_method': iterator_method,
'lifetime': 'Dependent'
if (has_visit_dom_wrapper or

Powered by Google App Engine
This is Rietveld 408576698