X-Git-Url: http://git.webkit.org/?p=WebKit-https.git;a=blobdiff_plain;f=WebCore%2Fbindings%2Fscripts%2Ftest%2FV8%2FV8TestObj.cpp;h=94dcd5ee0aef042d3c034d4cb4c41756b00fe017;hp=f5a1cc64f1bd9234fa4be937612afead95e475d3;hb=ec36f7a4182693516ed4b2eedbe720bccd35c8cf;hpb=ece99cac66f68fafee54a902ff33de67851e78f1 diff --git a/WebCore/bindings/scripts/test/V8/V8TestObj.cpp b/WebCore/bindings/scripts/test/V8/V8TestObj.cpp index f5a1cc6..94dcd5e 100644 --- a/WebCore/bindings/scripts/test/V8/V8TestObj.cpp +++ b/WebCore/bindings/scripts/test/V8/V8TestObj.cpp @@ -199,6 +199,13 @@ static void attrWithGetterExceptionAttrSetter(v8::Local name, v8::Lo return; } +static v8::Handle scriptStringAttrAttrGetter(v8::Local name, const v8::AccessorInfo& info) +{ + INC_STATS("DOM.TestObj.scriptStringAttr._get"); + TestObj* imp = V8TestObj::toNative(info.Holder()); + v8StringOrNull(exec, imp->scriptStringAttr()); +} + static v8::Handle voidMethodCallback(const v8::Arguments& args) { INC_STATS("DOM.TestObj.voidMethod"); @@ -583,6 +590,8 @@ static const BatchedAttribute TestObjAttrs[] = { {"attrWithGetterException", TestObjInternal::attrWithGetterExceptionAttrGetter, TestObjInternal::attrWithGetterExceptionAttrSetter, 0 /* no data */, static_cast(v8::DEFAULT), static_cast(v8::None), 0 /* on instance */}, // Attribute 'customAttr' (Type: 'attribute' ExtAttr: 'Custom') {"customAttr", V8TestObj::customAttrAccessorGetter, V8TestObj::customAttrAccessorSetter, 0 /* no data */, static_cast(v8::DEFAULT), static_cast(v8::None), 0 /* on instance */}, + // Attribute 'scriptStringAttr' (Type: 'readonly attribute' ExtAttr: 'ConvertScriptString') + {"scriptStringAttr", TestObjInternal::scriptStringAttrAttrGetter, 0, 0 /* no data */, static_cast(v8::DEFAULT), static_cast(v8::None), 0 /* on instance */}, }; static const BatchedCallback TestObjCallbacks[] = { {"voidMethod", TestObjInternal::voidMethodCallback},