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

Unified Diff: third_party/WebKit/Source/bindings/scripts/v8_methods.py

Issue 2707243006: [SharedArrayBuffer] Prevent SharedArrayBuffer being used in Web APIs (Closed)
Patch Set: remove unused checks Created 3 years, 8 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: third_party/WebKit/Source/bindings/scripts/v8_methods.py
diff --git a/third_party/WebKit/Source/bindings/scripts/v8_methods.py b/third_party/WebKit/Source/bindings/scripts/v8_methods.py
index 81263b8df8abdf0a06ad711019441f75c7c1a7e9..cf1862d9a6663f2b16ca484342586461a3ca8694 100644
--- a/third_party/WebKit/Source/bindings/scripts/v8_methods.py
+++ b/third_party/WebKit/Source/bindings/scripts/v8_methods.py
@@ -108,6 +108,15 @@ def method_context(interface, method, is_visible=True):
is_static = method.is_static
name = method.name
+ # TODO(binji): better way to do this?
+ if idl_type.is_explicit_nullable:
+ this_cpp_type = v8_types.cpp_template_type('Nullable',
+ idl_type.cpp_type)
+ elif idl_type.is_array_buffer_view_or_typed_array:
+ this_cpp_type = '%s::TypedArrayType*' % idl_type.cpp_type
haraken 2017/04/06 08:43:54 How is this type used? I cannot find this type in
binji 2017/04/09 00:40:02 This happens when a interface method returns an Ar
+ else:
+ this_cpp_type = idl_type.cpp_type
+
if is_visible:
idl_type.add_includes_for_type(extended_attributes)
@@ -159,8 +168,7 @@ def method_context(interface, method, is_visible=True):
return {
'activity_logging_world_list': v8_utilities.activity_logging_world_list(method), # [ActivityLogging]
'arguments': argument_contexts,
- 'cpp_type': (v8_types.cpp_template_type('Nullable', idl_type.cpp_type)
- if idl_type.is_explicit_nullable else idl_type.cpp_type),
+ 'cpp_type': this_cpp_type,
'cpp_value': this_cpp_value,
'cpp_type_initializer': idl_type.cpp_type_initializer,
'deprecate_as': v8_utilities.deprecate_as(method), # [DeprecateAs]

Powered by Google App Engine
This is Rietveld 408576698