Web Replay: add infrastructure for memoizing nondeterministic DOM APIs
[WebKit-https.git] / Source / WebCore / bindings / scripts / test / JS / JSTestObj.cpp
1 /*
2     This file is part of the WebKit open source project.
3     This file has been generated by generate-bindings.pl. DO NOT MODIFY!
4
5     This library is free software; you can redistribute it and/or
6     modify it under the terms of the GNU Library General Public
7     License as published by the Free Software Foundation; either
8     version 2 of the License, or (at your option) any later version.
9
10     This library is distributed in the hope that it will be useful,
11     but WITHOUT ANY WARRANTY; without even the implied warranty of
12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13     Library General Public License for more details.
14
15     You should have received a copy of the GNU Library General Public License
16     along with this library; see the file COPYING.LIB.  If not, write to
17     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18     Boston, MA 02110-1301, USA.
19 */
20
21 #include "config.h"
22 #include "JSTestObj.h"
23
24 #include "CallbackFunction.h"
25 #include "DOMStringList.h"
26 #include "Dictionary.h"
27 #include "Document.h"
28 #include "ExceptionCode.h"
29 #include "Frame.h"
30 #include "HTMLNames.h"
31 #include "JSDOMBinding.h"
32 #include "JSDOMStringList.h"
33 #include "JSDocument.h"
34 #include "JSEventListener.h"
35 #include "JSNode.h"
36 #include "JSSVGDocument.h"
37 #include "JSSVGPoint.h"
38 #include "JSScriptProfile.h"
39 #include "JSTestCallback.h"
40 #include "JSTestNode.h"
41 #include "JSTestObj.h"
42 #include "JSTestSubObj.h"
43 #include "JSbool.h"
44 #include "SVGDocument.h"
45 #include "SVGPoint.h"
46 #include "SVGStaticPropertyTearOff.h"
47 #include "ScriptExecutionContext.h"
48 #include "ScriptProfile.h"
49 #include "SerializedScriptValue.h"
50 #include "Settings.h"
51 #include "TestObj.h"
52 #include "URL.h"
53 #include "bool.h"
54 #include <inspector/ScriptArguments.h>
55 #include <inspector/ScriptCallStackFactory.h>
56 #include <runtime/Error.h>
57 #include <runtime/JSArray.h>
58 #include <runtime/JSString.h>
59 #include <wtf/GetPtr.h>
60
61 #if ENABLE(Condition1)
62 #include "JSTestObjectA.h"
63 #endif
64
65 #if ENABLE(Condition1) && ENABLE(Condition2)
66 #include "JSTestObjectB.h"
67 #endif
68
69 #if ENABLE(Condition1) || ENABLE(Condition2)
70 #include "JSTestObjectC.h"
71 #endif
72
73 using namespace JSC;
74
75 namespace WebCore {
76
77 /* Hash table */
78
79 static const HashTableValue JSTestObjTableValues[] =
80 {
81     { "TestSubObjEnabledBySetting", DontEnum, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjTestSubObjEnabledBySettingConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjTestSubObjEnabledBySettingConstructor) },
82     { "customAttr", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCustomAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjCustomAttr) },
83 #if ENABLE(Condition1)
84     { "conditionalAttr4", DontEnum, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjConditionalAttr4Constructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjConditionalAttr4Constructor) },
85 #endif
86 #if ENABLE(Condition1) && ENABLE(Condition2)
87     { "conditionalAttr5", DontEnum, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjConditionalAttr5Constructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjConditionalAttr5Constructor) },
88 #endif
89 #if ENABLE(Condition1) || ENABLE(Condition2)
90     { "conditionalAttr6", DontEnum, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjConditionalAttr6Constructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjConditionalAttr6Constructor) },
91 #endif
92     { "contentDocument", DontDelete | ReadOnly | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjContentDocument), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
93     { 0, 0, NoIntrinsic, 0, 0 }
94 };
95
96 static const HashTable JSTestObjTable = { 17, 15, true, JSTestObjTableValues, 0 };
97 /* Hash table for constructor */
98
99 static const HashTableValue JSTestObjConstructorTableValues[] =
100 {
101 #if ENABLE(Condition1)
102     { "CONDITIONAL_CONST", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONDITIONAL_CONST), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
103 #endif
104     { "CONST_VALUE_0", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_0), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
105     { "CONST_VALUE_1", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_1), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
106     { "CONST_VALUE_2", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_2), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
107     { "CONST_VALUE_4", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_4), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
108     { "CONST_VALUE_8", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_8), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
109     { "CONST_VALUE_9", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_9), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
110     { "CONST_VALUE_10", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_10), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
111     { "CONST_VALUE_11", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_11), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
112     { "CONST_VALUE_12", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_12), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
113     { "CONST_VALUE_13", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_13), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
114     { "CONST_VALUE_14", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_14), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
115     { "CONST_JAVASCRIPT", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_JAVASCRIPT), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
116     { "readonly", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReadonly), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
117     { "staticReadOnlyLongAttr", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjConstructorStaticReadOnlyLongAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
118     { "staticStringAttr", DontDelete, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjConstructorStaticStringAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjConstructorStaticStringAttr) },
119     { "TestSubObj", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjConstructorTestSubObj), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
120     { "staticMethodWithCallbackAndOptionalArg", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjConstructorFunctionStaticMethodWithCallbackAndOptionalArg), (intptr_t) (0) },
121     { "staticMethodWithCallbackArg", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjConstructorFunctionStaticMethodWithCallbackArg), (intptr_t) (1) },
122     { "classMethod", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjConstructorFunctionClassMethod), (intptr_t) (0) },
123     { "classMethodWithOptional", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjConstructorFunctionClassMethodWithOptional), (intptr_t) (0) },
124     { "classMethod2", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjConstructorFunctionClassMethod2), (intptr_t) (1) },
125 #if ENABLE(Condition1)
126     { "overloadedMethod1", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjConstructorFunctionOverloadedMethod1), (intptr_t) (1) },
127 #endif
128     { 0, 0, NoIntrinsic, 0, 0 }
129 };
130
131 static const HashTable JSTestObjConstructorTable = { 39, 31, true, JSTestObjConstructorTableValues, 0 };
132
133 #if ENABLE(Condition1)
134 COMPILE_ASSERT(0 == TestObj::CONDITIONAL_CONST, TestObjEnumCONDITIONAL_CONSTIsWrongUseDoNotCheckConstants);
135 #endif
136 COMPILE_ASSERT(0 == TestObj::CONST_VALUE_0, TestObjEnumCONST_VALUE_0IsWrongUseDoNotCheckConstants);
137 COMPILE_ASSERT(1 == TestObj::CONST_VALUE_1, TestObjEnumCONST_VALUE_1IsWrongUseDoNotCheckConstants);
138 COMPILE_ASSERT(2 == TestObj::CONST_VALUE_2, TestObjEnumCONST_VALUE_2IsWrongUseDoNotCheckConstants);
139 COMPILE_ASSERT(4 == TestObj::CONST_VALUE_4, TestObjEnumCONST_VALUE_4IsWrongUseDoNotCheckConstants);
140 COMPILE_ASSERT(8 == TestObj::CONST_VALUE_8, TestObjEnumCONST_VALUE_8IsWrongUseDoNotCheckConstants);
141 COMPILE_ASSERT(-1 == TestObj::CONST_VALUE_9, TestObjEnumCONST_VALUE_9IsWrongUseDoNotCheckConstants);
142 COMPILE_ASSERT("my constant string" == TestObj::CONST_VALUE_10, TestObjEnumCONST_VALUE_10IsWrongUseDoNotCheckConstants);
143 COMPILE_ASSERT(0xffffffff == TestObj::CONST_VALUE_11, TestObjEnumCONST_VALUE_11IsWrongUseDoNotCheckConstants);
144 COMPILE_ASSERT(0x01 == TestObj::CONST_VALUE_12, TestObjEnumCONST_VALUE_12IsWrongUseDoNotCheckConstants);
145 COMPILE_ASSERT(0X20 == TestObj::CONST_VALUE_13, TestObjEnumCONST_VALUE_13IsWrongUseDoNotCheckConstants);
146 COMPILE_ASSERT(0x1abc == TestObj::CONST_VALUE_14, TestObjEnumCONST_VALUE_14IsWrongUseDoNotCheckConstants);
147 COMPILE_ASSERT(15 == TestObj::CONST_IMPL, TestObjEnumCONST_IMPLIsWrongUseDoNotCheckConstants);
148 COMPILE_ASSERT(0 == TestObj::readonly, TestObjEnumreadonlyIsWrongUseDoNotCheckConstants);
149
150 EncodedJSValue JSC_HOST_CALL JSTestObjConstructor::constructJSTestObj(ExecState* exec)
151 {
152     JSTestObjConstructor* castedThis = jsCast<JSTestObjConstructor*>(exec->callee());
153     if (exec->argumentCount() < 1)
154         return throwVMError(exec, createNotEnoughArgumentsError(exec));
155     if (!exec->argument(0).isFunction())
156         return throwVMTypeError(exec);
157     RefPtr<TestCallback> testCallback = JSTestCallback::create(asObject(exec->uncheckedArgument(0)), castedThis->globalObject());
158     RefPtr<TestObj> object = TestObj::create(testCallback);
159     return JSValue::encode(asObject(toJS(exec, castedThis->globalObject(), object.get())));
160 }
161
162 const ClassInfo JSTestObjConstructor::s_info = { "TestObjectConstructor", &Base::s_info, &JSTestObjConstructorTable, 0, CREATE_METHOD_TABLE(JSTestObjConstructor) };
163
164 JSTestObjConstructor::JSTestObjConstructor(Structure* structure, JSDOMGlobalObject* globalObject)
165     : DOMConstructorObject(structure, globalObject)
166 {
167 }
168
169 void JSTestObjConstructor::finishCreation(VM& vm, JSDOMGlobalObject* globalObject)
170 {
171     Base::finishCreation(vm);
172     ASSERT(inherits(info()));
173     putDirect(vm, vm.propertyNames->prototype, JSTestObjPrototype::self(vm, globalObject), DontDelete | ReadOnly);
174     putDirect(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontDelete | DontEnum);
175 }
176
177 bool JSTestObjConstructor::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot& slot)
178 {
179     return getStaticPropertySlot<JSTestObjConstructor, JSDOMWrapper>(exec, JSTestObjConstructorTable, jsCast<JSTestObjConstructor*>(object), propertyName, slot);
180 }
181
182 ConstructType JSTestObjConstructor::getConstructData(JSCell*, ConstructData& constructData)
183 {
184     constructData.native.function = constructJSTestObj;
185     return ConstructTypeHost;
186 }
187
188 /* Hash table for prototype */
189
190 static const HashTableValue JSTestObjPrototypeTableValues[] =
191 {
192     { "constructor", DontEnum | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
193     { "readOnlyLongAttr", DontDelete | ReadOnly | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReadOnlyLongAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
194     { "readOnlyStringAttr", DontDelete | ReadOnly | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReadOnlyStringAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
195     { "readOnlyTestObjAttr", DontDelete | ReadOnly | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReadOnlyTestObjAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
196     { "enumAttr", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjEnumAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjEnumAttr) },
197     { "byteAttr", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjByteAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjByteAttr) },
198     { "octetAttr", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjOctetAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjOctetAttr) },
199     { "shortAttr", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjShortAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjShortAttr) },
200     { "unsignedShortAttr", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjUnsignedShortAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjUnsignedShortAttr) },
201     { "longAttr", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjLongAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjLongAttr) },
202     { "longLongAttr", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjLongLongAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjLongLongAttr) },
203     { "unsignedLongLongAttr", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjUnsignedLongLongAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjUnsignedLongLongAttr) },
204     { "stringAttr", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjStringAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjStringAttr) },
205     { "testObjAttr", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjTestObjAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjTestObjAttr) },
206     { "XMLObjAttr", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjXMLObjAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjXMLObjAttr) },
207     { "create", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCreate), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjCreate) },
208     { "reflectedStringAttr", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReflectedStringAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjReflectedStringAttr) },
209     { "reflectedIntegralAttr", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReflectedIntegralAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjReflectedIntegralAttr) },
210     { "reflectedUnsignedIntegralAttr", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReflectedUnsignedIntegralAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjReflectedUnsignedIntegralAttr) },
211     { "reflectedBooleanAttr", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReflectedBooleanAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjReflectedBooleanAttr) },
212     { "reflectedURLAttr", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReflectedURLAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjReflectedURLAttr) },
213     { "reflectedStringAttr", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReflectedStringAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjReflectedStringAttr) },
214     { "reflectedCustomIntegralAttr", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReflectedCustomIntegralAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjReflectedCustomIntegralAttr) },
215     { "reflectedCustomBooleanAttr", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReflectedCustomBooleanAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjReflectedCustomBooleanAttr) },
216     { "reflectedCustomURLAttr", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReflectedCustomURLAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjReflectedCustomURLAttr) },
217     { "typedArrayAttr", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjTypedArrayAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjTypedArrayAttr) },
218     { "attrWithGetterException", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjAttrWithGetterException), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjAttrWithGetterException) },
219     { "attrWithSetterException", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjAttrWithSetterException), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjAttrWithSetterException) },
220     { "stringAttrWithGetterException", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjStringAttrWithGetterException), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjStringAttrWithGetterException) },
221     { "stringAttrWithSetterException", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjStringAttrWithSetterException), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjStringAttrWithSetterException) },
222     { "withScriptStateAttribute", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjWithScriptStateAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjWithScriptStateAttribute) },
223     { "withScriptExecutionContextAttribute", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjWithScriptExecutionContextAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjWithScriptExecutionContextAttribute) },
224     { "withScriptStateAttributeRaises", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjWithScriptStateAttributeRaises), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjWithScriptStateAttributeRaises) },
225     { "withScriptExecutionContextAttributeRaises", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjWithScriptExecutionContextAttributeRaises), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjWithScriptExecutionContextAttributeRaises) },
226     { "withScriptExecutionContextAndScriptStateAttribute", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjWithScriptExecutionContextAndScriptStateAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjWithScriptExecutionContextAndScriptStateAttribute) },
227     { "withScriptExecutionContextAndScriptStateAttributeRaises", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjWithScriptExecutionContextAndScriptStateAttributeRaises), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjWithScriptExecutionContextAndScriptStateAttributeRaises) },
228     { "withScriptExecutionContextAndScriptStateWithSpacesAttribute", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute) },
229     { "withScriptArgumentsAndCallStackAttribute", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjWithScriptArgumentsAndCallStackAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjWithScriptArgumentsAndCallStackAttribute) },
230 #if ENABLE(Condition1)
231     { "conditionalAttr1", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjConditionalAttr1), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjConditionalAttr1) },
232 #endif
233 #if ENABLE(Condition1) && ENABLE(Condition2)
234     { "conditionalAttr2", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjConditionalAttr2), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjConditionalAttr2) },
235 #endif
236 #if ENABLE(Condition1) || ENABLE(Condition2)
237     { "conditionalAttr3", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjConditionalAttr3), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjConditionalAttr3) },
238 #endif
239     { "cachedAttribute1", DontDelete | ReadOnly | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCachedAttribute1), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
240     { "cachedAttribute2", DontDelete | ReadOnly | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCachedAttribute2), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
241     { "anyAttribute", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjAnyAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjAnyAttribute) },
242     { "mutablePoint", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjMutablePoint), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjMutablePoint) },
243     { "immutablePoint", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjImmutablePoint), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjImmutablePoint) },
244     { "strawberry", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjStrawberry), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjStrawberry) },
245     { "strictFloat", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjStrictFloat), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjStrictFloat) },
246     { "description", DontDelete | ReadOnly | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjDescription), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
247     { "id", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjId), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjId) },
248     { "hash", DontDelete | ReadOnly | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjHash), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
249     { "replaceableAttribute", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReplaceableAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjReplaceableAttribute) },
250     { "nullableDoubleAttribute", DontDelete | ReadOnly | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjNullableDoubleAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
251     { "nullableLongAttribute", DontDelete | ReadOnly | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjNullableLongAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
252     { "nullableBooleanAttribute", DontDelete | ReadOnly | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjNullableBooleanAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
253     { "nullableStringAttribute", DontDelete | ReadOnly | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjNullableStringAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
254     { "nullableLongSettableAttribute", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjNullableLongSettableAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjNullableLongSettableAttribute) },
255     { "nullableStringValue", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjNullableStringValue), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjNullableStringValue) },
256     { "attribute", DontDelete | ReadOnly | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
257     { "attributeWithReservedEnumType", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjAttributeWithReservedEnumType), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjAttributeWithReservedEnumType) },
258 #if ENABLE(Condition1)
259     { "CONDITIONAL_CONST", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONDITIONAL_CONST), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
260 #endif
261     { "CONST_VALUE_0", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_0), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
262     { "CONST_VALUE_1", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_1), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
263     { "CONST_VALUE_2", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_2), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
264     { "CONST_VALUE_4", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_4), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
265     { "CONST_VALUE_8", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_8), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
266     { "CONST_VALUE_9", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_9), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
267     { "CONST_VALUE_10", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_10), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
268     { "CONST_VALUE_11", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_11), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
269     { "CONST_VALUE_12", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_12), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
270     { "CONST_VALUE_13", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_13), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
271     { "CONST_VALUE_14", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_14), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
272     { "CONST_JAVASCRIPT", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_JAVASCRIPT), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
273     { "readonly", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReadonly), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
274     { "voidMethod", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionVoidMethod), (intptr_t) (0) },
275     { "voidMethodWithArgs", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionVoidMethodWithArgs), (intptr_t) (3) },
276     { "byteMethod", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionByteMethod), (intptr_t) (0) },
277     { "byteMethodWithArgs", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionByteMethodWithArgs), (intptr_t) (3) },
278     { "octetMethod", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionOctetMethod), (intptr_t) (0) },
279     { "octetMethodWithArgs", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionOctetMethodWithArgs), (intptr_t) (3) },
280     { "longMethod", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionLongMethod), (intptr_t) (0) },
281     { "longMethodWithArgs", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionLongMethodWithArgs), (intptr_t) (3) },
282     { "objMethod", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionObjMethod), (intptr_t) (0) },
283     { "objMethodWithArgs", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionObjMethodWithArgs), (intptr_t) (3) },
284     { "methodWithSequenceArg", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithSequenceArg), (intptr_t) (1) },
285     { "methodReturningSequence", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodReturningSequence), (intptr_t) (1) },
286     { "methodWithEnumArg", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithEnumArg), (intptr_t) (1) },
287     { "methodThatRequiresAllArgsAndThrows", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows), (intptr_t) (2) },
288     { "serializedValue", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionSerializedValue), (intptr_t) (1) },
289     { "optionsObject", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionOptionsObject), (intptr_t) (1) },
290     { "methodWithException", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithException), (intptr_t) (0) },
291     { "customMethod", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionCustomMethod), (intptr_t) (0) },
292     { "customMethodWithArgs", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionCustomMethodWithArgs), (intptr_t) (3) },
293     { "addEventListener", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionAddEventListener), (intptr_t) (2) },
294     { "removeEventListener", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionRemoveEventListener), (intptr_t) (2) },
295     { "withScriptStateVoid", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionWithScriptStateVoid), (intptr_t) (0) },
296     { "withScriptStateObj", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionWithScriptStateObj), (intptr_t) (0) },
297     { "withScriptStateVoidException", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionWithScriptStateVoidException), (intptr_t) (0) },
298     { "withScriptStateObjException", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionWithScriptStateObjException), (intptr_t) (0) },
299     { "withScriptExecutionContext", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionWithScriptExecutionContext), (intptr_t) (0) },
300     { "withScriptExecutionContextAndScriptState", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptState), (intptr_t) (0) },
301     { "withScriptExecutionContextAndScriptStateObjException", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateObjException), (intptr_t) (0) },
302     { "withScriptExecutionContextAndScriptStateWithSpaces", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateWithSpaces), (intptr_t) (0) },
303     { "withScriptArgumentsAndCallStack", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionWithScriptArgumentsAndCallStack), (intptr_t) (0) },
304     { "methodWithOptionalArg", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalArg), (intptr_t) (0) },
305     { "methodWithNonOptionalArgAndOptionalArg", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg), (intptr_t) (1) },
306     { "methodWithNonOptionalArgAndTwoOptionalArgs", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs), (intptr_t) (1) },
307     { "methodWithOptionalString", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalString), (intptr_t) (0) },
308     { "methodWithOptionalStringIsUndefined", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalStringIsUndefined), (intptr_t) (0) },
309     { "methodWithOptionalStringIsNullString", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalStringIsNullString), (intptr_t) (0) },
310     { "methodWithCallbackArg", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithCallbackArg), (intptr_t) (1) },
311     { "methodWithNonCallbackArgAndCallbackArg", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg), (intptr_t) (2) },
312     { "methodWithCallbackAndOptionalArg", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArg), (intptr_t) (0) },
313 #if ENABLE(Condition1)
314     { "conditionalMethod1", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionConditionalMethod1), (intptr_t) (0) },
315 #endif
316 #if ENABLE(Condition1) && ENABLE(Condition2)
317     { "conditionalMethod2", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionConditionalMethod2), (intptr_t) (0) },
318 #endif
319 #if ENABLE(Condition1) || ENABLE(Condition2)
320     { "conditionalMethod3", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionConditionalMethod3), (intptr_t) (0) },
321 #endif
322     { "overloadedMethod", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionOverloadedMethod), (intptr_t) (2) },
323     { "classMethodWithClamp", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionClassMethodWithClamp), (intptr_t) (2) },
324     { "methodWithUnsignedLongSequence", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithUnsignedLongSequence), (intptr_t) (1) },
325     { "stringArrayFunction", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionStringArrayFunction), (intptr_t) (1) },
326     { "domStringListFunction", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionDomStringListFunction), (intptr_t) (1) },
327     { "getSVGDocument", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionGetSVGDocument), (intptr_t) (0) },
328     { "convert1", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionConvert1), (intptr_t) (1) },
329     { "convert2", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionConvert2), (intptr_t) (1) },
330     { "convert4", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionConvert4), (intptr_t) (1) },
331     { "convert5", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionConvert5), (intptr_t) (1) },
332     { "mutablePointFunction", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMutablePointFunction), (intptr_t) (0) },
333     { "immutablePointFunction", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionImmutablePointFunction), (intptr_t) (0) },
334     { "orange", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionOrange), (intptr_t) (0) },
335     { "strictFunction", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionStrictFunction), (intptr_t) (3) },
336     { "strictFunctionWithSequence", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionStrictFunctionWithSequence), (intptr_t) (2) },
337     { "strictFunctionWithArray", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionStrictFunctionWithArray), (intptr_t) (2) },
338     { "variadicStringMethod", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionVariadicStringMethod), (intptr_t) (2) },
339     { "variadicDoubleMethod", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionVariadicDoubleMethod), (intptr_t) (2) },
340     { "variadicNodeMethod", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionVariadicNodeMethod), (intptr_t) (2) },
341     { "any", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionAny), (intptr_t) (2) },
342     { 0, 0, NoIntrinsic, 0, 0 }
343 };
344
345 static const HashTable JSTestObjPrototypeTable = { 530, 511, true, JSTestObjPrototypeTableValues, 0 };
346 const ClassInfo JSTestObjPrototype::s_info = { "TestObjectPrototype", &Base::s_info, &JSTestObjPrototypeTable, 0, CREATE_METHOD_TABLE(JSTestObjPrototype) };
347
348 JSObject* JSTestObjPrototype::self(VM& vm, JSGlobalObject* globalObject)
349 {
350     return getDOMPrototype<JSTestObj>(vm, globalObject);
351 }
352
353 bool JSTestObjPrototype::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot& slot)
354 {
355     JSTestObjPrototype* thisObject = jsCast<JSTestObjPrototype*>(object);
356     return getStaticPropertySlot<JSTestObjPrototype, JSObject>(exec, JSTestObjPrototypeTable, thisObject, propertyName, slot);
357 }
358
359 const ClassInfo JSTestObj::s_info = { "TestObject", &Base::s_info, &JSTestObjTable, 0 , CREATE_METHOD_TABLE(JSTestObj) };
360
361 JSTestObj::JSTestObj(Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<TestObj> impl)
362     : JSDOMWrapper(structure, globalObject)
363     , m_impl(impl.leakRef())
364 {
365 }
366
367 void JSTestObj::finishCreation(VM& vm)
368 {
369     Base::finishCreation(vm);
370     ASSERT(inherits(info()));
371 }
372
373 JSObject* JSTestObj::createPrototype(VM& vm, JSGlobalObject* globalObject)
374 {
375     return JSTestObjPrototype::create(vm, globalObject, JSTestObjPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()));
376 }
377
378 void JSTestObj::destroy(JSC::JSCell* cell)
379 {
380     JSTestObj* thisObject = static_cast<JSTestObj*>(cell);
381     thisObject->JSTestObj::~JSTestObj();
382 }
383
384 JSTestObj::~JSTestObj()
385 {
386     releaseImplIfNotNull();
387 }
388
389 bool JSTestObj::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot& slot)
390 {
391     JSTestObj* thisObject = jsCast<JSTestObj*>(object);
392     ASSERT_GC_OBJECT_INHERITS(thisObject, info());
393     return getStaticValueSlot<JSTestObj, Base>(exec, JSTestObjTable, thisObject, propertyName, slot);
394 }
395
396 EncodedJSValue jsTestObjReadOnlyLongAttr(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
397 {
398     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
399     UNUSED_PARAM(slotBase);
400     if (UNLIKELY(!castedThis)) {
401         if (jsDynamicCast<JSTestObjPrototype*>(slotBase)) {
402             ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
403             scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'readOnlyLongAttr' on a non-TestObj object."));
404             return JSValue::encode(jsUndefined());
405         }
406         return throwVMTypeError(exec);
407     }
408     UNUSED_PARAM(exec);
409     TestObj& impl = castedThis->impl();
410     JSValue result = jsNumber(impl.readOnlyLongAttr());
411     return JSValue::encode(result);
412 }
413
414
415 EncodedJSValue jsTestObjReadOnlyStringAttr(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
416 {
417     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
418     UNUSED_PARAM(slotBase);
419     if (UNLIKELY(!castedThis)) {
420         if (jsDynamicCast<JSTestObjPrototype*>(slotBase)) {
421             ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
422             scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'readOnlyStringAttr' on a non-TestObj object."));
423             return JSValue::encode(jsUndefined());
424         }
425         return throwVMTypeError(exec);
426     }
427     UNUSED_PARAM(exec);
428     TestObj& impl = castedThis->impl();
429     JSValue result = jsStringWithCache(exec, impl.readOnlyStringAttr());
430     return JSValue::encode(result);
431 }
432
433
434 EncodedJSValue jsTestObjReadOnlyTestObjAttr(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
435 {
436     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
437     UNUSED_PARAM(slotBase);
438     if (UNLIKELY(!castedThis)) {
439         if (jsDynamicCast<JSTestObjPrototype*>(slotBase)) {
440             ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
441             scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'readOnlyTestObjAttr' on a non-TestObj object."));
442             return JSValue::encode(jsUndefined());
443         }
444         return throwVMTypeError(exec);
445     }
446     UNUSED_PARAM(exec);
447     TestObj& impl = castedThis->impl();
448     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.readOnlyTestObjAttr()));
449     return JSValue::encode(result);
450 }
451
452
453 EncodedJSValue jsTestObjConstructorStaticReadOnlyLongAttr(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
454 {
455     UNUSED_PARAM(thisValue);
456     UNUSED_PARAM(slotBase);
457     UNUSED_PARAM(exec);
458     JSValue result = jsNumber(TestObj::staticReadOnlyLongAttr());
459     return JSValue::encode(result);
460 }
461
462
463 EncodedJSValue jsTestObjConstructorStaticStringAttr(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
464 {
465     UNUSED_PARAM(thisValue);
466     UNUSED_PARAM(slotBase);
467     UNUSED_PARAM(exec);
468     JSValue result = jsStringWithCache(exec, TestObj::staticStringAttr());
469     return JSValue::encode(result);
470 }
471
472
473 EncodedJSValue jsTestObjConstructorTestSubObj(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
474 {
475     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
476     UNUSED_PARAM(slotBase);
477     if (UNLIKELY(!castedThis)) {
478         if (jsDynamicCast<JSTestObjPrototype*>(slotBase)) {
479             ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
480             scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'TestSubObj' on a non-TestObj object."));
481             return JSValue::encode(jsUndefined());
482         }
483         return throwVMTypeError(exec);
484     }
485     return JSValue::encode(JSTestSubObj::getConstructor(exec->vm(), castedThis->globalObject()));
486 }
487
488
489 EncodedJSValue jsTestObjTestSubObjEnabledBySettingConstructor(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
490 {
491     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
492     UNUSED_PARAM(slotBase);
493     if (UNLIKELY(!castedThis)) {
494         if (jsDynamicCast<JSTestObjPrototype*>(slotBase)) {
495             ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
496             scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'TestSubObjEnabledBySetting' on a non-TestObj object."));
497             return JSValue::encode(jsUndefined());
498         }
499         return throwVMTypeError(exec);
500     }
501     if (!castedThis->impl().frame())
502         return JSValue::encode(jsUndefined());
503     Settings& settings = castedThis->impl().frame()->settings();
504     if (!settings.testSettingEnabled())
505         return JSValue::encode(jsUndefined());
506     return JSValue::encode(JSTestSubObj::getConstructor(exec->vm(), castedThis->globalObject()));
507 }
508
509
510 EncodedJSValue jsTestObjEnumAttr(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
511 {
512     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
513     UNUSED_PARAM(slotBase);
514     if (UNLIKELY(!castedThis)) {
515         if (jsDynamicCast<JSTestObjPrototype*>(slotBase)) {
516             ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
517             scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'enumAttr' on a non-TestObj object."));
518             return JSValue::encode(jsUndefined());
519         }
520         return throwVMTypeError(exec);
521     }
522     UNUSED_PARAM(exec);
523     TestObj& impl = castedThis->impl();
524     JSValue result = jsStringWithCache(exec, impl.enumAttr());
525     return JSValue::encode(result);
526 }
527
528
529 EncodedJSValue jsTestObjByteAttr(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
530 {
531     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
532     UNUSED_PARAM(slotBase);
533     if (UNLIKELY(!castedThis)) {
534         if (jsDynamicCast<JSTestObjPrototype*>(slotBase)) {
535             ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
536             scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'byteAttr' on a non-TestObj object."));
537             return JSValue::encode(jsUndefined());
538         }
539         return throwVMTypeError(exec);
540     }
541     UNUSED_PARAM(exec);
542     TestObj& impl = castedThis->impl();
543     JSValue result = jsNumber(impl.byteAttr());
544     return JSValue::encode(result);
545 }
546
547
548 EncodedJSValue jsTestObjOctetAttr(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
549 {
550     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
551     UNUSED_PARAM(slotBase);
552     if (UNLIKELY(!castedThis)) {
553         if (jsDynamicCast<JSTestObjPrototype*>(slotBase)) {
554             ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
555             scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'octetAttr' on a non-TestObj object."));
556             return JSValue::encode(jsUndefined());
557         }
558         return throwVMTypeError(exec);
559     }
560     UNUSED_PARAM(exec);
561     TestObj& impl = castedThis->impl();
562     JSValue result = jsNumber(impl.octetAttr());
563     return JSValue::encode(result);
564 }
565
566
567 EncodedJSValue jsTestObjShortAttr(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
568 {
569     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
570     UNUSED_PARAM(slotBase);
571     if (UNLIKELY(!castedThis)) {
572         if (jsDynamicCast<JSTestObjPrototype*>(slotBase)) {
573             ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
574             scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'shortAttr' on a non-TestObj object."));
575             return JSValue::encode(jsUndefined());
576         }
577         return throwVMTypeError(exec);
578     }
579     UNUSED_PARAM(exec);
580     TestObj& impl = castedThis->impl();
581     JSValue result = jsNumber(impl.shortAttr());
582     return JSValue::encode(result);
583 }
584
585
586 EncodedJSValue jsTestObjUnsignedShortAttr(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
587 {
588     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
589     UNUSED_PARAM(slotBase);
590     if (UNLIKELY(!castedThis)) {
591         if (jsDynamicCast<JSTestObjPrototype*>(slotBase)) {
592             ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
593             scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'unsignedShortAttr' on a non-TestObj object."));
594             return JSValue::encode(jsUndefined());
595         }
596         return throwVMTypeError(exec);
597     }
598     UNUSED_PARAM(exec);
599     TestObj& impl = castedThis->impl();
600     JSValue result = jsNumber(impl.unsignedShortAttr());
601     return JSValue::encode(result);
602 }
603
604
605 EncodedJSValue jsTestObjLongAttr(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
606 {
607     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
608     UNUSED_PARAM(slotBase);
609     if (UNLIKELY(!castedThis)) {
610         if (jsDynamicCast<JSTestObjPrototype*>(slotBase)) {
611             ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
612             scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'longAttr' on a non-TestObj object."));
613             return JSValue::encode(jsUndefined());
614         }
615         return throwVMTypeError(exec);
616     }
617     UNUSED_PARAM(exec);
618     TestObj& impl = castedThis->impl();
619     JSValue result = jsNumber(impl.longAttr());
620     return JSValue::encode(result);
621 }
622
623
624 EncodedJSValue jsTestObjLongLongAttr(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
625 {
626     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
627     UNUSED_PARAM(slotBase);
628     if (UNLIKELY(!castedThis)) {
629         if (jsDynamicCast<JSTestObjPrototype*>(slotBase)) {
630             ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
631             scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'longLongAttr' on a non-TestObj object."));
632             return JSValue::encode(jsUndefined());
633         }
634         return throwVMTypeError(exec);
635     }
636     UNUSED_PARAM(exec);
637     TestObj& impl = castedThis->impl();
638     JSValue result = jsNumber(impl.longLongAttr());
639     return JSValue::encode(result);
640 }
641
642
643 EncodedJSValue jsTestObjUnsignedLongLongAttr(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
644 {
645     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
646     UNUSED_PARAM(slotBase);
647     if (UNLIKELY(!castedThis)) {
648         if (jsDynamicCast<JSTestObjPrototype*>(slotBase)) {
649             ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
650             scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'unsignedLongLongAttr' on a non-TestObj object."));
651             return JSValue::encode(jsUndefined());
652         }
653         return throwVMTypeError(exec);
654     }
655     UNUSED_PARAM(exec);
656     TestObj& impl = castedThis->impl();
657     JSValue result = jsNumber(impl.unsignedLongLongAttr());
658     return JSValue::encode(result);
659 }
660
661
662 EncodedJSValue jsTestObjStringAttr(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
663 {
664     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
665     UNUSED_PARAM(slotBase);
666     if (UNLIKELY(!castedThis)) {
667         if (jsDynamicCast<JSTestObjPrototype*>(slotBase)) {
668             ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
669             scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'stringAttr' on a non-TestObj object."));
670             return JSValue::encode(jsUndefined());
671         }
672         return throwVMTypeError(exec);
673     }
674     UNUSED_PARAM(exec);
675     TestObj& impl = castedThis->impl();
676     JSValue result = jsStringWithCache(exec, impl.stringAttr());
677     return JSValue::encode(result);
678 }
679
680
681 EncodedJSValue jsTestObjTestObjAttr(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
682 {
683     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
684     UNUSED_PARAM(slotBase);
685     if (UNLIKELY(!castedThis)) {
686         if (jsDynamicCast<JSTestObjPrototype*>(slotBase)) {
687             ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
688             scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'testObjAttr' on a non-TestObj object."));
689             return JSValue::encode(jsUndefined());
690         }
691         return throwVMTypeError(exec);
692     }
693     UNUSED_PARAM(exec);
694     TestObj& impl = castedThis->impl();
695     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.testObjAttr()));
696     return JSValue::encode(result);
697 }
698
699
700 EncodedJSValue jsTestObjXMLObjAttr(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
701 {
702     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
703     UNUSED_PARAM(slotBase);
704     if (UNLIKELY(!castedThis)) {
705         if (jsDynamicCast<JSTestObjPrototype*>(slotBase)) {
706             ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
707             scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'XMLObjAttr' on a non-TestObj object."));
708             return JSValue::encode(jsUndefined());
709         }
710         return throwVMTypeError(exec);
711     }
712     UNUSED_PARAM(exec);
713     TestObj& impl = castedThis->impl();
714     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.xmlObjAttr()));
715     return JSValue::encode(result);
716 }
717
718
719 EncodedJSValue jsTestObjCreate(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
720 {
721     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
722     UNUSED_PARAM(slotBase);
723     if (UNLIKELY(!castedThis)) {
724         if (jsDynamicCast<JSTestObjPrototype*>(slotBase)) {
725             ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
726             scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'create' on a non-TestObj object."));
727             return JSValue::encode(jsUndefined());
728         }
729         return throwVMTypeError(exec);
730     }
731     UNUSED_PARAM(exec);
732     TestObj& impl = castedThis->impl();
733     JSValue result = jsBoolean(impl.isCreate());
734     return JSValue::encode(result);
735 }
736
737
738 EncodedJSValue jsTestObjReflectedStringAttr(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
739 {
740     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
741     UNUSED_PARAM(slotBase);
742     if (UNLIKELY(!castedThis)) {
743         if (jsDynamicCast<JSTestObjPrototype*>(slotBase)) {
744             ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
745             scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'reflectedStringAttr' on a non-TestObj object."));
746             return JSValue::encode(jsUndefined());
747         }
748         return throwVMTypeError(exec);
749     }
750     UNUSED_PARAM(exec);
751     TestObj& impl = castedThis->impl();
752     JSValue result = jsStringWithCache(exec, impl.fastGetAttribute(WebCore::HTMLNames::reflectedstringattrAttr));
753     return JSValue::encode(result);
754 }
755
756
757 EncodedJSValue jsTestObjReflectedIntegralAttr(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
758 {
759     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
760     UNUSED_PARAM(slotBase);
761     if (UNLIKELY(!castedThis)) {
762         if (jsDynamicCast<JSTestObjPrototype*>(slotBase)) {
763             ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
764             scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'reflectedIntegralAttr' on a non-TestObj object."));
765             return JSValue::encode(jsUndefined());
766         }
767         return throwVMTypeError(exec);
768     }
769     UNUSED_PARAM(exec);
770     TestObj& impl = castedThis->impl();
771     JSValue result = jsNumber(impl.getIntegralAttribute(WebCore::HTMLNames::reflectedintegralattrAttr));
772     return JSValue::encode(result);
773 }
774
775
776 EncodedJSValue jsTestObjReflectedUnsignedIntegralAttr(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
777 {
778     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
779     UNUSED_PARAM(slotBase);
780     if (UNLIKELY(!castedThis)) {
781         if (jsDynamicCast<JSTestObjPrototype*>(slotBase)) {
782             ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
783             scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'reflectedUnsignedIntegralAttr' on a non-TestObj object."));
784             return JSValue::encode(jsUndefined());
785         }
786         return throwVMTypeError(exec);
787     }
788     UNUSED_PARAM(exec);
789     TestObj& impl = castedThis->impl();
790     JSValue result = jsNumber(std::max(0, impl.getIntegralAttribute(WebCore::HTMLNames::reflectedunsignedintegralattrAttr)));
791     return JSValue::encode(result);
792 }
793
794
795 EncodedJSValue jsTestObjReflectedBooleanAttr(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
796 {
797     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
798     UNUSED_PARAM(slotBase);
799     if (UNLIKELY(!castedThis)) {
800         if (jsDynamicCast<JSTestObjPrototype*>(slotBase)) {
801             ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
802             scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'reflectedBooleanAttr' on a non-TestObj object."));
803             return JSValue::encode(jsUndefined());
804         }
805         return throwVMTypeError(exec);
806     }
807     UNUSED_PARAM(exec);
808     TestObj& impl = castedThis->impl();
809     JSValue result = jsBoolean(impl.fastHasAttribute(WebCore::HTMLNames::reflectedbooleanattrAttr));
810     return JSValue::encode(result);
811 }
812
813
814 EncodedJSValue jsTestObjReflectedURLAttr(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
815 {
816     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
817     UNUSED_PARAM(slotBase);
818     if (UNLIKELY(!castedThis)) {
819         if (jsDynamicCast<JSTestObjPrototype*>(slotBase)) {
820             ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
821             scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'reflectedURLAttr' on a non-TestObj object."));
822             return JSValue::encode(jsUndefined());
823         }
824         return throwVMTypeError(exec);
825     }
826     UNUSED_PARAM(exec);
827     TestObj& impl = castedThis->impl();
828     JSValue result = jsStringWithCache(exec, impl.getURLAttribute(WebCore::HTMLNames::reflectedurlattrAttr));
829     return JSValue::encode(result);
830 }
831
832
833 EncodedJSValue jsTestObjReflectedStringAttr(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
834 {
835     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
836     UNUSED_PARAM(slotBase);
837     if (UNLIKELY(!castedThis)) {
838         if (jsDynamicCast<JSTestObjPrototype*>(slotBase)) {
839             ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
840             scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'reflectedStringAttr' on a non-TestObj object."));
841             return JSValue::encode(jsUndefined());
842         }
843         return throwVMTypeError(exec);
844     }
845     UNUSED_PARAM(exec);
846     TestObj& impl = castedThis->impl();
847     JSValue result = jsStringWithCache(exec, impl.fastGetAttribute(WebCore::HTMLNames::customContentStringAttrAttr));
848     return JSValue::encode(result);
849 }
850
851
852 EncodedJSValue jsTestObjReflectedCustomIntegralAttr(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
853 {
854     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
855     UNUSED_PARAM(slotBase);
856     if (UNLIKELY(!castedThis)) {
857         if (jsDynamicCast<JSTestObjPrototype*>(slotBase)) {
858             ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
859             scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'reflectedCustomIntegralAttr' on a non-TestObj object."));
860             return JSValue::encode(jsUndefined());
861         }
862         return throwVMTypeError(exec);
863     }
864     UNUSED_PARAM(exec);
865     TestObj& impl = castedThis->impl();
866     JSValue result = jsNumber(impl.getIntegralAttribute(WebCore::HTMLNames::customContentIntegralAttrAttr));
867     return JSValue::encode(result);
868 }
869
870
871 EncodedJSValue jsTestObjReflectedCustomBooleanAttr(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
872 {
873     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
874     UNUSED_PARAM(slotBase);
875     if (UNLIKELY(!castedThis)) {
876         if (jsDynamicCast<JSTestObjPrototype*>(slotBase)) {
877             ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
878             scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'reflectedCustomBooleanAttr' on a non-TestObj object."));
879             return JSValue::encode(jsUndefined());
880         }
881         return throwVMTypeError(exec);
882     }
883     UNUSED_PARAM(exec);
884     TestObj& impl = castedThis->impl();
885     JSValue result = jsBoolean(impl.fastHasAttribute(WebCore::HTMLNames::customContentBooleanAttrAttr));
886     return JSValue::encode(result);
887 }
888
889
890 EncodedJSValue jsTestObjReflectedCustomURLAttr(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
891 {
892     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
893     UNUSED_PARAM(slotBase);
894     if (UNLIKELY(!castedThis)) {
895         if (jsDynamicCast<JSTestObjPrototype*>(slotBase)) {
896             ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
897             scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'reflectedCustomURLAttr' on a non-TestObj object."));
898             return JSValue::encode(jsUndefined());
899         }
900         return throwVMTypeError(exec);
901     }
902     UNUSED_PARAM(exec);
903     TestObj& impl = castedThis->impl();
904     JSValue result = jsStringWithCache(exec, impl.getURLAttribute(WebCore::HTMLNames::customContentURLAttrAttr));
905     return JSValue::encode(result);
906 }
907
908
909 EncodedJSValue jsTestObjTypedArrayAttr(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
910 {
911     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
912     UNUSED_PARAM(slotBase);
913     if (UNLIKELY(!castedThis)) {
914         if (jsDynamicCast<JSTestObjPrototype*>(slotBase)) {
915             ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
916             scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'typedArrayAttr' on a non-TestObj object."));
917             return JSValue::encode(jsUndefined());
918         }
919         return throwVMTypeError(exec);
920     }
921     UNUSED_PARAM(exec);
922     TestObj& impl = castedThis->impl();
923     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.typedArrayAttr()));
924     return JSValue::encode(result);
925 }
926
927
928 EncodedJSValue jsTestObjAttrWithGetterException(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
929 {
930     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
931     UNUSED_PARAM(slotBase);
932     if (UNLIKELY(!castedThis)) {
933         if (jsDynamicCast<JSTestObjPrototype*>(slotBase)) {
934             ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
935             scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'attrWithGetterException' on a non-TestObj object."));
936             return JSValue::encode(jsUndefined());
937         }
938         return throwVMTypeError(exec);
939     }
940     ExceptionCode ec = 0;
941     TestObj& impl = castedThis->impl();
942     JSValue result = jsNumber(impl.attrWithGetterException(ec));
943     setDOMException(exec, ec);
944     return JSValue::encode(result);
945 }
946
947
948 EncodedJSValue jsTestObjAttrWithSetterException(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
949 {
950     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
951     UNUSED_PARAM(slotBase);
952     if (UNLIKELY(!castedThis)) {
953         if (jsDynamicCast<JSTestObjPrototype*>(slotBase)) {
954             ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
955             scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'attrWithSetterException' on a non-TestObj object."));
956             return JSValue::encode(jsUndefined());
957         }
958         return throwVMTypeError(exec);
959     }
960     UNUSED_PARAM(exec);
961     TestObj& impl = castedThis->impl();
962     JSValue result = jsNumber(impl.attrWithSetterException());
963     return JSValue::encode(result);
964 }
965
966
967 EncodedJSValue jsTestObjStringAttrWithGetterException(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
968 {
969     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
970     UNUSED_PARAM(slotBase);
971     if (UNLIKELY(!castedThis)) {
972         if (jsDynamicCast<JSTestObjPrototype*>(slotBase)) {
973             ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
974             scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'stringAttrWithGetterException' on a non-TestObj object."));
975             return JSValue::encode(jsUndefined());
976         }
977         return throwVMTypeError(exec);
978     }
979     ExceptionCode ec = 0;
980     TestObj& impl = castedThis->impl();
981     JSValue result = jsStringWithCache(exec, impl.stringAttrWithGetterException(ec));
982     setDOMException(exec, ec);
983     return JSValue::encode(result);
984 }
985
986
987 EncodedJSValue jsTestObjStringAttrWithSetterException(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
988 {
989     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
990     UNUSED_PARAM(slotBase);
991     if (UNLIKELY(!castedThis)) {
992         if (jsDynamicCast<JSTestObjPrototype*>(slotBase)) {
993             ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
994             scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'stringAttrWithSetterException' on a non-TestObj object."));
995             return JSValue::encode(jsUndefined());
996         }
997         return throwVMTypeError(exec);
998     }
999     UNUSED_PARAM(exec);
1000     TestObj& impl = castedThis->impl();
1001     JSValue result = jsStringWithCache(exec, impl.stringAttrWithSetterException());
1002     return JSValue::encode(result);
1003 }
1004
1005
1006 EncodedJSValue jsTestObjCustomAttr(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1007 {
1008     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1009     UNUSED_PARAM(slotBase);
1010     if (UNLIKELY(!castedThis)) {
1011         if (jsDynamicCast<JSTestObjPrototype*>(slotBase)) {
1012             ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
1013             scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'customAttr' on a non-TestObj object."));
1014             return JSValue::encode(jsUndefined());
1015         }
1016         return throwVMTypeError(exec);
1017     }
1018     return JSValue::encode(castedThis->customAttr(exec));
1019 }
1020
1021
1022 EncodedJSValue jsTestObjWithScriptStateAttribute(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1023 {
1024     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1025     UNUSED_PARAM(slotBase);
1026     if (UNLIKELY(!castedThis)) {
1027         if (jsDynamicCast<JSTestObjPrototype*>(slotBase)) {
1028             ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
1029             scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'withScriptStateAttribute' on a non-TestObj object."));
1030             return JSValue::encode(jsUndefined());
1031         }
1032         return throwVMTypeError(exec);
1033     }
1034     TestObj& impl = castedThis->impl();
1035     JSValue result = jsNumber(impl.withScriptStateAttribute(exec));
1036     return JSValue::encode(result);
1037 }
1038
1039
1040 EncodedJSValue jsTestObjWithScriptExecutionContextAttribute(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1041 {
1042     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1043     UNUSED_PARAM(slotBase);
1044     if (UNLIKELY(!castedThis)) {
1045         if (jsDynamicCast<JSTestObjPrototype*>(slotBase)) {
1046             ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
1047             scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'withScriptExecutionContextAttribute' on a non-TestObj object."));
1048             return JSValue::encode(jsUndefined());
1049         }
1050         return throwVMTypeError(exec);
1051     }
1052     ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
1053     if (!scriptContext)
1054         return JSValue::encode(jsUndefined());
1055     TestObj& impl = castedThis->impl();
1056     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.withScriptExecutionContextAttribute(scriptContext)));
1057     return JSValue::encode(result);
1058 }
1059
1060
1061 EncodedJSValue jsTestObjWithScriptStateAttributeRaises(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1062 {
1063     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1064     UNUSED_PARAM(slotBase);
1065     if (UNLIKELY(!castedThis)) {
1066         if (jsDynamicCast<JSTestObjPrototype*>(slotBase)) {
1067             ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
1068             scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'withScriptStateAttributeRaises' on a non-TestObj object."));
1069             return JSValue::encode(jsUndefined());
1070         }
1071         return throwVMTypeError(exec);
1072     }
1073     ExceptionCode ec = 0;
1074     TestObj& impl = castedThis->impl();
1075     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.withScriptStateAttributeRaises(exec, ec)));
1076     setDOMException(exec, ec);
1077     return JSValue::encode(result);
1078 }
1079
1080
1081 EncodedJSValue jsTestObjWithScriptExecutionContextAttributeRaises(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1082 {
1083     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1084     UNUSED_PARAM(slotBase);
1085     if (UNLIKELY(!castedThis)) {
1086         if (jsDynamicCast<JSTestObjPrototype*>(slotBase)) {
1087             ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
1088             scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'withScriptExecutionContextAttributeRaises' on a non-TestObj object."));
1089             return JSValue::encode(jsUndefined());
1090         }
1091         return throwVMTypeError(exec);
1092     }
1093     ExceptionCode ec = 0;
1094     ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
1095     if (!scriptContext)
1096         return JSValue::encode(jsUndefined());
1097     TestObj& impl = castedThis->impl();
1098     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.withScriptExecutionContextAttributeRaises(scriptContext, ec)));
1099     setDOMException(exec, ec);
1100     return JSValue::encode(result);
1101 }
1102
1103
1104 EncodedJSValue jsTestObjWithScriptExecutionContextAndScriptStateAttribute(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1105 {
1106     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1107     UNUSED_PARAM(slotBase);
1108     if (UNLIKELY(!castedThis)) {
1109         if (jsDynamicCast<JSTestObjPrototype*>(slotBase)) {
1110             ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
1111             scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'withScriptExecutionContextAndScriptStateAttribute' on a non-TestObj object."));
1112             return JSValue::encode(jsUndefined());
1113         }
1114         return throwVMTypeError(exec);
1115     }
1116     ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
1117     if (!scriptContext)
1118         return JSValue::encode(jsUndefined());
1119     TestObj& impl = castedThis->impl();
1120     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.withScriptExecutionContextAndScriptStateAttribute(exec, scriptContext)));
1121     return JSValue::encode(result);
1122 }
1123
1124
1125 EncodedJSValue jsTestObjWithScriptExecutionContextAndScriptStateAttributeRaises(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1126 {
1127     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1128     UNUSED_PARAM(slotBase);
1129     if (UNLIKELY(!castedThis)) {
1130         if (jsDynamicCast<JSTestObjPrototype*>(slotBase)) {
1131             ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
1132             scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'withScriptExecutionContextAndScriptStateAttributeRaises' on a non-TestObj object."));
1133             return JSValue::encode(jsUndefined());
1134         }
1135         return throwVMTypeError(exec);
1136     }
1137     ExceptionCode ec = 0;
1138     ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
1139     if (!scriptContext)
1140         return JSValue::encode(jsUndefined());
1141     TestObj& impl = castedThis->impl();
1142     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.withScriptExecutionContextAndScriptStateAttributeRaises(exec, scriptContext, ec)));
1143     setDOMException(exec, ec);
1144     return JSValue::encode(result);
1145 }
1146
1147
1148 EncodedJSValue jsTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1149 {
1150     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1151     UNUSED_PARAM(slotBase);
1152     if (UNLIKELY(!castedThis)) {
1153         if (jsDynamicCast<JSTestObjPrototype*>(slotBase)) {
1154             ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
1155             scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'withScriptExecutionContextAndScriptStateWithSpacesAttribute' on a non-TestObj object."));
1156             return JSValue::encode(jsUndefined());
1157         }
1158         return throwVMTypeError(exec);
1159     }
1160     ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
1161     if (!scriptContext)
1162         return JSValue::encode(jsUndefined());
1163     TestObj& impl = castedThis->impl();
1164     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.withScriptExecutionContextAndScriptStateWithSpacesAttribute(exec, scriptContext)));
1165     return JSValue::encode(result);
1166 }
1167
1168
1169 EncodedJSValue jsTestObjWithScriptArgumentsAndCallStackAttribute(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1170 {
1171     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1172     UNUSED_PARAM(slotBase);
1173     if (UNLIKELY(!castedThis)) {
1174         if (jsDynamicCast<JSTestObjPrototype*>(slotBase)) {
1175             ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
1176             scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'withScriptArgumentsAndCallStackAttribute' on a non-TestObj object."));
1177             return JSValue::encode(jsUndefined());
1178         }
1179         return throwVMTypeError(exec);
1180     }
1181     TestObj& impl = castedThis->impl();
1182     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.withScriptArgumentsAndCallStackAttribute()));
1183     return JSValue::encode(result);
1184 }
1185
1186
1187 #if ENABLE(Condition1)
1188 EncodedJSValue jsTestObjConditionalAttr1(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1189 {
1190     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1191     UNUSED_PARAM(slotBase);
1192     if (UNLIKELY(!castedThis)) {
1193         if (jsDynamicCast<JSTestObjPrototype*>(slotBase)) {
1194             ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
1195             scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'conditionalAttr1' on a non-TestObj object."));
1196             return JSValue::encode(jsUndefined());
1197         }
1198         return throwVMTypeError(exec);
1199     }
1200     UNUSED_PARAM(exec);
1201     TestObj& impl = castedThis->impl();
1202     JSValue result = jsNumber(impl.conditionalAttr1());
1203     return JSValue::encode(result);
1204 }
1205
1206 #endif
1207
1208 #if ENABLE(Condition1) && ENABLE(Condition2)
1209 EncodedJSValue jsTestObjConditionalAttr2(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1210 {
1211     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1212     UNUSED_PARAM(slotBase);
1213     if (UNLIKELY(!castedThis)) {
1214         if (jsDynamicCast<JSTestObjPrototype*>(slotBase)) {
1215             ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
1216             scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'conditionalAttr2' on a non-TestObj object."));
1217             return JSValue::encode(jsUndefined());
1218         }
1219         return throwVMTypeError(exec);
1220     }
1221     UNUSED_PARAM(exec);
1222     TestObj& impl = castedThis->impl();
1223     JSValue result = jsNumber(impl.conditionalAttr2());
1224     return JSValue::encode(result);
1225 }
1226
1227 #endif
1228
1229 #if ENABLE(Condition1) || ENABLE(Condition2)
1230 EncodedJSValue jsTestObjConditionalAttr3(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1231 {
1232     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1233     UNUSED_PARAM(slotBase);
1234     if (UNLIKELY(!castedThis)) {
1235         if (jsDynamicCast<JSTestObjPrototype*>(slotBase)) {
1236             ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
1237             scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'conditionalAttr3' on a non-TestObj object."));
1238             return JSValue::encode(jsUndefined());
1239         }
1240         return throwVMTypeError(exec);
1241     }
1242     UNUSED_PARAM(exec);
1243     TestObj& impl = castedThis->impl();
1244     JSValue result = jsNumber(impl.conditionalAttr3());
1245     return JSValue::encode(result);
1246 }
1247
1248 #endif
1249
1250 #if ENABLE(Condition1)
1251 EncodedJSValue jsTestObjConditionalAttr4Constructor(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1252 {
1253     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1254     UNUSED_PARAM(slotBase);
1255     if (UNLIKELY(!castedThis)) {
1256         if (jsDynamicCast<JSTestObjPrototype*>(slotBase)) {
1257             ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
1258             scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'conditionalAttr4' on a non-TestObj object."));
1259             return JSValue::encode(jsUndefined());
1260         }
1261         return throwVMTypeError(exec);
1262     }
1263     return JSValue::encode(JSTestObjectA::getConstructor(exec->vm(), castedThis->globalObject()));
1264 }
1265
1266 #endif
1267
1268 #if ENABLE(Condition1) && ENABLE(Condition2)
1269 EncodedJSValue jsTestObjConditionalAttr5Constructor(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1270 {
1271     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1272     UNUSED_PARAM(slotBase);
1273     if (UNLIKELY(!castedThis)) {
1274         if (jsDynamicCast<JSTestObjPrototype*>(slotBase)) {
1275             ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
1276             scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'conditionalAttr5' on a non-TestObj object."));
1277             return JSValue::encode(jsUndefined());
1278         }
1279         return throwVMTypeError(exec);
1280     }
1281     return JSValue::encode(JSTestObjectB::getConstructor(exec->vm(), castedThis->globalObject()));
1282 }
1283
1284 #endif
1285
1286 #if ENABLE(Condition1) || ENABLE(Condition2)
1287 EncodedJSValue jsTestObjConditionalAttr6Constructor(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1288 {
1289     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1290     UNUSED_PARAM(slotBase);
1291     if (UNLIKELY(!castedThis)) {
1292         if (jsDynamicCast<JSTestObjPrototype*>(slotBase)) {
1293             ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
1294             scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'conditionalAttr6' on a non-TestObj object."));
1295             return JSValue::encode(jsUndefined());
1296         }
1297         return throwVMTypeError(exec);
1298     }
1299     return JSValue::encode(JSTestObjectC::getConstructor(exec->vm(), castedThis->globalObject()));
1300 }
1301
1302 #endif
1303
1304 EncodedJSValue jsTestObjCachedAttribute1(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1305 {
1306     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1307     UNUSED_PARAM(slotBase);
1308     if (UNLIKELY(!castedThis)) {
1309         if (jsDynamicCast<JSTestObjPrototype*>(slotBase)) {
1310             ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
1311             scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'cachedAttribute1' on a non-TestObj object."));
1312             return JSValue::encode(jsUndefined());
1313         }
1314         return throwVMTypeError(exec);
1315     }
1316     UNUSED_PARAM(exec);
1317     if (JSValue cachedValue = castedThis->m_cachedAttribute1.get())
1318         return JSValue::encode(cachedValue);
1319     TestObj& impl = castedThis->impl();
1320     JSValue result = (impl.cachedAttribute1().hasNoValue() ? jsNull() : impl.cachedAttribute1().jsValue());
1321     castedThis->m_cachedAttribute1.set(exec->vm(), castedThis, result);
1322     return JSValue::encode(result);
1323 }
1324
1325
1326 EncodedJSValue jsTestObjCachedAttribute2(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1327 {
1328     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1329     UNUSED_PARAM(slotBase);
1330     if (UNLIKELY(!castedThis)) {
1331         if (jsDynamicCast<JSTestObjPrototype*>(slotBase)) {
1332             ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
1333             scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'cachedAttribute2' on a non-TestObj object."));
1334             return JSValue::encode(jsUndefined());
1335         }
1336         return throwVMTypeError(exec);
1337     }
1338     UNUSED_PARAM(exec);
1339     if (JSValue cachedValue = castedThis->m_cachedAttribute2.get())
1340         return JSValue::encode(cachedValue);
1341     TestObj& impl = castedThis->impl();
1342     JSValue result = (impl.cachedAttribute2().hasNoValue() ? jsNull() : impl.cachedAttribute2().jsValue());
1343     castedThis->m_cachedAttribute2.set(exec->vm(), castedThis, result);
1344     return JSValue::encode(result);
1345 }
1346
1347
1348 EncodedJSValue jsTestObjAnyAttribute(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1349 {
1350     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1351     UNUSED_PARAM(slotBase);
1352     if (UNLIKELY(!castedThis)) {
1353         if (jsDynamicCast<JSTestObjPrototype*>(slotBase)) {
1354             ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
1355             scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'anyAttribute' on a non-TestObj object."));
1356             return JSValue::encode(jsUndefined());
1357         }
1358         return throwVMTypeError(exec);
1359     }
1360     UNUSED_PARAM(exec);
1361     TestObj& impl = castedThis->impl();
1362     JSValue result = (impl.anyAttribute().hasNoValue() ? jsNull() : impl.anyAttribute().jsValue());
1363     return JSValue::encode(result);
1364 }
1365
1366
1367 EncodedJSValue jsTestObjContentDocument(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1368 {
1369     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1370     UNUSED_PARAM(slotBase);
1371     if (UNLIKELY(!castedThis)) {
1372         if (jsDynamicCast<JSTestObjPrototype*>(slotBase)) {
1373             ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
1374             scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'contentDocument' on a non-TestObj object."));
1375             return JSValue::encode(jsUndefined());
1376         }
1377         return throwVMTypeError(exec);
1378     }
1379     TestObj& impl = castedThis->impl();
1380     return JSValue::encode(shouldAllowAccessToNode(exec, impl.contentDocument()) ? toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.contentDocument())) : jsNull());
1381 }
1382
1383
1384 EncodedJSValue jsTestObjMutablePoint(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1385 {
1386     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1387     UNUSED_PARAM(slotBase);
1388     if (UNLIKELY(!castedThis)) {
1389         if (jsDynamicCast<JSTestObjPrototype*>(slotBase)) {
1390             ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
1391             scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'mutablePoint' on a non-TestObj object."));
1392             return JSValue::encode(jsUndefined());
1393         }
1394         return throwVMTypeError(exec);
1395     }
1396     UNUSED_PARAM(exec);
1397     TestObj& impl = castedThis->impl();
1398     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(SVGStaticPropertyTearOff<TestObj, SVGPoint>::create(impl, impl.mutablePoint(), &TestObj::updateMutablePoint)));
1399     return JSValue::encode(result);
1400 }
1401
1402
1403 EncodedJSValue jsTestObjImmutablePoint(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1404 {
1405     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1406     UNUSED_PARAM(slotBase);
1407     if (UNLIKELY(!castedThis)) {
1408         if (jsDynamicCast<JSTestObjPrototype*>(slotBase)) {
1409             ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
1410             scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'immutablePoint' on a non-TestObj object."));
1411             return JSValue::encode(jsUndefined());
1412         }
1413         return throwVMTypeError(exec);
1414     }
1415     UNUSED_PARAM(exec);
1416     TestObj& impl = castedThis->impl();
1417     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(SVGPropertyTearOff<SVGPoint>::create(impl.immutablePoint())));
1418     return JSValue::encode(result);
1419 }
1420
1421
1422 EncodedJSValue jsTestObjStrawberry(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1423 {
1424     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1425     UNUSED_PARAM(slotBase);
1426     if (UNLIKELY(!castedThis)) {
1427         if (jsDynamicCast<JSTestObjPrototype*>(slotBase)) {
1428             ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
1429             scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'strawberry' on a non-TestObj object."));
1430             return JSValue::encode(jsUndefined());
1431         }
1432         return throwVMTypeError(exec);
1433     }
1434     UNUSED_PARAM(exec);
1435     TestObj& impl = castedThis->impl();
1436     JSValue result = jsNumber(impl.blueberry());
1437     return JSValue::encode(result);
1438 }
1439
1440
1441 EncodedJSValue jsTestObjStrictFloat(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1442 {
1443     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1444     UNUSED_PARAM(slotBase);
1445     if (UNLIKELY(!castedThis)) {
1446         if (jsDynamicCast<JSTestObjPrototype*>(slotBase)) {
1447             ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
1448             scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'strictFloat' on a non-TestObj object."));
1449             return JSValue::encode(jsUndefined());
1450         }
1451         return throwVMTypeError(exec);
1452     }
1453     UNUSED_PARAM(exec);
1454     TestObj& impl = castedThis->impl();
1455     JSValue result = jsNumber(impl.strictFloat());
1456     return JSValue::encode(result);
1457 }
1458
1459
1460 EncodedJSValue jsTestObjDescription(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1461 {
1462     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1463     UNUSED_PARAM(slotBase);
1464     if (UNLIKELY(!castedThis)) {
1465         if (jsDynamicCast<JSTestObjPrototype*>(slotBase)) {
1466             ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
1467             scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'description' on a non-TestObj object."));
1468             return JSValue::encode(jsUndefined());
1469         }
1470         return throwVMTypeError(exec);
1471     }
1472     UNUSED_PARAM(exec);
1473     TestObj& impl = castedThis->impl();
1474     JSValue result = jsNumber(impl.description());
1475     return JSValue::encode(result);
1476 }
1477
1478
1479 EncodedJSValue jsTestObjId(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1480 {
1481     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1482     UNUSED_PARAM(slotBase);
1483     if (UNLIKELY(!castedThis)) {
1484         if (jsDynamicCast<JSTestObjPrototype*>(slotBase)) {
1485             ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
1486             scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'id' on a non-TestObj object."));
1487             return JSValue::encode(jsUndefined());
1488         }
1489         return throwVMTypeError(exec);
1490     }
1491     UNUSED_PARAM(exec);
1492     TestObj& impl = castedThis->impl();
1493     JSValue result = jsNumber(impl.id());
1494     return JSValue::encode(result);
1495 }
1496
1497
1498 EncodedJSValue jsTestObjHash(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1499 {
1500     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1501     UNUSED_PARAM(slotBase);
1502     if (UNLIKELY(!castedThis)) {
1503         if (jsDynamicCast<JSTestObjPrototype*>(slotBase)) {
1504             ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
1505             scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'hash' on a non-TestObj object."));
1506             return JSValue::encode(jsUndefined());
1507         }
1508         return throwVMTypeError(exec);
1509     }
1510     UNUSED_PARAM(exec);
1511     TestObj& impl = castedThis->impl();
1512     JSValue result = jsStringWithCache(exec, impl.hash());
1513     return JSValue::encode(result);
1514 }
1515
1516
1517 EncodedJSValue jsTestObjReplaceableAttribute(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1518 {
1519     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1520     UNUSED_PARAM(slotBase);
1521     if (UNLIKELY(!castedThis)) {
1522         if (jsDynamicCast<JSTestObjPrototype*>(slotBase)) {
1523             ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
1524             scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'replaceableAttribute' on a non-TestObj object."));
1525             return JSValue::encode(jsUndefined());
1526         }
1527         return throwVMTypeError(exec);
1528     }
1529     UNUSED_PARAM(exec);
1530     TestObj& impl = castedThis->impl();
1531     JSValue result = jsNumber(impl.replaceableAttribute());
1532     return JSValue::encode(result);
1533 }
1534
1535
1536 EncodedJSValue jsTestObjNullableDoubleAttribute(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1537 {
1538     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1539     UNUSED_PARAM(slotBase);
1540     if (UNLIKELY(!castedThis)) {
1541         if (jsDynamicCast<JSTestObjPrototype*>(slotBase)) {
1542             ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
1543             scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'nullableDoubleAttribute' on a non-TestObj object."));
1544             return JSValue::encode(jsUndefined());
1545         }
1546         return throwVMTypeError(exec);
1547     }
1548     UNUSED_PARAM(exec);
1549     bool isNull = false;
1550     TestObj& impl = castedThis->impl();
1551     JSValue result = jsNumber(impl.nullableDoubleAttribute(isNull));
1552     if (isNull)
1553         return JSValue::encode(jsNull());
1554     return JSValue::encode(result);
1555 }
1556
1557
1558 EncodedJSValue jsTestObjNullableLongAttribute(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1559 {
1560     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1561     UNUSED_PARAM(slotBase);
1562     if (UNLIKELY(!castedThis)) {
1563         if (jsDynamicCast<JSTestObjPrototype*>(slotBase)) {
1564             ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
1565             scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'nullableLongAttribute' on a non-TestObj object."));
1566             return JSValue::encode(jsUndefined());
1567         }
1568         return throwVMTypeError(exec);
1569     }
1570     UNUSED_PARAM(exec);
1571     bool isNull = false;
1572     TestObj& impl = castedThis->impl();
1573     JSValue result = jsNumber(impl.nullableLongAttribute(isNull));
1574     if (isNull)
1575         return JSValue::encode(jsNull());
1576     return JSValue::encode(result);
1577 }
1578
1579
1580 EncodedJSValue jsTestObjNullableBooleanAttribute(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1581 {
1582     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1583     UNUSED_PARAM(slotBase);
1584     if (UNLIKELY(!castedThis)) {
1585         if (jsDynamicCast<JSTestObjPrototype*>(slotBase)) {
1586             ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
1587             scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'nullableBooleanAttribute' on a non-TestObj object."));
1588             return JSValue::encode(jsUndefined());
1589         }
1590         return throwVMTypeError(exec);
1591     }
1592     UNUSED_PARAM(exec);
1593     bool isNull = false;
1594     TestObj& impl = castedThis->impl();
1595     JSValue result = jsBoolean(impl.nullableBooleanAttribute(isNull));
1596     if (isNull)
1597         return JSValue::encode(jsNull());
1598     return JSValue::encode(result);
1599 }
1600
1601
1602 EncodedJSValue jsTestObjNullableStringAttribute(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1603 {
1604     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1605     UNUSED_PARAM(slotBase);
1606     if (UNLIKELY(!castedThis)) {
1607         if (jsDynamicCast<JSTestObjPrototype*>(slotBase)) {
1608             ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
1609             scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'nullableStringAttribute' on a non-TestObj object."));
1610             return JSValue::encode(jsUndefined());
1611         }
1612         return throwVMTypeError(exec);
1613     }
1614     UNUSED_PARAM(exec);
1615     bool isNull = false;
1616     TestObj& impl = castedThis->impl();
1617     JSValue result = jsStringWithCache(exec, impl.nullableStringAttribute(isNull));
1618     if (isNull)
1619         return JSValue::encode(jsNull());
1620     return JSValue::encode(result);
1621 }
1622
1623
1624 EncodedJSValue jsTestObjNullableLongSettableAttribute(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1625 {
1626     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1627     UNUSED_PARAM(slotBase);
1628     if (UNLIKELY(!castedThis)) {
1629         if (jsDynamicCast<JSTestObjPrototype*>(slotBase)) {
1630             ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
1631             scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'nullableLongSettableAttribute' on a non-TestObj object."));
1632             return JSValue::encode(jsUndefined());
1633         }
1634         return throwVMTypeError(exec);
1635     }
1636     UNUSED_PARAM(exec);
1637     bool isNull = false;
1638     TestObj& impl = castedThis->impl();
1639     JSValue result = jsNumber(impl.nullableLongSettableAttribute(isNull));
1640     if (isNull)
1641         return JSValue::encode(jsNull());
1642     return JSValue::encode(result);
1643 }
1644
1645
1646 EncodedJSValue jsTestObjNullableStringValue(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1647 {
1648     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1649     UNUSED_PARAM(slotBase);
1650     if (UNLIKELY(!castedThis)) {
1651         if (jsDynamicCast<JSTestObjPrototype*>(slotBase)) {
1652             ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
1653             scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'nullableStringValue' on a non-TestObj object."));
1654             return JSValue::encode(jsUndefined());
1655         }
1656         return throwVMTypeError(exec);
1657     }
1658     ExceptionCode ec = 0;
1659     bool isNull = false;
1660     TestObj& impl = castedThis->impl();
1661     JSValue result = jsNumber(impl.nullableStringValue(isNull, ec));
1662     if (isNull)
1663         return JSValue::encode(jsNull());
1664     setDOMException(exec, ec);
1665     return JSValue::encode(result);
1666 }
1667
1668
1669 EncodedJSValue jsTestObjAttribute(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1670 {
1671     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1672     UNUSED_PARAM(slotBase);
1673     if (UNLIKELY(!castedThis)) {
1674         if (jsDynamicCast<JSTestObjPrototype*>(slotBase)) {
1675             ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
1676             scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'attribute' on a non-TestObj object."));
1677             return JSValue::encode(jsUndefined());
1678         }
1679         return throwVMTypeError(exec);
1680     }
1681     UNUSED_PARAM(exec);
1682     TestObj& impl = castedThis->impl();
1683     JSValue result = jsStringWithCache(exec, impl.attribute());
1684     return JSValue::encode(result);
1685 }
1686
1687
1688 EncodedJSValue jsTestObjAttributeWithReservedEnumType(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
1689 {
1690     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1691     UNUSED_PARAM(slotBase);
1692     if (UNLIKELY(!castedThis)) {
1693         if (jsDynamicCast<JSTestObjPrototype*>(slotBase)) {
1694             ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
1695             scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'attributeWithReservedEnumType' on a non-TestObj object."));
1696             return JSValue::encode(jsUndefined());
1697         }
1698         return throwVMTypeError(exec);
1699     }
1700     UNUSED_PARAM(exec);
1701     TestObj& impl = castedThis->impl();
1702     JSValue result = jsStringWithCache(exec, impl.attributeWithReservedEnumType());
1703     return JSValue::encode(result);
1704 }
1705
1706
1707 EncodedJSValue jsTestObjConstructor(ExecState* exec, JSObject* baseValue, EncodedJSValue thisValue, PropertyName)
1708 {
1709     UNUSED_PARAM(baseValue);
1710     UNUSED_PARAM(thisValue);
1711     JSTestObjPrototype* domObject = jsDynamicCast<JSTestObjPrototype*>(baseValue);
1712     if (!domObject)
1713         return throwVMTypeError(exec);
1714     return JSValue::encode(JSTestObj::getConstructor(exec->vm(), domObject->globalObject()));
1715 }
1716
1717 void setJSTestObjConstructorStaticStringAttr(ExecState* exec, JSObject* /* baseObject */, EncodedJSValue, EncodedJSValue encodedValue)
1718 {
1719     JSValue value = JSValue::decode(encodedValue);
1720     UNUSED_PARAM(exec);
1721     const String& nativeValue(value.isEmpty() ? String() : value.toString(exec)->value(exec));
1722     if (UNLIKELY(exec->hadException()))
1723         return;
1724     TestObj::setStaticStringAttr(nativeValue);
1725 }
1726
1727
1728 void setJSTestObjTestSubObjEnabledBySettingConstructor(ExecState* exec, JSObject* /* baseObject */, EncodedJSValue thisValue, EncodedJSValue encodedValue)
1729 {
1730     JSValue value = JSValue::decode(encodedValue);
1731     UNUSED_PARAM(exec);
1732     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1733     if (UNLIKELY(!castedThis)) {
1734         throwVMTypeError(exec);
1735         return;
1736     }
1737     // Shadowing a built-in constructor
1738     castedThis->putDirect(exec->vm(), Identifier(exec, "TestSubObjEnabledBySetting"), value);
1739 }
1740
1741
1742 void setJSTestObjEnumAttr(ExecState* exec, JSObject* /* baseObject */, EncodedJSValue thisValue, EncodedJSValue encodedValue)
1743 {
1744     JSValue value = JSValue::decode(encodedValue);
1745     UNUSED_PARAM(exec);
1746     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1747     if (UNLIKELY(!castedThis)) {
1748         throwVMTypeError(exec);
1749         return;
1750     }
1751     TestObj& impl = castedThis->impl();
1752     const String nativeValue(value.isEmpty() ? String() : value.toString(exec)->value(exec));
1753     if (UNLIKELY(exec->hadException()))
1754         return;
1755     if (nativeValue != "" && nativeValue != "EnumValue1" && nativeValue != "EnumValue2" && nativeValue != "EnumValue3")
1756         return;
1757     impl.setEnumAttr(nativeValue);
1758 }
1759
1760
1761 void setJSTestObjByteAttr(ExecState* exec, JSObject* /* baseObject */, EncodedJSValue thisValue, EncodedJSValue encodedValue)
1762 {
1763     JSValue value = JSValue::decode(encodedValue);
1764     UNUSED_PARAM(exec);
1765     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1766     if (UNLIKELY(!castedThis)) {
1767         throwVMTypeError(exec);
1768         return;
1769     }
1770     TestObj& impl = castedThis->impl();
1771     int8_t nativeValue(toInt8(exec, value, NormalConversion));
1772     if (UNLIKELY(exec->hadException()))
1773         return;
1774     impl.setByteAttr(nativeValue);
1775 }
1776
1777
1778 void setJSTestObjOctetAttr(ExecState* exec, JSObject* /* baseObject */, EncodedJSValue thisValue, EncodedJSValue encodedValue)
1779 {
1780     JSValue value = JSValue::decode(encodedValue);
1781     UNUSED_PARAM(exec);
1782     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1783     if (UNLIKELY(!castedThis)) {
1784         throwVMTypeError(exec);
1785         return;
1786     }
1787     TestObj& impl = castedThis->impl();
1788     uint8_t nativeValue(toUInt8(exec, value, NormalConversion));
1789     if (UNLIKELY(exec->hadException()))
1790         return;
1791     impl.setOctetAttr(nativeValue);
1792 }
1793
1794
1795 void setJSTestObjShortAttr(ExecState* exec, JSObject* /* baseObject */, EncodedJSValue thisValue, EncodedJSValue encodedValue)
1796 {
1797     JSValue value = JSValue::decode(encodedValue);
1798     UNUSED_PARAM(exec);
1799     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1800     if (UNLIKELY(!castedThis)) {
1801         throwVMTypeError(exec);
1802         return;
1803     }
1804     TestObj& impl = castedThis->impl();
1805     int16_t nativeValue(toInt16(exec, value, NormalConversion));
1806     if (UNLIKELY(exec->hadException()))
1807         return;
1808     impl.setShortAttr(nativeValue);
1809 }
1810
1811
1812 void setJSTestObjUnsignedShortAttr(ExecState* exec, JSObject* /* baseObject */, EncodedJSValue thisValue, EncodedJSValue encodedValue)
1813 {
1814     JSValue value = JSValue::decode(encodedValue);
1815     UNUSED_PARAM(exec);
1816     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1817     if (UNLIKELY(!castedThis)) {
1818         throwVMTypeError(exec);
1819         return;
1820     }
1821     TestObj& impl = castedThis->impl();
1822     uint16_t nativeValue(toUInt16(exec, value, NormalConversion));
1823     if (UNLIKELY(exec->hadException()))
1824         return;
1825     impl.setUnsignedShortAttr(nativeValue);
1826 }
1827
1828
1829 void setJSTestObjLongAttr(ExecState* exec, JSObject* /* baseObject */, EncodedJSValue thisValue, EncodedJSValue encodedValue)
1830 {
1831     JSValue value = JSValue::decode(encodedValue);
1832     UNUSED_PARAM(exec);
1833     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1834     if (UNLIKELY(!castedThis)) {
1835         throwVMTypeError(exec);
1836         return;
1837     }
1838     TestObj& impl = castedThis->impl();
1839     int nativeValue(toInt32(exec, value, NormalConversion));
1840     if (UNLIKELY(exec->hadException()))
1841         return;
1842     impl.setLongAttr(nativeValue);
1843 }
1844
1845
1846 void setJSTestObjLongLongAttr(ExecState* exec, JSObject* /* baseObject */, EncodedJSValue thisValue, EncodedJSValue encodedValue)
1847 {
1848     JSValue value = JSValue::decode(encodedValue);
1849     UNUSED_PARAM(exec);
1850     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1851     if (UNLIKELY(!castedThis)) {
1852         throwVMTypeError(exec);
1853         return;
1854     }
1855     TestObj& impl = castedThis->impl();
1856     long long nativeValue(toInt64(exec, value, NormalConversion));
1857     if (UNLIKELY(exec->hadException()))
1858         return;
1859     impl.setLongLongAttr(nativeValue);
1860 }
1861
1862
1863 void setJSTestObjUnsignedLongLongAttr(ExecState* exec, JSObject* /* baseObject */, EncodedJSValue thisValue, EncodedJSValue encodedValue)
1864 {
1865     JSValue value = JSValue::decode(encodedValue);
1866     UNUSED_PARAM(exec);
1867     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1868     if (UNLIKELY(!castedThis)) {
1869         throwVMTypeError(exec);
1870         return;
1871     }
1872     TestObj& impl = castedThis->impl();
1873     unsigned long long nativeValue(toUInt64(exec, value, NormalConversion));
1874     if (UNLIKELY(exec->hadException()))
1875         return;
1876     impl.setUnsignedLongLongAttr(nativeValue);
1877 }
1878
1879
1880 void setJSTestObjStringAttr(ExecState* exec, JSObject* /* baseObject */, EncodedJSValue thisValue, EncodedJSValue encodedValue)
1881 {
1882     JSValue value = JSValue::decode(encodedValue);
1883     UNUSED_PARAM(exec);
1884     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1885     if (UNLIKELY(!castedThis)) {
1886         throwVMTypeError(exec);
1887         return;
1888     }
1889     TestObj& impl = castedThis->impl();
1890     const String& nativeValue(value.isEmpty() ? String() : value.toString(exec)->value(exec));
1891     if (UNLIKELY(exec->hadException()))
1892         return;
1893     impl.setStringAttr(nativeValue);
1894 }
1895
1896
1897 void setJSTestObjTestObjAttr(ExecState* exec, JSObject* /* baseObject */, EncodedJSValue thisValue, EncodedJSValue encodedValue)
1898 {
1899     JSValue value = JSValue::decode(encodedValue);
1900     UNUSED_PARAM(exec);
1901     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1902     if (UNLIKELY(!castedThis)) {
1903         throwVMTypeError(exec);
1904         return;
1905     }
1906     TestObj& impl = castedThis->impl();
1907     TestObj* nativeValue(toTestObj(value));
1908     if (UNLIKELY(exec->hadException()))
1909         return;
1910     impl.setTestObjAttr(nativeValue);
1911 }
1912
1913
1914 void setJSTestObjXMLObjAttr(ExecState* exec, JSObject* /* baseObject */, EncodedJSValue thisValue, EncodedJSValue encodedValue)
1915 {
1916     JSValue value = JSValue::decode(encodedValue);
1917     UNUSED_PARAM(exec);
1918     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1919     if (UNLIKELY(!castedThis)) {
1920         throwVMTypeError(exec);
1921         return;
1922     }
1923     TestObj& impl = castedThis->impl();
1924     TestObj* nativeValue(toTestObj(value));
1925     if (UNLIKELY(exec->hadException()))
1926         return;
1927     impl.setXMLObjAttr(nativeValue);
1928 }
1929
1930
1931 void setJSTestObjCreate(ExecState* exec, JSObject* /* baseObject */, EncodedJSValue thisValue, EncodedJSValue encodedValue)
1932 {
1933     JSValue value = JSValue::decode(encodedValue);
1934     UNUSED_PARAM(exec);
1935     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1936     if (UNLIKELY(!castedThis)) {
1937         throwVMTypeError(exec);
1938         return;
1939     }
1940     TestObj& impl = castedThis->impl();
1941     bool nativeValue(value.toBoolean(exec));
1942     if (UNLIKELY(exec->hadException()))
1943         return;
1944     impl.setCreate(nativeValue);
1945 }
1946
1947
1948 void setJSTestObjReflectedStringAttr(ExecState* exec, JSObject* /* baseObject */, EncodedJSValue thisValue, EncodedJSValue encodedValue)
1949 {
1950     JSValue value = JSValue::decode(encodedValue);
1951     UNUSED_PARAM(exec);
1952     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1953     if (UNLIKELY(!castedThis)) {
1954         throwVMTypeError(exec);
1955         return;
1956     }
1957     TestObj& impl = castedThis->impl();
1958     const String& nativeValue(valueToStringWithNullCheck(exec, value));
1959     if (UNLIKELY(exec->hadException()))
1960         return;
1961     impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::reflectedstringattrAttr, nativeValue);
1962 }
1963
1964
1965 void setJSTestObjReflectedIntegralAttr(ExecState* exec, JSObject* /* baseObject */, EncodedJSValue thisValue, EncodedJSValue encodedValue)
1966 {
1967     JSValue value = JSValue::decode(encodedValue);
1968     UNUSED_PARAM(exec);
1969     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1970     if (UNLIKELY(!castedThis)) {
1971         throwVMTypeError(exec);
1972         return;
1973     }
1974     TestObj& impl = castedThis->impl();
1975     int nativeValue(toInt32(exec, value, NormalConversion));
1976     if (UNLIKELY(exec->hadException()))
1977         return;
1978     impl.setIntegralAttribute(WebCore::HTMLNames::reflectedintegralattrAttr, nativeValue);
1979 }
1980
1981
1982 void setJSTestObjReflectedUnsignedIntegralAttr(ExecState* exec, JSObject* /* baseObject */, EncodedJSValue thisValue, EncodedJSValue encodedValue)
1983 {
1984     JSValue value = JSValue::decode(encodedValue);
1985     UNUSED_PARAM(exec);
1986     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
1987     if (UNLIKELY(!castedThis)) {
1988         throwVMTypeError(exec);
1989         return;
1990     }
1991     TestObj& impl = castedThis->impl();
1992     unsigned nativeValue(toUInt32(exec, value, NormalConversion));
1993     if (UNLIKELY(exec->hadException()))
1994         return;
1995     impl.setUnsignedIntegralAttribute(WebCore::HTMLNames::reflectedunsignedintegralattrAttr, nativeValue);
1996 }
1997
1998
1999 void setJSTestObjReflectedBooleanAttr(ExecState* exec, JSObject* /* baseObject */, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2000 {
2001     JSValue value = JSValue::decode(encodedValue);
2002     UNUSED_PARAM(exec);
2003     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2004     if (UNLIKELY(!castedThis)) {
2005         throwVMTypeError(exec);
2006         return;
2007     }
2008     TestObj& impl = castedThis->impl();
2009     bool nativeValue(value.toBoolean(exec));
2010     if (UNLIKELY(exec->hadException()))
2011         return;
2012     impl.setBooleanAttribute(WebCore::HTMLNames::reflectedbooleanattrAttr, nativeValue);
2013 }
2014
2015
2016 void setJSTestObjReflectedURLAttr(ExecState* exec, JSObject* /* baseObject */, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2017 {
2018     JSValue value = JSValue::decode(encodedValue);
2019     UNUSED_PARAM(exec);
2020     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2021     if (UNLIKELY(!castedThis)) {
2022         throwVMTypeError(exec);
2023         return;
2024     }
2025     TestObj& impl = castedThis->impl();
2026     const String& nativeValue(valueToStringWithNullCheck(exec, value));
2027     if (UNLIKELY(exec->hadException()))
2028         return;
2029     impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::reflectedurlattrAttr, nativeValue);
2030 }
2031
2032
2033 void setJSTestObjReflectedStringAttr(ExecState* exec, JSObject* /* baseObject */, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2034 {
2035     JSValue value = JSValue::decode(encodedValue);
2036     UNUSED_PARAM(exec);
2037     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2038     if (UNLIKELY(!castedThis)) {
2039         throwVMTypeError(exec);
2040         return;
2041     }
2042     TestObj& impl = castedThis->impl();
2043     const String& nativeValue(valueToStringWithNullCheck(exec, value));
2044     if (UNLIKELY(exec->hadException()))
2045         return;
2046     impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::customContentStringAttrAttr, nativeValue);
2047 }
2048
2049
2050 void setJSTestObjReflectedCustomIntegralAttr(ExecState* exec, JSObject* /* baseObject */, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2051 {
2052     JSValue value = JSValue::decode(encodedValue);
2053     UNUSED_PARAM(exec);
2054     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2055     if (UNLIKELY(!castedThis)) {
2056         throwVMTypeError(exec);
2057         return;
2058     }
2059     TestObj& impl = castedThis->impl();
2060     int nativeValue(toInt32(exec, value, NormalConversion));
2061     if (UNLIKELY(exec->hadException()))
2062         return;
2063     impl.setIntegralAttribute(WebCore::HTMLNames::customContentIntegralAttrAttr, nativeValue);
2064 }
2065
2066
2067 void setJSTestObjReflectedCustomBooleanAttr(ExecState* exec, JSObject* /* baseObject */, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2068 {
2069     JSValue value = JSValue::decode(encodedValue);
2070     UNUSED_PARAM(exec);
2071     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2072     if (UNLIKELY(!castedThis)) {
2073         throwVMTypeError(exec);
2074         return;
2075     }
2076     TestObj& impl = castedThis->impl();
2077     bool nativeValue(value.toBoolean(exec));
2078     if (UNLIKELY(exec->hadException()))
2079         return;
2080     impl.setBooleanAttribute(WebCore::HTMLNames::customContentBooleanAttrAttr, nativeValue);
2081 }
2082
2083
2084 void setJSTestObjReflectedCustomURLAttr(ExecState* exec, JSObject* /* baseObject */, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2085 {
2086     JSValue value = JSValue::decode(encodedValue);
2087     UNUSED_PARAM(exec);
2088     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2089     if (UNLIKELY(!castedThis)) {
2090         throwVMTypeError(exec);
2091         return;
2092     }
2093     TestObj& impl = castedThis->impl();
2094     const String& nativeValue(valueToStringWithNullCheck(exec, value));
2095     if (UNLIKELY(exec->hadException()))
2096         return;
2097     impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::customContentURLAttrAttr, nativeValue);
2098 }
2099
2100
2101 void setJSTestObjTypedArrayAttr(ExecState* exec, JSObject* /* baseObject */, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2102 {
2103     JSValue value = JSValue::decode(encodedValue);
2104     UNUSED_PARAM(exec);
2105     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2106     if (UNLIKELY(!castedThis)) {
2107         throwVMTypeError(exec);
2108         return;
2109     }
2110     TestObj& impl = castedThis->impl();
2111     RefPtr<Float32Array> nativeValue(toFloat32Array(value));
2112     if (UNLIKELY(exec->hadException()))
2113         return;
2114     impl.setTypedArrayAttr(nativeValue.get());
2115 }
2116
2117
2118 void setJSTestObjAttrWithGetterException(ExecState* exec, JSObject* /* baseObject */, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2119 {
2120     JSValue value = JSValue::decode(encodedValue);
2121     UNUSED_PARAM(exec);
2122     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2123     if (UNLIKELY(!castedThis)) {
2124         throwVMTypeError(exec);
2125         return;
2126     }
2127     TestObj& impl = castedThis->impl();
2128     int nativeValue(toInt32(exec, value, NormalConversion));
2129     if (UNLIKELY(exec->hadException()))
2130         return;
2131     impl.setAttrWithGetterException(nativeValue);
2132 }
2133
2134
2135 void setJSTestObjAttrWithSetterException(ExecState* exec, JSObject* /* baseObject */, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2136 {
2137     JSValue value = JSValue::decode(encodedValue);
2138     UNUSED_PARAM(exec);
2139     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2140     if (UNLIKELY(!castedThis)) {
2141         throwVMTypeError(exec);
2142         return;
2143     }
2144     TestObj& impl = castedThis->impl();
2145     ExceptionCode ec = 0;
2146     int nativeValue(toInt32(exec, value, NormalConversion));
2147     if (UNLIKELY(exec->hadException()))
2148         return;
2149     impl.setAttrWithSetterException(nativeValue, ec);
2150     setDOMException(exec, ec);
2151 }
2152
2153
2154 void setJSTestObjStringAttrWithGetterException(ExecState* exec, JSObject* /* baseObject */, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2155 {
2156     JSValue value = JSValue::decode(encodedValue);
2157     UNUSED_PARAM(exec);
2158     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2159     if (UNLIKELY(!castedThis)) {
2160         throwVMTypeError(exec);
2161         return;
2162     }
2163     TestObj& impl = castedThis->impl();
2164     const String& nativeValue(value.isEmpty() ? String() : value.toString(exec)->value(exec));
2165     if (UNLIKELY(exec->hadException()))
2166         return;
2167     impl.setStringAttrWithGetterException(nativeValue);
2168 }
2169
2170
2171 void setJSTestObjStringAttrWithSetterException(ExecState* exec, JSObject* /* baseObject */, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2172 {
2173     JSValue value = JSValue::decode(encodedValue);
2174     UNUSED_PARAM(exec);
2175     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2176     if (UNLIKELY(!castedThis)) {
2177         throwVMTypeError(exec);
2178         return;
2179     }
2180     TestObj& impl = castedThis->impl();
2181     ExceptionCode ec = 0;
2182     const String& nativeValue(value.isEmpty() ? String() : value.toString(exec)->value(exec));
2183     if (UNLIKELY(exec->hadException()))
2184         return;
2185     impl.setStringAttrWithSetterException(nativeValue, ec);
2186     setDOMException(exec, ec);
2187 }
2188
2189
2190 void setJSTestObjCustomAttr(ExecState* exec, JSObject* /* baseObject */, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2191 {
2192     JSValue value = JSValue::decode(encodedValue);
2193     UNUSED_PARAM(exec);
2194     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2195     if (UNLIKELY(!castedThis)) {
2196         throwVMTypeError(exec);
2197         return;
2198     }
2199     castedThis->setCustomAttr(exec, value);
2200 }
2201
2202
2203 void setJSTestObjWithScriptStateAttribute(ExecState* exec, JSObject* /* baseObject */, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2204 {
2205     JSValue value = JSValue::decode(encodedValue);
2206     UNUSED_PARAM(exec);
2207     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2208     if (UNLIKELY(!castedThis)) {
2209         throwVMTypeError(exec);
2210         return;
2211     }
2212     TestObj& impl = castedThis->impl();
2213     int nativeValue(toInt32(exec, value, NormalConversion));
2214     if (UNLIKELY(exec->hadException()))
2215         return;
2216     impl.setWithScriptStateAttribute(exec, nativeValue);
2217 }
2218
2219
2220 void setJSTestObjWithScriptExecutionContextAttribute(ExecState* exec, JSObject* /* baseObject */, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2221 {
2222     JSValue value = JSValue::decode(encodedValue);
2223     UNUSED_PARAM(exec);
2224     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2225     if (UNLIKELY(!castedThis)) {
2226         throwVMTypeError(exec);
2227         return;
2228     }
2229     TestObj& impl = castedThis->impl();
2230     TestObj* nativeValue(toTestObj(value));
2231     if (UNLIKELY(exec->hadException()))
2232         return;
2233     ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
2234     if (!scriptContext)
2235         return;
2236     impl.setWithScriptExecutionContextAttribute(scriptContext, nativeValue);
2237 }
2238
2239
2240 void setJSTestObjWithScriptStateAttributeRaises(ExecState* exec, JSObject* /* baseObject */, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2241 {
2242     JSValue value = JSValue::decode(encodedValue);
2243     UNUSED_PARAM(exec);
2244     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2245     if (UNLIKELY(!castedThis)) {
2246         throwVMTypeError(exec);
2247         return;
2248     }
2249     TestObj& impl = castedThis->impl();
2250     TestObj* nativeValue(toTestObj(value));
2251     if (UNLIKELY(exec->hadException()))
2252         return;
2253     impl.setWithScriptStateAttributeRaises(exec, nativeValue);
2254 }
2255
2256
2257 void setJSTestObjWithScriptExecutionContextAttributeRaises(ExecState* exec, JSObject* /* baseObject */, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2258 {
2259     JSValue value = JSValue::decode(encodedValue);
2260     UNUSED_PARAM(exec);
2261     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2262     if (UNLIKELY(!castedThis)) {
2263         throwVMTypeError(exec);
2264         return;
2265     }
2266     TestObj& impl = castedThis->impl();
2267     TestObj* nativeValue(toTestObj(value));
2268     if (UNLIKELY(exec->hadException()))
2269         return;
2270     ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
2271     if (!scriptContext)
2272         return;
2273     impl.setWithScriptExecutionContextAttributeRaises(scriptContext, nativeValue);
2274 }
2275
2276
2277 void setJSTestObjWithScriptExecutionContextAndScriptStateAttribute(ExecState* exec, JSObject* /* baseObject */, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2278 {
2279     JSValue value = JSValue::decode(encodedValue);
2280     UNUSED_PARAM(exec);
2281     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2282     if (UNLIKELY(!castedThis)) {
2283         throwVMTypeError(exec);
2284         return;
2285     }
2286     TestObj& impl = castedThis->impl();
2287     TestObj* nativeValue(toTestObj(value));
2288     if (UNLIKELY(exec->hadException()))
2289         return;
2290     ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
2291     if (!scriptContext)
2292         return;
2293     impl.setWithScriptExecutionContextAndScriptStateAttribute(exec, scriptContext, nativeValue);
2294 }
2295
2296
2297 void setJSTestObjWithScriptExecutionContextAndScriptStateAttributeRaises(ExecState* exec, JSObject* /* baseObject */, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2298 {
2299     JSValue value = JSValue::decode(encodedValue);
2300     UNUSED_PARAM(exec);
2301     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2302     if (UNLIKELY(!castedThis)) {
2303         throwVMTypeError(exec);
2304         return;
2305     }
2306     TestObj& impl = castedThis->impl();
2307     TestObj* nativeValue(toTestObj(value));
2308     if (UNLIKELY(exec->hadException()))
2309         return;
2310     ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
2311     if (!scriptContext)
2312         return;
2313     impl.setWithScriptExecutionContextAndScriptStateAttributeRaises(exec, scriptContext, nativeValue);
2314 }
2315
2316
2317 void setJSTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute(ExecState* exec, JSObject* /* baseObject */, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2318 {
2319     JSValue value = JSValue::decode(encodedValue);
2320     UNUSED_PARAM(exec);
2321     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2322     if (UNLIKELY(!castedThis)) {
2323         throwVMTypeError(exec);
2324         return;
2325     }
2326     TestObj& impl = castedThis->impl();
2327     TestObj* nativeValue(toTestObj(value));
2328     if (UNLIKELY(exec->hadException()))
2329         return;
2330     ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
2331     if (!scriptContext)
2332         return;
2333     impl.setWithScriptExecutionContextAndScriptStateWithSpacesAttribute(exec, scriptContext, nativeValue);
2334 }
2335
2336
2337 void setJSTestObjWithScriptArgumentsAndCallStackAttribute(ExecState* exec, JSObject* /* baseObject */, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2338 {
2339     JSValue value = JSValue::decode(encodedValue);
2340     UNUSED_PARAM(exec);
2341     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2342     if (UNLIKELY(!castedThis)) {
2343         throwVMTypeError(exec);
2344         return;
2345     }
2346     TestObj& impl = castedThis->impl();
2347     TestObj* nativeValue(toTestObj(value));
2348     if (UNLIKELY(exec->hadException()))
2349         return;
2350     impl.setWithScriptArgumentsAndCallStackAttribute(nativeValue);
2351 }
2352
2353
2354 #if ENABLE(Condition1)
2355 void setJSTestObjConditionalAttr1(ExecState* exec, JSObject* /* baseObject */, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2356 {
2357     JSValue value = JSValue::decode(encodedValue);
2358     UNUSED_PARAM(exec);
2359     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2360     if (UNLIKELY(!castedThis)) {
2361         throwVMTypeError(exec);
2362         return;
2363     }
2364     TestObj& impl = castedThis->impl();
2365     int nativeValue(toInt32(exec, value, NormalConversion));
2366     if (UNLIKELY(exec->hadException()))
2367         return;
2368     impl.setConditionalAttr1(nativeValue);
2369 }
2370
2371 #endif
2372
2373 #if ENABLE(Condition1) && ENABLE(Condition2)
2374 void setJSTestObjConditionalAttr2(ExecState* exec, JSObject* /* baseObject */, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2375 {
2376     JSValue value = JSValue::decode(encodedValue);
2377     UNUSED_PARAM(exec);
2378     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2379     if (UNLIKELY(!castedThis)) {
2380         throwVMTypeError(exec);
2381         return;
2382     }
2383     TestObj& impl = castedThis->impl();
2384     int nativeValue(toInt32(exec, value, NormalConversion));
2385     if (UNLIKELY(exec->hadException()))
2386         return;
2387     impl.setConditionalAttr2(nativeValue);
2388 }
2389
2390 #endif
2391
2392 #if ENABLE(Condition1) || ENABLE(Condition2)
2393 void setJSTestObjConditionalAttr3(ExecState* exec, JSObject* /* baseObject */, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2394 {
2395     JSValue value = JSValue::decode(encodedValue);
2396     UNUSED_PARAM(exec);
2397     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2398     if (UNLIKELY(!castedThis)) {
2399         throwVMTypeError(exec);
2400         return;
2401     }
2402     TestObj& impl = castedThis->impl();
2403     int nativeValue(toInt32(exec, value, NormalConversion));
2404     if (UNLIKELY(exec->hadException()))
2405         return;
2406     impl.setConditionalAttr3(nativeValue);
2407 }
2408
2409 #endif
2410
2411 #if ENABLE(Condition1)
2412 void setJSTestObjConditionalAttr4Constructor(ExecState* exec, JSObject* /* baseObject */, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2413 {
2414     JSValue value = JSValue::decode(encodedValue);
2415     UNUSED_PARAM(exec);
2416     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2417     if (UNLIKELY(!castedThis)) {
2418         throwVMTypeError(exec);
2419         return;
2420     }
2421     // Shadowing a built-in constructor
2422     castedThis->putDirect(exec->vm(), Identifier(exec, "conditionalAttr4"), value);
2423 }
2424
2425 #endif
2426
2427 #if ENABLE(Condition1) && ENABLE(Condition2)
2428 void setJSTestObjConditionalAttr5Constructor(ExecState* exec, JSObject* /* baseObject */, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2429 {
2430     JSValue value = JSValue::decode(encodedValue);
2431     UNUSED_PARAM(exec);
2432     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2433     if (UNLIKELY(!castedThis)) {
2434         throwVMTypeError(exec);
2435         return;
2436     }
2437     // Shadowing a built-in constructor
2438     castedThis->putDirect(exec->vm(), Identifier(exec, "conditionalAttr5"), value);
2439 }
2440
2441 #endif
2442
2443 #if ENABLE(Condition1) || ENABLE(Condition2)
2444 void setJSTestObjConditionalAttr6Constructor(ExecState* exec, JSObject* /* baseObject */, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2445 {
2446     JSValue value = JSValue::decode(encodedValue);
2447     UNUSED_PARAM(exec);
2448     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2449     if (UNLIKELY(!castedThis)) {
2450         throwVMTypeError(exec);
2451         return;
2452     }
2453     // Shadowing a built-in constructor
2454     castedThis->putDirect(exec->vm(), Identifier(exec, "conditionalAttr6"), value);
2455 }
2456
2457 #endif
2458
2459 void setJSTestObjAnyAttribute(ExecState* exec, JSObject* /* baseObject */, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2460 {
2461     JSValue value = JSValue::decode(encodedValue);
2462     UNUSED_PARAM(exec);
2463     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2464     if (UNLIKELY(!castedThis)) {
2465         throwVMTypeError(exec);
2466         return;
2467     }
2468     TestObj& impl = castedThis->impl();
2469     Deprecated::ScriptValue nativeValue(exec->vm(), value);
2470     if (UNLIKELY(exec->hadException()))
2471         return;
2472     impl.setAnyAttribute(nativeValue);
2473 }
2474
2475
2476 void setJSTestObjMutablePoint(ExecState* exec, JSObject* /* baseObject */, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2477 {
2478     JSValue value = JSValue::decode(encodedValue);
2479     UNUSED_PARAM(exec);
2480     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2481     if (UNLIKELY(!castedThis)) {
2482         throwVMTypeError(exec);
2483         return;
2484     }
2485     TestObj& impl = castedThis->impl();
2486     SVGPropertyTearOff<SVGPoint>* nativeValue(toSVGPoint(value));
2487     if (UNLIKELY(exec->hadException()))
2488         return;
2489     impl.setMutablePoint(nativeValue);
2490 }
2491
2492
2493 void setJSTestObjImmutablePoint(ExecState* exec, JSObject* /* baseObject */, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2494 {
2495     JSValue value = JSValue::decode(encodedValue);
2496     UNUSED_PARAM(exec);
2497     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2498     if (UNLIKELY(!castedThis)) {
2499         throwVMTypeError(exec);
2500         return;
2501     }
2502     TestObj& impl = castedThis->impl();
2503     SVGPropertyTearOff<SVGPoint>* nativeValue(toSVGPoint(value));
2504     if (UNLIKELY(exec->hadException()))
2505         return;
2506     impl.setImmutablePoint(nativeValue);
2507 }
2508
2509
2510 void setJSTestObjStrawberry(ExecState* exec, JSObject* /* baseObject */, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2511 {
2512     JSValue value = JSValue::decode(encodedValue);
2513     UNUSED_PARAM(exec);
2514     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2515     if (UNLIKELY(!castedThis)) {
2516         throwVMTypeError(exec);
2517         return;
2518     }
2519     TestObj& impl = castedThis->impl();
2520     int nativeValue(toInt32(exec, value, NormalConversion));
2521     if (UNLIKELY(exec->hadException()))
2522         return;
2523     impl.setBlueberry(nativeValue);
2524 }
2525
2526
2527 void setJSTestObjStrictFloat(ExecState* exec, JSObject* /* baseObject */, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2528 {
2529     JSValue value = JSValue::decode(encodedValue);
2530     UNUSED_PARAM(exec);
2531     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2532     if (UNLIKELY(!castedThis)) {
2533         throwVMTypeError(exec);
2534         return;
2535     }
2536     TestObj& impl = castedThis->impl();
2537     float nativeValue(value.toFloat(exec));
2538     if (UNLIKELY(exec->hadException()))
2539         return;
2540     impl.setStrictFloat(nativeValue);
2541 }
2542
2543
2544 void setJSTestObjId(ExecState* exec, JSObject* /* baseObject */, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2545 {
2546     JSValue value = JSValue::decode(encodedValue);
2547     UNUSED_PARAM(exec);
2548     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2549     if (UNLIKELY(!castedThis)) {
2550         throwVMTypeError(exec);
2551         return;
2552     }
2553     TestObj& impl = castedThis->impl();
2554     int nativeValue(toInt32(exec, value, NormalConversion));
2555     if (UNLIKELY(exec->hadException()))
2556         return;
2557     impl.setId(nativeValue);
2558 }
2559
2560
2561 void setJSTestObjReplaceableAttribute(ExecState* exec, JSObject* /* baseObject */, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2562 {
2563     JSValue value = JSValue::decode(encodedValue);
2564     UNUSED_PARAM(exec);
2565     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2566     if (UNLIKELY(!castedThis)) {
2567         throwVMTypeError(exec);
2568         return;
2569     }
2570     // Shadowing a built-in object
2571     castedThis->putDirect(exec->vm(), Identifier(exec, "replaceableAttribute"), value);
2572 }
2573
2574
2575 void setJSTestObjNullableLongSettableAttribute(ExecState* exec, JSObject* /* baseObject */, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2576 {
2577     JSValue value = JSValue::decode(encodedValue);
2578     UNUSED_PARAM(exec);
2579     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2580     if (UNLIKELY(!castedThis)) {
2581         throwVMTypeError(exec);
2582         return;
2583     }
2584     TestObj& impl = castedThis->impl();
2585     int nativeValue(toInt32(exec, value, NormalConversion));
2586     if (UNLIKELY(exec->hadException()))
2587         return;
2588     impl.setNullableLongSettableAttribute(nativeValue);
2589 }
2590
2591
2592 void setJSTestObjNullableStringValue(ExecState* exec, JSObject* /* baseObject */, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2593 {
2594     JSValue value = JSValue::decode(encodedValue);
2595     UNUSED_PARAM(exec);
2596     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2597     if (UNLIKELY(!castedThis)) {
2598         throwVMTypeError(exec);
2599         return;
2600     }
2601     TestObj& impl = castedThis->impl();
2602     int nativeValue(toInt32(exec, value, NormalConversion));
2603     if (UNLIKELY(exec->hadException()))
2604         return;
2605     impl.setNullableStringValue(nativeValue);
2606 }
2607
2608
2609 void setJSTestObjAttributeWithReservedEnumType(ExecState* exec, JSObject* /* baseObject */, EncodedJSValue thisValue, EncodedJSValue encodedValue)
2610 {
2611     JSValue value = JSValue::decode(encodedValue);
2612     UNUSED_PARAM(exec);
2613     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
2614     if (UNLIKELY(!castedThis)) {
2615         throwVMTypeError(exec);
2616         return;
2617     }
2618     TestObj& impl = castedThis->impl();
2619     const String nativeValue(value.isEmpty() ? String() : value.toString(exec)->value(exec));
2620     if (UNLIKELY(exec->hadException()))
2621         return;
2622     if (nativeValue != "" && nativeValue != "OptionalValue1" && nativeValue != "OptionalValue2" && nativeValue != "OptionalValue3")
2623         return;
2624     impl.setAttributeWithReservedEnumType(nativeValue);
2625 }
2626
2627
2628 JSValue JSTestObj::getConstructor(VM& vm, JSGlobalObject* globalObject)
2629 {
2630     return getDOMConstructor<JSTestObjConstructor>(vm, jsCast<JSDOMGlobalObject*>(globalObject));
2631 }
2632
2633 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionVoidMethod(ExecState* exec)
2634 {
2635     JSValue thisValue = exec->hostThisValue();
2636     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
2637     if (UNLIKELY(!castedThis))
2638         return throwVMTypeError(exec);
2639     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
2640     TestObj& impl = castedThis->impl();
2641     impl.voidMethod();
2642     return JSValue::encode(jsUndefined());
2643 }
2644
2645 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionVoidMethodWithArgs(ExecState* exec)
2646 {
2647     JSValue thisValue = exec->hostThisValue();
2648     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
2649     if (UNLIKELY(!castedThis))
2650         return throwVMTypeError(exec);
2651     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
2652     TestObj& impl = castedThis->impl();
2653     if (exec->argumentCount() < 3)
2654         return throwVMError(exec, createNotEnoughArgumentsError(exec));
2655     int longArg(toInt32(exec, exec->argument(0), NormalConversion));
2656     if (UNLIKELY(exec->hadException()))
2657         return JSValue::encode(jsUndefined());
2658     const String& strArg(exec->argument(1).isEmpty() ? String() : exec->argument(1).toString(exec)->value(exec));
2659     if (UNLIKELY(exec->hadException()))
2660         return JSValue::encode(jsUndefined());
2661     TestObj* objArg(toTestObj(exec->argument(2)));
2662     if (UNLIKELY(exec->hadException()))
2663         return JSValue::encode(jsUndefined());
2664     impl.voidMethodWithArgs(longArg, strArg, objArg);
2665     return JSValue::encode(jsUndefined());
2666 }
2667
2668 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionByteMethod(ExecState* exec)
2669 {
2670     JSValue thisValue = exec->hostThisValue();
2671     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
2672     if (UNLIKELY(!castedThis))
2673         return throwVMTypeError(exec);
2674     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
2675     TestObj& impl = castedThis->impl();
2676     JSValue result = jsNumber(impl.byteMethod());
2677     return JSValue::encode(result);
2678 }
2679
2680 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionByteMethodWithArgs(ExecState* exec)
2681 {
2682     JSValue thisValue = exec->hostThisValue();
2683     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
2684     if (UNLIKELY(!castedThis))
2685         return throwVMTypeError(exec);
2686     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
2687     TestObj& impl = castedThis->impl();
2688     if (exec->argumentCount() < 3)
2689         return throwVMError(exec, createNotEnoughArgumentsError(exec));
2690     int8_t byteArg(toInt8(exec, exec->argument(0), NormalConversion));
2691     if (UNLIKELY(exec->hadException()))
2692         return JSValue::encode(jsUndefined());
2693     const String& strArg(exec->argument(1).isEmpty() ? String() : exec->argument(1).toString(exec)->value(exec));
2694     if (UNLIKELY(exec->hadException()))
2695         return JSValue::encode(jsUndefined());
2696     TestObj* objArg(toTestObj(exec->argument(2)));
2697     if (UNLIKELY(exec->hadException()))
2698         return JSValue::encode(jsUndefined());
2699     JSValue result = jsNumber(impl.byteMethodWithArgs(byteArg, strArg, objArg));
2700     return JSValue::encode(result);
2701 }
2702
2703 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOctetMethod(ExecState* exec)
2704 {
2705     JSValue thisValue = exec->hostThisValue();
2706     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
2707     if (UNLIKELY(!castedThis))
2708         return throwVMTypeError(exec);
2709     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
2710     TestObj& impl = castedThis->impl();
2711     JSValue result = jsNumber(impl.octetMethod());
2712     return JSValue::encode(result);
2713 }
2714
2715 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOctetMethodWithArgs(ExecState* exec)
2716 {
2717     JSValue thisValue = exec->hostThisValue();
2718     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
2719     if (UNLIKELY(!castedThis))
2720         return throwVMTypeError(exec);
2721     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
2722     TestObj& impl = castedThis->impl();
2723     if (exec->argumentCount() < 3)
2724         return throwVMError(exec, createNotEnoughArgumentsError(exec));
2725     uint8_t octetArg(toUInt8(exec, exec->argument(0), NormalConversion));
2726     if (UNLIKELY(exec->hadException()))
2727         return JSValue::encode(jsUndefined());
2728     const String& strArg(exec->argument(1).isEmpty() ? String() : exec->argument(1).toString(exec)->value(exec));
2729     if (UNLIKELY(exec->hadException()))
2730         return JSValue::encode(jsUndefined());
2731     TestObj* objArg(toTestObj(exec->argument(2)));
2732     if (UNLIKELY(exec->hadException()))
2733         return JSValue::encode(jsUndefined());
2734     JSValue result = jsNumber(impl.octetMethodWithArgs(octetArg, strArg, objArg));
2735     return JSValue::encode(result);
2736 }
2737
2738 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionLongMethod(ExecState* exec)
2739 {
2740     JSValue thisValue = exec->hostThisValue();
2741     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
2742     if (UNLIKELY(!castedThis))
2743         return throwVMTypeError(exec);
2744     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
2745     TestObj& impl = castedThis->impl();
2746     JSValue result = jsNumber(impl.longMethod());
2747     return JSValue::encode(result);
2748 }
2749
2750 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionLongMethodWithArgs(ExecState* exec)
2751 {
2752     JSValue thisValue = exec->hostThisValue();
2753     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
2754     if (UNLIKELY(!castedThis))
2755         return throwVMTypeError(exec);
2756     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
2757     TestObj& impl = castedThis->impl();
2758     if (exec->argumentCount() < 3)
2759         return throwVMError(exec, createNotEnoughArgumentsError(exec));
2760     int longArg(toInt32(exec, exec->argument(0), NormalConversion));
2761     if (UNLIKELY(exec->hadException()))
2762         return JSValue::encode(jsUndefined());
2763     const String& strArg(exec->argument(1).isEmpty() ? String() : exec->argument(1).toString(exec)->value(exec));
2764     if (UNLIKELY(exec->hadException()))
2765         return JSValue::encode(jsUndefined());
2766     TestObj* objArg(toTestObj(exec->argument(2)));
2767     if (UNLIKELY(exec->hadException()))
2768         return JSValue::encode(jsUndefined());
2769     JSValue result = jsNumber(impl.longMethodWithArgs(longArg, strArg, objArg));
2770     return JSValue::encode(result);
2771 }
2772
2773 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionObjMethod(ExecState* exec)
2774 {
2775     JSValue thisValue = exec->hostThisValue();
2776     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
2777     if (UNLIKELY(!castedThis))
2778         return throwVMTypeError(exec);
2779     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
2780     TestObj& impl = castedThis->impl();
2781     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.objMethod()));
2782     return JSValue::encode(result);
2783 }
2784
2785 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionObjMethodWithArgs(ExecState* exec)
2786 {
2787     JSValue thisValue = exec->hostThisValue();
2788     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
2789     if (UNLIKELY(!castedThis))
2790         return throwVMTypeError(exec);
2791     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
2792     TestObj& impl = castedThis->impl();
2793     if (exec->argumentCount() < 3)
2794         return throwVMError(exec, createNotEnoughArgumentsError(exec));
2795     int longArg(toInt32(exec, exec->argument(0), NormalConversion));
2796     if (UNLIKELY(exec->hadException()))
2797         return JSValue::encode(jsUndefined());
2798     const String& strArg(exec->argument(1).isEmpty() ? String() : exec->argument(1).toString(exec)->value(exec));
2799     if (UNLIKELY(exec->hadException()))
2800         return JSValue::encode(jsUndefined());
2801     TestObj* objArg(toTestObj(exec->argument(2)));
2802     if (UNLIKELY(exec->hadException()))
2803         return JSValue::encode(jsUndefined());
2804     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.objMethodWithArgs(longArg, strArg, objArg)));
2805     return JSValue::encode(result);
2806 }
2807
2808 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithSequenceArg(ExecState* exec)
2809 {
2810     JSValue thisValue = exec->hostThisValue();
2811     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
2812     if (UNLIKELY(!castedThis))
2813         return throwVMTypeError(exec);
2814     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
2815     TestObj& impl = castedThis->impl();
2816     if (exec->argumentCount() < 1)
2817         return throwVMError(exec, createNotEnoughArgumentsError(exec));
2818     Vector<RefPtr<ScriptProfile>> sequenceArg((toRefPtrNativeArray<ScriptProfile, JSScriptProfile>(exec, exec->argument(0), &toScriptProfile)));
2819     if (UNLIKELY(exec->hadException()))
2820         return JSValue::encode(jsUndefined());
2821     impl.methodWithSequenceArg(sequenceArg);
2822     return JSValue::encode(jsUndefined());
2823 }
2824
2825 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodReturningSequence(ExecState* exec)
2826 {
2827     JSValue thisValue = exec->hostThisValue();
2828     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
2829     if (UNLIKELY(!castedThis))
2830         return throwVMTypeError(exec);
2831     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
2832     TestObj& impl = castedThis->impl();
2833     if (exec->argumentCount() < 1)
2834         return throwVMError(exec, createNotEnoughArgumentsError(exec));
2835     int longArg(toInt32(exec, exec->argument(0), NormalConversion));
2836     if (UNLIKELY(exec->hadException()))
2837         return JSValue::encode(jsUndefined());
2838     JSValue result = jsArray(exec, castedThis->globalObject(), impl.methodReturningSequence(longArg));
2839     return JSValue::encode(result);
2840 }
2841
2842 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithEnumArg(ExecState* exec)
2843 {
2844     JSValue thisValue = exec->hostThisValue();
2845     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
2846     if (UNLIKELY(!castedThis))
2847         return throwVMTypeError(exec);
2848     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
2849     TestObj& impl = castedThis->impl();
2850     if (exec->argumentCount() < 1)
2851         return throwVMError(exec, createNotEnoughArgumentsError(exec));
2852     const String enumArg(exec->argument(0).isEmpty() ? String() : exec->argument(0).toString(exec)->value(exec));
2853     if (UNLIKELY(exec->hadException()))
2854         return JSValue::encode(jsUndefined());
2855     if (enumArg != "" && enumArg != "EnumValue1" && enumArg != "EnumValue2" && enumArg != "EnumValue3")
2856         return throwVMTypeError(exec);
2857     impl.methodWithEnumArg(enumArg);
2858     return JSValue::encode(jsUndefined());
2859 }
2860
2861 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows(ExecState* exec)
2862 {
2863     JSValue thisValue = exec->hostThisValue();
2864     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
2865     if (UNLIKELY(!castedThis))
2866         return throwVMTypeError(exec);
2867     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
2868     TestObj& impl = castedThis->impl();
2869     if (exec->argumentCount() < 2)
2870         return throwVMError(exec, createNotEnoughArgumentsError(exec));
2871     ExceptionCode ec = 0;
2872     const String& strArg(exec->argument(0).isEmpty() ? String() : exec->argument(0).toString(exec)->value(exec));
2873     if (UNLIKELY(exec->hadException()))
2874         return JSValue::encode(jsUndefined());
2875     TestObj* objArg(toTestObj(exec->argument(1)));
2876     if (UNLIKELY(exec->hadException()))
2877         return JSValue::encode(jsUndefined());
2878     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.methodThatRequiresAllArgsAndThrows(strArg, objArg, ec)));
2879
2880     setDOMException(exec, ec);
2881     return JSValue::encode(result);
2882 }
2883
2884 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionSerializedValue(ExecState* exec)
2885 {
2886     JSValue thisValue = exec->hostThisValue();
2887     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
2888     if (UNLIKELY(!castedThis))
2889         return throwVMTypeError(exec);
2890     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
2891     TestObj& impl = castedThis->impl();
2892     if (exec->argumentCount() < 1)
2893         return throwVMError(exec, createNotEnoughArgumentsError(exec));
2894     RefPtr<SerializedScriptValue> serializedArg(SerializedScriptValue::create(exec, exec->argument(0), 0, 0));
2895     if (UNLIKELY(exec->hadException()))
2896         return JSValue::encode(jsUndefined());
2897     impl.serializedValue(serializedArg);
2898     return JSValue::encode(jsUndefined());
2899 }
2900
2901 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOptionsObject(ExecState* exec)
2902 {
2903     JSValue thisValue = exec->hostThisValue();
2904     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
2905     if (UNLIKELY(!castedThis))
2906         return throwVMTypeError(exec);
2907     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
2908     TestObj& impl = castedThis->impl();
2909     if (exec->argumentCount() < 1)
2910         return throwVMError(exec, createNotEnoughArgumentsError(exec));
2911     Dictionary oo(exec, exec->argument(0));
2912     if (UNLIKELY(exec->hadException()))
2913         return JSValue::encode(jsUndefined());
2914     Dictionary ooo(exec, exec->argument(1));
2915     if (UNLIKELY(exec->hadException()))
2916         return JSValue::encode(jsUndefined());
2917     impl.optionsObject(oo, ooo);
2918     return JSValue::encode(jsUndefined());
2919 }
2920
2921 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithException(ExecState* exec)
2922 {
2923     JSValue thisValue = exec->hostThisValue();
2924     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
2925     if (UNLIKELY(!castedThis))
2926         return throwVMTypeError(exec);
2927     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
2928     TestObj& impl = castedThis->impl();
2929     ExceptionCode ec = 0;
2930     impl.methodWithException(ec);
2931     setDOMException(exec, ec);
2932     return JSValue::encode(jsUndefined());
2933 }
2934
2935 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionCustomMethod(ExecState* exec)
2936 {
2937     JSValue thisValue = exec->hostThisValue();
2938     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
2939     if (UNLIKELY(!castedThis))
2940         return throwVMTypeError(exec);
2941     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
2942     return JSValue::encode(castedThis->customMethod(exec));
2943 }
2944
2945 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionCustomMethodWithArgs(ExecState* exec)
2946 {
2947     JSValue thisValue = exec->hostThisValue();
2948     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
2949     if (UNLIKELY(!castedThis))
2950         return throwVMTypeError(exec);
2951     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
2952     return JSValue::encode(castedThis->customMethodWithArgs(exec));
2953 }
2954
2955 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionAddEventListener(ExecState* exec)
2956 {
2957     JSValue thisValue = exec->hostThisValue();
2958     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
2959     if (UNLIKELY(!castedThis))
2960         return throwVMTypeError(exec);
2961     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
2962     TestObj& impl = castedThis->impl();
2963     JSValue listener = exec->argument(1);
2964     if (!listener.isObject())
2965         return JSValue::encode(jsUndefined());
2966     impl.addEventListener(exec->argument(0).toString(exec)->value(exec), JSEventListener::create(asObject(listener), castedThis, false, currentWorld(exec)), exec->argument(2).toBoolean(exec));
2967     return JSValue::encode(jsUndefined());
2968 }
2969
2970 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionRemoveEventListener(ExecState* exec)
2971 {
2972     JSValue thisValue = exec->hostThisValue();
2973     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
2974     if (UNLIKELY(!castedThis))
2975         return throwVMTypeError(exec);
2976     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
2977     TestObj& impl = castedThis->impl();
2978     JSValue listener = exec->argument(1);
2979     if (!listener.isObject())
2980         return JSValue::encode(jsUndefined());
2981     impl.removeEventListener(exec->argument(0).toString(exec)->value(exec), JSEventListener::create(asObject(listener), castedThis, false, currentWorld(exec)).get(), exec->argument(2).toBoolean(exec));
2982     return JSValue::encode(jsUndefined());
2983 }
2984
2985 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptStateVoid(ExecState* exec)
2986 {
2987     JSValue thisValue = exec->hostThisValue();
2988     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
2989     if (UNLIKELY(!castedThis))
2990         return throwVMTypeError(exec);
2991     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
2992     TestObj& impl = castedThis->impl();
2993     impl.withScriptStateVoid(exec);
2994     return JSValue::encode(jsUndefined());
2995 }
2996
2997 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptStateObj(ExecState* exec)
2998 {
2999     JSValue thisValue = exec->hostThisValue();
3000     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
3001     if (UNLIKELY(!castedThis))
3002         return throwVMTypeError(exec);
3003     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
3004     TestObj& impl = castedThis->impl();
3005     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.withScriptStateObj(exec)));
3006     if (UNLIKELY(exec->hadException()))
3007         return JSValue::encode(jsUndefined());
3008     return JSValue::encode(result);
3009 }
3010
3011 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptStateVoidException(ExecState* exec)
3012 {
3013     JSValue thisValue = exec->hostThisValue();
3014     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
3015     if (UNLIKELY(!castedThis))
3016         return throwVMTypeError(exec);
3017     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
3018     TestObj& impl = castedThis->impl();
3019     ExceptionCode ec = 0;
3020     impl.withScriptStateVoidException(exec, ec);
3021     setDOMException(exec, ec);
3022     return JSValue::encode(jsUndefined());
3023 }
3024
3025 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptStateObjException(ExecState* exec)
3026 {
3027     JSValue thisValue = exec->hostThisValue();
3028     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
3029     if (UNLIKELY(!castedThis))
3030         return throwVMTypeError(exec);
3031     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
3032     TestObj& impl = castedThis->impl();
3033     ExceptionCode ec = 0;
3034     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.withScriptStateObjException(exec, ec)));
3035
3036     setDOMException(exec, ec);
3037     if (UNLIKELY(exec->hadException()))
3038         return JSValue::encode(jsUndefined());
3039     return JSValue::encode(result);
3040 }
3041
3042 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptExecutionContext(ExecState* exec)
3043 {
3044     JSValue thisValue = exec->hostThisValue();
3045     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
3046     if (UNLIKELY(!castedThis))
3047         return throwVMTypeError(exec);
3048     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
3049     TestObj& impl = castedThis->impl();
3050     ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
3051     if (!scriptContext)
3052         return JSValue::encode(jsUndefined());
3053     impl.withScriptExecutionContext(scriptContext);
3054     return JSValue::encode(jsUndefined());
3055 }
3056
3057 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptState(ExecState* exec)
3058 {
3059     JSValue thisValue = exec->hostThisValue();
3060     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
3061     if (UNLIKELY(!castedThis))
3062         return throwVMTypeError(exec);
3063     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
3064     TestObj& impl = castedThis->impl();
3065     ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
3066     if (!scriptContext)
3067         return JSValue::encode(jsUndefined());
3068     impl.withScriptExecutionContextAndScriptState(exec, scriptContext);
3069     return JSValue::encode(jsUndefined());
3070 }
3071
3072 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateObjException(ExecState* exec)
3073 {
3074     JSValue thisValue = exec->hostThisValue();
3075     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
3076     if (UNLIKELY(!castedThis))
3077         return throwVMTypeError(exec);
3078     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
3079     TestObj& impl = castedThis->impl();
3080     ExceptionCode ec = 0;
3081     ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
3082     if (!scriptContext)
3083         return JSValue::encode(jsUndefined());
3084     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.withScriptExecutionContextAndScriptStateObjException(exec, scriptContext, ec)));
3085
3086     setDOMException(exec, ec);
3087     if (UNLIKELY(exec->hadException()))
3088         return JSValue::encode(jsUndefined());
3089     return JSValue::encode(result);
3090 }
3091
3092 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateWithSpaces(ExecState* exec)
3093 {
3094     JSValue thisValue = exec->hostThisValue();
3095     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
3096     if (UNLIKELY(!castedThis))
3097         return throwVMTypeError(exec);
3098     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
3099     TestObj& impl = castedThis->impl();
3100     ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
3101     if (!scriptContext)
3102         return JSValue::encode(jsUndefined());
3103     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.withScriptExecutionContextAndScriptStateWithSpaces(exec, scriptContext)));
3104     if (UNLIKELY(exec->hadException()))
3105         return JSValue::encode(jsUndefined());
3106     return JSValue::encode(result);
3107 }
3108
3109 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptArgumentsAndCallStack(ExecState* exec)
3110 {
3111     JSValue thisValue = exec->hostThisValue();
3112     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
3113     if (UNLIKELY(!castedThis))
3114         return throwVMTypeError(exec);
3115     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
3116     TestObj& impl = castedThis->impl();
3117     RefPtr<Inspector::ScriptArguments> scriptArguments(Inspector::createScriptArguments(exec, 0));
3118     impl.withScriptArgumentsAndCallStack(scriptArguments.release());
3119     return JSValue::encode(jsUndefined());
3120 }
3121
3122 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalArg(ExecState* exec)
3123 {
3124     JSValue thisValue = exec->hostThisValue();
3125     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
3126     if (UNLIKELY(!castedThis))
3127         return throwVMTypeError(exec);
3128     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
3129     TestObj& impl = castedThis->impl();
3130
3131     size_t argsCount = exec->argumentCount();
3132     if (argsCount <= 0) {
3133         impl.methodWithOptionalArg();
3134         return JSValue::encode(jsUndefined());
3135     }
3136
3137     int opt(toInt32(exec, exec->argument(0), NormalConversion));
3138     if (UNLIKELY(exec->hadException()))
3139         return JSValue::encode(jsUndefined());
3140     impl.methodWithOptionalArg(opt);
3141     return JSValue::encode(jsUndefined());
3142 }
3143
3144 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg(ExecState* exec)
3145 {
3146     JSValue thisValue = exec->hostThisValue();
3147     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
3148     if (UNLIKELY(!castedThis))
3149         return throwVMTypeError(exec);
3150     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
3151     TestObj& impl = castedThis->impl();
3152     if (exec->argumentCount() < 1)
3153         return throwVMError(exec, createNotEnoughArgumentsError(exec));
3154     int nonOpt(toInt32(exec, exec->argument(0), NormalConversion));
3155     if (UNLIKELY(exec->hadException()))
3156         return JSValue::encode(jsUndefined());
3157
3158     size_t argsCount = exec->argumentCount();
3159     if (argsCount <= 1) {
3160         impl.methodWithNonOptionalArgAndOptionalArg(nonOpt);
3161         return JSValue::encode(jsUndefined());
3162     }
3163
3164     int opt(toInt32(exec, exec->argument(1), NormalConversion));
3165     if (UNLIKELY(exec->hadException()))
3166         return JSValue::encode(jsUndefined());
3167     impl.methodWithNonOptionalArgAndOptionalArg(nonOpt, opt);