Index: Source/bindings/scripts/v8_interface.py |
diff --git a/Source/bindings/scripts/v8_interface.py b/Source/bindings/scripts/v8_interface.py |
index 249ea0ba9bdb0cf6c41fb8eff6ce4a3a013c7878..cb6984c6790aa1a2b32dcfd8c83803fed02ae18f 100644 |
--- a/Source/bindings/scripts/v8_interface.py |
+++ b/Source/bindings/scripts/v8_interface.py |
@@ -1236,11 +1236,16 @@ def property_getter(getter, cpp_arguments): |
idl_type = getter.idl_type |
extended_attributes = getter.extended_attributes |
is_raises_exception = 'RaisesException' in extended_attributes |
+ is_call_with_script_state = False |
+ if 'CallWith' in extended_attributes and extended_attributes['CallWith'] == 'ScriptState': |
+ is_call_with_script_state = True |
haraken
2015/03/05 05:56:13
Use v8_utilities.has_extended_attribute_value(attr
|
use_output_parameter_for_result = idl_type.use_output_parameter_for_result |
# FIXME: make more generic, so can use v8_methods.cpp_value |
cpp_method_name = 'impl->%s' % cpp_name(getter) |
+ if is_call_with_script_state: |
+ cpp_arguments.insert(0, 'scriptState') |
if is_raises_exception: |
cpp_arguments.append('exceptionState') |
if use_output_parameter_for_result: |
@@ -1263,6 +1268,7 @@ def property_getter(getter, cpp_arguments): |
'is_enumerable': 'NotEnumerable' not in extended_attributes, |
'is_null_expression': is_null_expression(idl_type), |
'is_raises_exception': is_raises_exception, |
+ 'is_call_with_script_state': is_call_with_script_state, |
'name': cpp_name(getter), |
'use_output_parameter_for_result': use_output_parameter_for_result, |
'v8_set_return_value': idl_type.v8_set_return_value('result', extended_attributes=extended_attributes, script_wrappable='impl', release=idl_type.release), |
@@ -1276,6 +1282,9 @@ def property_setter(setter, interface): |
idl_type = setter.arguments[1].idl_type |
extended_attributes = setter.extended_attributes |
is_raises_exception = 'RaisesException' in extended_attributes |
+ is_call_with_script_state = False |
+ if 'CallWith' in extended_attributes and extended_attributes['CallWith'] == 'ScriptState': |
+ is_call_with_script_state = True |
# [TypeChecking=Interface] / [LegacyInterfaceTypeChecking] |
has_type_checking_interface = ( |
@@ -1290,6 +1299,7 @@ def property_setter(setter, interface): |
'is_custom': 'Custom' in extended_attributes, |
'is_nullable': idl_type.is_nullable, |
'is_raises_exception': is_raises_exception, |
+ 'is_call_with_script_state': is_call_with_script_state, |
'name': cpp_name(setter), |
'v8_value_to_local_cpp_value': idl_type.v8_value_to_local_cpp_value( |
extended_attributes, 'v8Value', 'propertyValue'), |
@@ -1302,8 +1312,12 @@ def property_deleter(deleter): |
idl_type = deleter.idl_type |
extended_attributes = deleter.extended_attributes |
+ is_call_with_script_state = False |
+ if 'CallWith' in extended_attributes and extended_attributes['CallWith'] == 'ScriptState': |
+ is_call_with_script_state = True |
return { |
'is_custom': 'Custom' in extended_attributes, |
'is_raises_exception': 'RaisesException' in extended_attributes, |
+ 'is_call_with_script_state': is_call_with_script_state, |
'name': cpp_name(deleter), |
} |