Improve code generator scripts to support converting ScriptString.
[WebKit-https.git] / WebCore / bindings / scripts / test / V8 / V8TestObj.cpp
index f5a1cc6..94dcd5e 100644 (file)
@@ -199,6 +199,13 @@ static void attrWithGetterExceptionAttrSetter(v8::Local<v8::String> name, v8::Lo
     return;
 }
 
+static v8::Handle<v8::Value> scriptStringAttrAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
+{
+    INC_STATS("DOM.TestObj.scriptStringAttr._get");
+    TestObj* imp = V8TestObj::toNative(info.Holder());
+    v8StringOrNull(exec, imp->scriptStringAttr());
+}
+
 static v8::Handle<v8::Value> 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::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
     // Attribute 'customAttr' (Type: 'attribute' ExtAttr: 'Custom')
     {"customAttr", V8TestObj::customAttrAccessorGetter, V8TestObj::customAttrAccessorSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
+    // Attribute 'scriptStringAttr' (Type: 'readonly attribute' ExtAttr: 'ConvertScriptString')
+    {"scriptStringAttr", TestObjInternal::scriptStringAttrAttrGetter, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 };
 static const BatchedCallback TestObjCallbacks[] = {
     {"voidMethod", TestObjInternal::voidMethodCallback},