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

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

Issue 1873323002: Have bindings layer assume and insist that all interface types are GCed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 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 f741c9e6be64ff77cc892ef8f1b00a2a92eab312..626c26679a3190795300568c7b2e2c16c0ae52d7 100644
--- a/third_party/WebKit/Source/bindings/scripts/v8_methods.py
+++ b/third_party/WebKit/Source/bindings/scripts/v8_methods.py
@@ -285,16 +285,6 @@ def argument_declarations_for_private_script(interface, method):
################################################################################
def cpp_value(interface, method, number_of_arguments):
- def cpp_argument(argument):
- idl_type = argument.idl_type
- if idl_type.name == 'EventListener':
- return argument.name
- if (idl_type.name in ['NodeFilter', 'NodeFilterOrNull',
- 'XPathNSResolver', 'XPathNSResolverOrNull']):
- # FIXME: remove this special case
- return '%s.release()' % argument.name
- return argument.name
-
# Truncate omitted optional arguments
arguments = method.arguments[:number_of_arguments]
cpp_arguments = []
@@ -315,7 +305,7 @@ def cpp_value(interface, method, number_of_arguments):
'ImplementedInPrivateScript' not in method.extended_attributes and
not method.is_static):
cpp_arguments.append('*impl')
- cpp_arguments.extend(cpp_argument(argument) for argument in arguments)
+ cpp_arguments.extend(argument.name for argument in arguments)
if 'ImplementedInPrivateScript' in method.extended_attributes:
if method.idl_type.name != 'void':
@@ -356,7 +346,6 @@ def v8_set_return_value(interface_name, method, cpp_value, for_main_world=False)
not idl_type.is_basic_type):
raise Exception('Private scripts supports only primitive types and DOM wrappers.')
- release = False
# [CallWith=ScriptState], [RaisesException]
if use_local_result(method):
if idl_type.is_explicit_nullable:
@@ -364,10 +353,9 @@ def v8_set_return_value(interface_name, method, cpp_value, for_main_world=False)
cpp_value = 'result.get()'
else:
cpp_value = 'result'
- release = idl_type.release
script_wrappable = 'impl' if inherits_interface(interface_name, 'Node') else ''
- return idl_type.v8_set_return_value(cpp_value, extended_attributes, script_wrappable=script_wrappable, release=release, for_main_world=for_main_world, is_static=method.is_static)
+ return idl_type.v8_set_return_value(cpp_value, extended_attributes, script_wrappable=script_wrappable, for_main_world=for_main_world, is_static=method.is_static)
def v8_value_to_local_cpp_variadic_value(method, argument, index, return_promise):
« no previous file with comments | « third_party/WebKit/Source/bindings/scripts/v8_interface.py ('k') | third_party/WebKit/Source/bindings/scripts/v8_types.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698