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

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

Issue 2707243006: [SharedArrayBuffer] Prevent SharedArrayBuffer being used in Web APIs (Closed)
Patch Set: update comment, add TODO 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_attributes.py
diff --git a/third_party/WebKit/Source/bindings/scripts/v8_attributes.py b/third_party/WebKit/Source/bindings/scripts/v8_attributes.py
index ecc6277fdad954aa8a483b724019efb5c47e2a87..2ab1aecf129b6a9628e4025987ad33caf3a38aec 100644
--- a/third_party/WebKit/Source/bindings/scripts/v8_attributes.py
+++ b/third_party/WebKit/Source/bindings/scripts/v8_attributes.py
@@ -286,8 +286,13 @@ def getter_context(interface, attribute, context):
cpp_value, extended_attributes=extended_attributes, script_wrappable='impl',
for_main_world=for_main_world, is_static=attribute.is_static)
+ cpp_value_to_script_wrappable = cpp_value
+ if idl_type.is_array_buffer_view_or_typed_array:
+ cpp_value_to_script_wrappable += '.View()'
+
context.update({
'cpp_value': cpp_value,
+ 'cpp_value_to_script_wrappable': cpp_value_to_script_wrappable,
'cpp_value_to_v8_value': idl_type.cpp_value_to_v8_value(
cpp_value=cpp_value, creation_context='holder',
extended_attributes=extended_attributes),
@@ -318,7 +323,8 @@ def getter_expression(interface, attribute, context):
expression = '%s(%s)' % (getter_name, ', '.join(arguments))
# Needed to handle getter expressions returning Type& as the
# use site for |expression| expects Type*.
- if attribute.idl_type.is_interface_type and len(arguments) == 0:
+ if (attribute.idl_type.is_interface_type and len(arguments) == 0 and
+ not attribute.idl_type.is_array_buffer_view_or_typed_array):
return 'WTF::GetPtr(%s)' % expression
return expression
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/V8Binding.h ('k') | third_party/WebKit/Source/bindings/scripts/v8_dictionary.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698