Index: Source/bindings/templates/interface.cpp |
diff --git a/Source/bindings/templates/interface.cpp b/Source/bindings/templates/interface.cpp |
index 415d5b64ff30fecbd85a8bc199f21a2d6e3c8394..5e6be27116c96ab5ac67c00c00b1d117962fdce0 100644 |
--- a/Source/bindings/templates/interface.cpp |
+++ b/Source/bindings/templates/interface.cpp |
@@ -304,13 +304,21 @@ static void namedPropertySetterCallback(v8::Local<v8::Name> name, v8::Local<v8:: |
not named_property_getter.is_custom_property_query %} |
{# If there is an enumerator, there MUST be a query method to properly |
communicate property attributes. #} |
+{% set getter = named_property_getter %} |
static void namedPropertyQuery(v8::Local<v8::Name> name, const v8::PropertyCallbackInfo<v8::Integer>& info) |
{ |
{{cpp_class}}* impl = {{v8_class}}::toImpl(info.Holder()); |
AtomicString propertyName = toCoreAtomicString(name.As<v8::String>()); |
v8::String::Utf8Value namedProperty(name); |
ExceptionState exceptionState(ExceptionState::GetterContext, *namedProperty, "{{interface_name}}", info.Holder(), info.GetIsolate()); |
- bool result = impl->namedPropertyQuery(propertyName, exceptionState); |
+ {% if getter.is_call_with_script_state %} |
+ ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
+ {% endif %} |
+ {% set getter_arguments = ['propertyName', 'exceptionState'] %} |
+ {% if getter.is_call_with_script_state %} |
+ {% set getter_arguments = ['scriptState'] + getter_arguments %} |
+ {% endif %} |
haraken
2015/04/29 15:53:45
{% set getter_arguments = ['propertyName', 'except
|
+ bool result = impl->namedPropertyQuery({{getter_arguments | join(', ')}}); |
if (exceptionState.throwIfNeeded()) |
return; |
if (!result) |