2 This file is part of the WebKit open source project.
3 This file has been generated by generate-bindings.pl. DO NOT MODIFY!
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.
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.
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.
22 #include "JSTestObj.h"
24 #include "Dictionary.h"
26 #include "ExceptionCode.h"
27 #include "HTMLNames.h"
28 #include "IDBBindingUtilities.h"
30 #include "JSDOMBinding.h"
31 #include "JSDOMStringList.h"
32 #include "JSDocument.h"
33 #include "JSEventListener.h"
34 #include "JSSVGDocument.h"
35 #include "JSSVGPoint.h"
36 #include "JSScriptProfile.h"
37 #include "JSTestCallback.h"
38 #include "JSTestObj.h"
47 #include "SVGDocument.h"
48 #include "SVGStaticPropertyTearOff.h"
49 #include "ScriptArguments.h"
50 #include "ScriptCallStack.h"
51 #include "ScriptCallStackFactory.h"
52 #include "ScriptProfile.h"
53 #include "SerializedScriptValue.h"
56 #include <runtime/Error.h>
57 #include <runtime/JSArray.h>
58 #include <runtime/JSString.h>
59 #include <wtf/GetPtr.h>
61 #if ENABLE(Condition1)
62 #include "JSTestObjectA.h"
65 #if ENABLE(Condition1) && ENABLE(Condition2)
66 #include "JSTestObjectB.h"
69 #if ENABLE(Condition1) || ENABLE(Condition2)
70 #include "JSTestObjectC.h"
77 ASSERT_CLASS_FITS_IN_CELL(JSTestObj);
80 static const HashTableValue JSTestObjTableValues[] =
82 { "readOnlyIntAttr", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReadOnlyIntAttr), (intptr_t)0, NoIntrinsic },
83 { "readOnlyStringAttr", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReadOnlyStringAttr), (intptr_t)0, NoIntrinsic },
84 { "readOnlyTestObjAttr", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReadOnlyTestObjAttr), (intptr_t)0, NoIntrinsic },
85 { "shortAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjShortAttr), (intptr_t)setJSTestObjShortAttr, NoIntrinsic },
86 { "unsignedShortAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjUnsignedShortAttr), (intptr_t)setJSTestObjUnsignedShortAttr, NoIntrinsic },
87 { "intAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjIntAttr), (intptr_t)setJSTestObjIntAttr, NoIntrinsic },
88 { "longLongAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjLongLongAttr), (intptr_t)setJSTestObjLongLongAttr, NoIntrinsic },
89 { "unsignedLongLongAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjUnsignedLongLongAttr), (intptr_t)setJSTestObjUnsignedLongLongAttr, NoIntrinsic },
90 { "stringAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjStringAttr), (intptr_t)setJSTestObjStringAttr, NoIntrinsic },
91 { "testObjAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjTestObjAttr), (intptr_t)setJSTestObjTestObjAttr, NoIntrinsic },
92 { "sequenceAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjSequenceAttr), (intptr_t)setJSTestObjSequenceAttr, NoIntrinsic },
93 { "XMLObjAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjXMLObjAttr), (intptr_t)setJSTestObjXMLObjAttr, NoIntrinsic },
94 { "create", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCreate), (intptr_t)setJSTestObjCreate, NoIntrinsic },
95 { "reflectedStringAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReflectedStringAttr), (intptr_t)setJSTestObjReflectedStringAttr, NoIntrinsic },
96 { "reflectedIntegralAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReflectedIntegralAttr), (intptr_t)setJSTestObjReflectedIntegralAttr, NoIntrinsic },
97 { "reflectedUnsignedIntegralAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReflectedUnsignedIntegralAttr), (intptr_t)setJSTestObjReflectedUnsignedIntegralAttr, NoIntrinsic },
98 { "reflectedBooleanAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReflectedBooleanAttr), (intptr_t)setJSTestObjReflectedBooleanAttr, NoIntrinsic },
99 { "reflectedURLAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReflectedURLAttr), (intptr_t)setJSTestObjReflectedURLAttr, NoIntrinsic },
100 { "reflectedStringAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReflectedStringAttr), (intptr_t)setJSTestObjReflectedStringAttr, NoIntrinsic },
101 { "reflectedCustomIntegralAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReflectedCustomIntegralAttr), (intptr_t)setJSTestObjReflectedCustomIntegralAttr, NoIntrinsic },
102 { "reflectedCustomBooleanAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReflectedCustomBooleanAttr), (intptr_t)setJSTestObjReflectedCustomBooleanAttr, NoIntrinsic },
103 { "reflectedCustomURLAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReflectedCustomURLAttr), (intptr_t)setJSTestObjReflectedCustomURLAttr, NoIntrinsic },
104 { "attrWithGetterException", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjAttrWithGetterException), (intptr_t)setJSTestObjAttrWithGetterException, NoIntrinsic },
105 { "attrWithSetterException", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjAttrWithSetterException), (intptr_t)setJSTestObjAttrWithSetterException, NoIntrinsic },
106 { "stringAttrWithGetterException", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjStringAttrWithGetterException), (intptr_t)setJSTestObjStringAttrWithGetterException, NoIntrinsic },
107 { "stringAttrWithSetterException", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjStringAttrWithSetterException), (intptr_t)setJSTestObjStringAttrWithSetterException, NoIntrinsic },
108 { "customAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCustomAttr), (intptr_t)setJSTestObjCustomAttr, NoIntrinsic },
109 { "withScriptStateAttribute", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjWithScriptStateAttribute), (intptr_t)setJSTestObjWithScriptStateAttribute, NoIntrinsic },
110 { "withScriptExecutionContextAttribute", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjWithScriptExecutionContextAttribute), (intptr_t)setJSTestObjWithScriptExecutionContextAttribute, NoIntrinsic },
111 { "withScriptStateAttributeRaises", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjWithScriptStateAttributeRaises), (intptr_t)setJSTestObjWithScriptStateAttributeRaises, NoIntrinsic },
112 { "withScriptExecutionContextAttributeRaises", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjWithScriptExecutionContextAttributeRaises), (intptr_t)setJSTestObjWithScriptExecutionContextAttributeRaises, NoIntrinsic },
113 { "withScriptExecutionContextAndScriptStateAttribute", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjWithScriptExecutionContextAndScriptStateAttribute), (intptr_t)setJSTestObjWithScriptExecutionContextAndScriptStateAttribute, NoIntrinsic },
114 { "withScriptExecutionContextAndScriptStateAttributeRaises", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjWithScriptExecutionContextAndScriptStateAttributeRaises), (intptr_t)setJSTestObjWithScriptExecutionContextAndScriptStateAttributeRaises, NoIntrinsic },
115 { "withScriptExecutionContextAndScriptStateWithSpacesAttribute", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute), (intptr_t)setJSTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute, NoIntrinsic },
116 { "withScriptArgumentsAndCallStackAttribute", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjWithScriptArgumentsAndCallStackAttribute), (intptr_t)setJSTestObjWithScriptArgumentsAndCallStackAttribute, NoIntrinsic },
117 #if ENABLE(Condition1)
118 { "conditionalAttr1", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjConditionalAttr1), (intptr_t)setJSTestObjConditionalAttr1, NoIntrinsic },
120 #if ENABLE(Condition1) && ENABLE(Condition2)
121 { "conditionalAttr2", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjConditionalAttr2), (intptr_t)setJSTestObjConditionalAttr2, NoIntrinsic },
123 #if ENABLE(Condition1) || ENABLE(Condition2)
124 { "conditionalAttr3", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjConditionalAttr3), (intptr_t)setJSTestObjConditionalAttr3, NoIntrinsic },
126 #if ENABLE(Condition1)
127 { "conditionalAttr4", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjConditionalAttr4Constructor), (intptr_t)setJSTestObjConditionalAttr4Constructor, NoIntrinsic },
129 #if ENABLE(Condition1) && ENABLE(Condition2)
130 { "conditionalAttr5", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjConditionalAttr5Constructor), (intptr_t)setJSTestObjConditionalAttr5Constructor, NoIntrinsic },
132 #if ENABLE(Condition1) || ENABLE(Condition2)
133 { "conditionalAttr6", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjConditionalAttr6Constructor), (intptr_t)setJSTestObjConditionalAttr6Constructor, NoIntrinsic },
135 { "cachedAttribute1", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCachedAttribute1), (intptr_t)0, NoIntrinsic },
136 { "cachedAttribute2", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCachedAttribute2), (intptr_t)0, NoIntrinsic },
137 { "contentDocument", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjContentDocument), (intptr_t)0, NoIntrinsic },
138 { "mutablePoint", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjMutablePoint), (intptr_t)setJSTestObjMutablePoint, NoIntrinsic },
139 { "immutablePoint", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjImmutablePoint), (intptr_t)setJSTestObjImmutablePoint, NoIntrinsic },
140 { "strawberry", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjStrawberry), (intptr_t)setJSTestObjStrawberry, NoIntrinsic },
141 { "strictFloat", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjStrictFloat), (intptr_t)setJSTestObjStrictFloat, NoIntrinsic },
142 { "description", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjDescription), (intptr_t)0, NoIntrinsic },
143 { "id", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjId), (intptr_t)setJSTestObjId, NoIntrinsic },
144 { "hash", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjHash), (intptr_t)0, NoIntrinsic },
145 { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjConstructor), (intptr_t)0, NoIntrinsic },
146 { 0, 0, 0, 0, NoIntrinsic }
149 static const HashTable JSTestObjTable = { 138, 127, JSTestObjTableValues, 0 };
150 /* Hash table for constructor */
152 static const HashTableValue JSTestObjConstructorTableValues[] =
154 #if ENABLE(Condition1)
155 { "CONDITIONAL_CONST", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONDITIONAL_CONST), (intptr_t)0, NoIntrinsic },
157 { "CONST_VALUE_0", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_0), (intptr_t)0, NoIntrinsic },
158 { "CONST_VALUE_1", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_1), (intptr_t)0, NoIntrinsic },
159 { "CONST_VALUE_2", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_2), (intptr_t)0, NoIntrinsic },
160 { "CONST_VALUE_4", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_4), (intptr_t)0, NoIntrinsic },
161 { "CONST_VALUE_8", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_8), (intptr_t)0, NoIntrinsic },
162 { "CONST_VALUE_9", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_9), (intptr_t)0, NoIntrinsic },
163 { "CONST_VALUE_10", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_10), (intptr_t)0, NoIntrinsic },
164 { "CONST_VALUE_11", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_11), (intptr_t)0, NoIntrinsic },
165 { "CONST_VALUE_12", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_12), (intptr_t)0, NoIntrinsic },
166 { "CONST_VALUE_13", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_13), (intptr_t)0, NoIntrinsic },
167 { "CONST_VALUE_14", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_14), (intptr_t)0, NoIntrinsic },
168 { "CONST_JAVASCRIPT", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_JAVASCRIPT), (intptr_t)0, NoIntrinsic },
169 { "classMethod", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjConstructorFunctionClassMethod), (intptr_t)0, NoIntrinsic },
170 { "classMethodWithOptional", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjConstructorFunctionClassMethodWithOptional), (intptr_t)1, NoIntrinsic },
171 { "classMethod2", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjConstructorFunctionClassMethod2), (intptr_t)1, NoIntrinsic },
172 #if ENABLE(Condition1)
173 { "overloadedMethod1", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjConstructorFunctionOverloadedMethod1), (intptr_t)1, NoIntrinsic },
175 { 0, 0, 0, 0, NoIntrinsic }
178 static const HashTable JSTestObjConstructorTable = { 36, 31, JSTestObjConstructorTableValues, 0 };
180 #if ENABLE(Condition1)
181 COMPILE_ASSERT(0 == TestObj::CONDITIONAL_CONST, TestObjEnumCONDITIONAL_CONSTIsWrongUseDoNotCheckConstants);
183 COMPILE_ASSERT(0 == TestObj::CONST_VALUE_0, TestObjEnumCONST_VALUE_0IsWrongUseDoNotCheckConstants);
184 COMPILE_ASSERT(1 == TestObj::CONST_VALUE_1, TestObjEnumCONST_VALUE_1IsWrongUseDoNotCheckConstants);
185 COMPILE_ASSERT(2 == TestObj::CONST_VALUE_2, TestObjEnumCONST_VALUE_2IsWrongUseDoNotCheckConstants);
186 COMPILE_ASSERT(4 == TestObj::CONST_VALUE_4, TestObjEnumCONST_VALUE_4IsWrongUseDoNotCheckConstants);
187 COMPILE_ASSERT(8 == TestObj::CONST_VALUE_8, TestObjEnumCONST_VALUE_8IsWrongUseDoNotCheckConstants);
188 COMPILE_ASSERT(-1 == TestObj::CONST_VALUE_9, TestObjEnumCONST_VALUE_9IsWrongUseDoNotCheckConstants);
189 COMPILE_ASSERT("my constant string" == TestObj::CONST_VALUE_10, TestObjEnumCONST_VALUE_10IsWrongUseDoNotCheckConstants);
190 COMPILE_ASSERT(0xffffffff == TestObj::CONST_VALUE_11, TestObjEnumCONST_VALUE_11IsWrongUseDoNotCheckConstants);
191 COMPILE_ASSERT(0x01 == TestObj::CONST_VALUE_12, TestObjEnumCONST_VALUE_12IsWrongUseDoNotCheckConstants);
192 COMPILE_ASSERT(0X20 == TestObj::CONST_VALUE_13, TestObjEnumCONST_VALUE_13IsWrongUseDoNotCheckConstants);
193 COMPILE_ASSERT(0x1abc == TestObj::CONST_VALUE_14, TestObjEnumCONST_VALUE_14IsWrongUseDoNotCheckConstants);
194 COMPILE_ASSERT(15 == TestObj::CONST_IMPL, TestObjEnumCONST_IMPLIsWrongUseDoNotCheckConstants);
196 const ClassInfo JSTestObjConstructor::s_info = { "TestObjectConstructor", &Base::s_info, &JSTestObjConstructorTable, 0, CREATE_METHOD_TABLE(JSTestObjConstructor) };
198 JSTestObjConstructor::JSTestObjConstructor(Structure* structure, JSDOMGlobalObject* globalObject)
199 : DOMConstructorObject(structure, globalObject)
203 void JSTestObjConstructor::finishCreation(ExecState* exec, JSDOMGlobalObject* globalObject)
205 Base::finishCreation(exec->globalData());
206 ASSERT(inherits(&s_info));
207 putDirect(exec->globalData(), exec->propertyNames().prototype, JSTestObjPrototype::self(exec, globalObject), DontDelete | ReadOnly);
208 putDirect(exec->globalData(), exec->propertyNames().length, jsNumber(1), ReadOnly | DontDelete | DontEnum);
211 bool JSTestObjConstructor::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
213 return getStaticPropertySlot<JSTestObjConstructor, JSDOMWrapper>(exec, &JSTestObjConstructorTable, jsCast<JSTestObjConstructor*>(cell), propertyName, slot);
216 bool JSTestObjConstructor::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
218 return getStaticPropertyDescriptor<JSTestObjConstructor, JSDOMWrapper>(exec, &JSTestObjConstructorTable, jsCast<JSTestObjConstructor*>(object), propertyName, descriptor);
221 EncodedJSValue JSC_HOST_CALL JSTestObjConstructor::constructJSTestObj(ExecState* exec)
223 JSTestObjConstructor* castedThis = jsCast<JSTestObjConstructor*>(exec->callee());
224 if (exec->argumentCount() < 1)
225 return throwVMError(exec, createTypeError(exec, "Not enough arguments"));
226 if (exec->argumentCount() <= 0 || !exec->argument(0).isFunction()) {
227 setDOMException(exec, TYPE_MISMATCH_ERR);
228 return JSValue::encode(jsUndefined());
230 RefPtr<TestCallback> testCallback = JSTestCallback::create(asObject(exec->argument(0)), castedThis->globalObject());
231 RefPtr<TestObj> object = TestObj::create(testCallback);
232 return JSValue::encode(asObject(toJS(exec, castedThis->globalObject(), object.get())));
235 ConstructType JSTestObjConstructor::getConstructData(JSCell*, ConstructData& constructData)
237 constructData.native.function = constructJSTestObj;
238 return ConstructTypeHost;
241 /* Hash table for prototype */
243 static const HashTableValue JSTestObjPrototypeTableValues[] =
245 #if ENABLE(Condition1)
246 { "CONDITIONAL_CONST", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONDITIONAL_CONST), (intptr_t)0, NoIntrinsic },
248 { "CONST_VALUE_0", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_0), (intptr_t)0, NoIntrinsic },
249 { "CONST_VALUE_1", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_1), (intptr_t)0, NoIntrinsic },
250 { "CONST_VALUE_2", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_2), (intptr_t)0, NoIntrinsic },
251 { "CONST_VALUE_4", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_4), (intptr_t)0, NoIntrinsic },
252 { "CONST_VALUE_8", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_8), (intptr_t)0, NoIntrinsic },
253 { "CONST_VALUE_9", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_9), (intptr_t)0, NoIntrinsic },
254 { "CONST_VALUE_10", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_10), (intptr_t)0, NoIntrinsic },
255 { "CONST_VALUE_11", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_11), (intptr_t)0, NoIntrinsic },
256 { "CONST_VALUE_12", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_12), (intptr_t)0, NoIntrinsic },
257 { "CONST_VALUE_13", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_13), (intptr_t)0, NoIntrinsic },
258 { "CONST_VALUE_14", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_14), (intptr_t)0, NoIntrinsic },
259 { "CONST_JAVASCRIPT", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_JAVASCRIPT), (intptr_t)0, NoIntrinsic },
260 { "voidMethod", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionVoidMethod), (intptr_t)0, NoIntrinsic },
261 { "voidMethodWithArgs", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionVoidMethodWithArgs), (intptr_t)3, NoIntrinsic },
262 { "intMethod", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionIntMethod), (intptr_t)0, NoIntrinsic },
263 { "intMethodWithArgs", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionIntMethodWithArgs), (intptr_t)3, NoIntrinsic },
264 { "objMethod", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionObjMethod), (intptr_t)0, NoIntrinsic },
265 { "objMethodWithArgs", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionObjMethodWithArgs), (intptr_t)3, NoIntrinsic },
266 { "methodWithSequenceArg", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithSequenceArg), (intptr_t)1, NoIntrinsic },
267 { "methodReturningSequence", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodReturningSequence), (intptr_t)1, NoIntrinsic },
268 { "methodThatRequiresAllArgsAndThrows", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows), (intptr_t)2, NoIntrinsic },
269 { "serializedValue", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionSerializedValue), (intptr_t)1, NoIntrinsic },
270 { "idbKey", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionIdbKey), (intptr_t)1, NoIntrinsic },
271 { "optionsObject", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionOptionsObject), (intptr_t)2, NoIntrinsic },
272 { "methodWithException", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithException), (intptr_t)0, NoIntrinsic },
273 { "customMethod", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionCustomMethod), (intptr_t)0, NoIntrinsic },
274 { "customMethodWithArgs", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionCustomMethodWithArgs), (intptr_t)3, NoIntrinsic },
275 { "addEventListener", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionAddEventListener), (intptr_t)3, NoIntrinsic },
276 { "removeEventListener", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionRemoveEventListener), (intptr_t)3, NoIntrinsic },
277 { "withScriptStateVoid", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionWithScriptStateVoid), (intptr_t)0, NoIntrinsic },
278 { "withScriptStateObj", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionWithScriptStateObj), (intptr_t)0, NoIntrinsic },
279 { "withScriptStateVoidException", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionWithScriptStateVoidException), (intptr_t)0, NoIntrinsic },
280 { "withScriptStateObjException", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionWithScriptStateObjException), (intptr_t)0, NoIntrinsic },
281 { "withScriptExecutionContext", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionWithScriptExecutionContext), (intptr_t)0, NoIntrinsic },
282 { "withScriptExecutionContextAndScriptState", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptState), (intptr_t)0, NoIntrinsic },
283 { "withScriptExecutionContextAndScriptStateObjException", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateObjException), (intptr_t)0, NoIntrinsic },
284 { "withScriptExecutionContextAndScriptStateWithSpaces", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateWithSpaces), (intptr_t)0, NoIntrinsic },
285 { "withScriptArgumentsAndCallStack", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionWithScriptArgumentsAndCallStack), (intptr_t)0, NoIntrinsic },
286 { "methodWithOptionalArg", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalArg), (intptr_t)1, NoIntrinsic },
287 { "methodWithNonOptionalArgAndOptionalArg", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg), (intptr_t)2, NoIntrinsic },
288 { "methodWithNonOptionalArgAndTwoOptionalArgs", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs), (intptr_t)3, NoIntrinsic },
289 { "methodWithOptionalString", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalString), (intptr_t)1, NoIntrinsic },
290 { "methodWithOptionalStringIsUndefined", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalStringIsUndefined), (intptr_t)1, NoIntrinsic },
291 { "methodWithOptionalStringIsNullString", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalStringIsNullString), (intptr_t)1, NoIntrinsic },
292 { "methodWithCallbackArg", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithCallbackArg), (intptr_t)1, NoIntrinsic },
293 { "methodWithNonCallbackArgAndCallbackArg", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg), (intptr_t)2, NoIntrinsic },
294 { "methodWithCallbackAndOptionalArg", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArg), (intptr_t)1, NoIntrinsic },
295 #if ENABLE(Condition1)
296 { "conditionalMethod1", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionConditionalMethod1), (intptr_t)0, NoIntrinsic },
298 #if ENABLE(Condition1) && ENABLE(Condition2)
299 { "conditionalMethod2", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionConditionalMethod2), (intptr_t)0, NoIntrinsic },
301 #if ENABLE(Condition1) || ENABLE(Condition2)
302 { "conditionalMethod3", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionConditionalMethod3), (intptr_t)0, NoIntrinsic },
304 { "overloadedMethod", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionOverloadedMethod), (intptr_t)2, NoIntrinsic },
305 { "methodWithUnsignedLongArray", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithUnsignedLongArray), (intptr_t)1, NoIntrinsic },
306 { "getSVGDocument", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionGetSVGDocument), (intptr_t)0, NoIntrinsic },
307 { "convert1", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionConvert1), (intptr_t)1, NoIntrinsic },
308 { "convert2", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionConvert2), (intptr_t)1, NoIntrinsic },
309 { "convert3", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionConvert3), (intptr_t)1, NoIntrinsic },
310 { "convert4", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionConvert4), (intptr_t)1, NoIntrinsic },
311 { "convert5", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionConvert5), (intptr_t)1, NoIntrinsic },
312 { "mutablePointFunction", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMutablePointFunction), (intptr_t)0, NoIntrinsic },
313 { "immutablePointFunction", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionImmutablePointFunction), (intptr_t)0, NoIntrinsic },
314 { "orange", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionOrange), (intptr_t)0, NoIntrinsic },
315 { "strictFunction", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionStrictFunction), (intptr_t)3, NoIntrinsic },
316 { 0, 0, 0, 0, NoIntrinsic }
319 static const HashTable JSTestObjPrototypeTable = { 266, 255, JSTestObjPrototypeTableValues, 0 };
320 const ClassInfo JSTestObjPrototype::s_info = { "TestObjectPrototype", &Base::s_info, &JSTestObjPrototypeTable, 0, CREATE_METHOD_TABLE(JSTestObjPrototype) };
322 JSObject* JSTestObjPrototype::self(ExecState* exec, JSGlobalObject* globalObject)
324 return getDOMPrototype<JSTestObj>(exec, globalObject);
327 bool JSTestObjPrototype::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
329 JSTestObjPrototype* thisObject = jsCast<JSTestObjPrototype*>(cell);
330 return getStaticPropertySlot<JSTestObjPrototype, JSObject>(exec, &JSTestObjPrototypeTable, thisObject, propertyName, slot);
333 bool JSTestObjPrototype::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
335 JSTestObjPrototype* thisObject = jsCast<JSTestObjPrototype*>(object);
336 return getStaticPropertyDescriptor<JSTestObjPrototype, JSObject>(exec, &JSTestObjPrototypeTable, thisObject, propertyName, descriptor);
339 const ClassInfo JSTestObj::s_info = { "TestObject", &Base::s_info, &JSTestObjTable, 0 , CREATE_METHOD_TABLE(JSTestObj) };
341 JSTestObj::JSTestObj(Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<TestObj> impl)
342 : JSDOMWrapper(structure, globalObject)
343 , m_impl(impl.leakRef())
347 void JSTestObj::finishCreation(JSGlobalData& globalData)
349 Base::finishCreation(globalData);
350 ASSERT(inherits(&s_info));
353 JSObject* JSTestObj::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
355 return JSTestObjPrototype::create(exec->globalData(), globalObject, JSTestObjPrototype::createStructure(globalObject->globalData(), globalObject, globalObject->objectPrototype()));
358 void JSTestObj::destroy(JSC::JSCell* cell)
360 JSTestObj* thisObject = jsCast<JSTestObj*>(cell);
361 thisObject->JSTestObj::~JSTestObj();
364 JSTestObj::~JSTestObj()
366 releaseImplIfNotNull();
369 bool JSTestObj::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
371 JSTestObj* thisObject = jsCast<JSTestObj*>(cell);
372 ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
373 return getStaticValueSlot<JSTestObj, Base>(exec, &JSTestObjTable, thisObject, propertyName, slot);
376 bool JSTestObj::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
378 JSTestObj* thisObject = jsCast<JSTestObj*>(object);
379 ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
380 return getStaticValueDescriptor<JSTestObj, Base>(exec, &JSTestObjTable, thisObject, propertyName, descriptor);
383 JSValue jsTestObjReadOnlyIntAttr(ExecState* exec, JSValue slotBase, const Identifier&)
385 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
387 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
388 JSValue result = jsNumber(impl->readOnlyIntAttr());
393 JSValue jsTestObjReadOnlyStringAttr(ExecState* exec, JSValue slotBase, const Identifier&)
395 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
397 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
398 JSValue result = jsString(exec, impl->readOnlyStringAttr());
403 JSValue jsTestObjReadOnlyTestObjAttr(ExecState* exec, JSValue slotBase, const Identifier&)
405 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
407 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
408 JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl->readOnlyTestObjAttr()));
413 JSValue jsTestObjShortAttr(ExecState* exec, JSValue slotBase, const Identifier&)
415 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
417 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
418 JSValue result = jsNumber(impl->shortAttr());
423 JSValue jsTestObjUnsignedShortAttr(ExecState* exec, JSValue slotBase, const Identifier&)
425 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
427 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
428 JSValue result = jsNumber(impl->unsignedShortAttr());
433 JSValue jsTestObjIntAttr(ExecState* exec, JSValue slotBase, const Identifier&)
435 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
437 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
438 JSValue result = jsNumber(impl->intAttr());
443 JSValue jsTestObjLongLongAttr(ExecState* exec, JSValue slotBase, const Identifier&)
445 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
447 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
448 JSValue result = jsNumber(impl->longLongAttr());
453 JSValue jsTestObjUnsignedLongLongAttr(ExecState* exec, JSValue slotBase, const Identifier&)
455 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
457 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
458 JSValue result = jsNumber(impl->unsignedLongLongAttr());
463 JSValue jsTestObjStringAttr(ExecState* exec, JSValue slotBase, const Identifier&)
465 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
467 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
468 JSValue result = jsString(exec, impl->stringAttr());
473 JSValue jsTestObjTestObjAttr(ExecState* exec, JSValue slotBase, const Identifier&)
475 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
477 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
478 JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl->testObjAttr()));
483 JSValue jsTestObjSequenceAttr(ExecState* exec, JSValue slotBase, const Identifier&)
485 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
487 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
488 JSValue result = jsArray(exec, castedThis->globalObject(), impl->sequenceAttr());
493 JSValue jsTestObjXMLObjAttr(ExecState* exec, JSValue slotBase, const Identifier&)
495 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
497 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
498 JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl->xmlObjAttr()));
503 JSValue jsTestObjCreate(ExecState* exec, JSValue slotBase, const Identifier&)
505 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
507 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
508 JSValue result = jsBoolean(impl->isCreate());
513 JSValue jsTestObjReflectedStringAttr(ExecState* exec, JSValue slotBase, const Identifier&)
515 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
517 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
518 JSValue result = jsString(exec, impl->getAttribute(WebCore::HTMLNames::reflectedstringattrAttr));
523 JSValue jsTestObjReflectedIntegralAttr(ExecState* exec, JSValue slotBase, const Identifier&)
525 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
527 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
528 JSValue result = jsNumber(impl->getIntegralAttribute(WebCore::HTMLNames::reflectedintegralattrAttr));
533 JSValue jsTestObjReflectedUnsignedIntegralAttr(ExecState* exec, JSValue slotBase, const Identifier&)
535 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
537 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
538 JSValue result = jsNumber(std::max(0, impl->getIntegralAttribute(WebCore::HTMLNames::reflectedunsignedintegralattrAttr)));
543 JSValue jsTestObjReflectedBooleanAttr(ExecState* exec, JSValue slotBase, const Identifier&)
545 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
547 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
548 JSValue result = jsBoolean(impl->hasAttribute(WebCore::HTMLNames::reflectedbooleanattrAttr));
553 JSValue jsTestObjReflectedURLAttr(ExecState* exec, JSValue slotBase, const Identifier&)
555 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
557 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
558 JSValue result = jsString(exec, impl->getURLAttribute(WebCore::HTMLNames::reflectedurlattrAttr));
563 JSValue jsTestObjReflectedStringAttr(ExecState* exec, JSValue slotBase, const Identifier&)
565 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
567 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
568 JSValue result = jsString(exec, impl->getAttribute(WebCore::HTMLNames::customContentStringAttrAttr));
573 JSValue jsTestObjReflectedCustomIntegralAttr(ExecState* exec, JSValue slotBase, const Identifier&)
575 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
577 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
578 JSValue result = jsNumber(impl->getIntegralAttribute(WebCore::HTMLNames::customContentIntegralAttrAttr));
583 JSValue jsTestObjReflectedCustomBooleanAttr(ExecState* exec, JSValue slotBase, const Identifier&)
585 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
587 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
588 JSValue result = jsBoolean(impl->hasAttribute(WebCore::HTMLNames::customContentBooleanAttrAttr));
593 JSValue jsTestObjReflectedCustomURLAttr(ExecState* exec, JSValue slotBase, const Identifier&)
595 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
597 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
598 JSValue result = jsString(exec, impl->getURLAttribute(WebCore::HTMLNames::customContentURLAttrAttr));
603 JSValue jsTestObjAttrWithGetterException(ExecState* exec, JSValue slotBase, const Identifier&)
605 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
606 ExceptionCode ec = 0;
607 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
608 JSC::JSValue result = jsNumber(impl->attrWithGetterException(ec));
609 setDOMException(exec, ec);
614 JSValue jsTestObjAttrWithSetterException(ExecState* exec, JSValue slotBase, const Identifier&)
616 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
618 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
619 JSValue result = jsNumber(impl->attrWithSetterException());
624 JSValue jsTestObjStringAttrWithGetterException(ExecState* exec, JSValue slotBase, const Identifier&)
626 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
627 ExceptionCode ec = 0;
628 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
629 JSC::JSValue result = jsString(exec, impl->stringAttrWithGetterException(ec));
630 setDOMException(exec, ec);
635 JSValue jsTestObjStringAttrWithSetterException(ExecState* exec, JSValue slotBase, const Identifier&)
637 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
639 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
640 JSValue result = jsString(exec, impl->stringAttrWithSetterException());
645 JSValue jsTestObjCustomAttr(ExecState* exec, JSValue slotBase, const Identifier&)
647 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
648 return castedThis->customAttr(exec);
652 JSValue jsTestObjWithScriptStateAttribute(ExecState* exec, JSValue slotBase, const Identifier&)
654 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
655 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
656 JSValue result = jsNumber(impl->withScriptStateAttribute(exec));
661 JSValue jsTestObjWithScriptExecutionContextAttribute(ExecState* exec, JSValue slotBase, const Identifier&)
663 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
664 ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
666 return jsUndefined();
667 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
668 JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl->withScriptExecutionContextAttribute(scriptContext)));
673 JSValue jsTestObjWithScriptStateAttributeRaises(ExecState* exec, JSValue slotBase, const Identifier&)
675 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
676 ExceptionCode ec = 0;
677 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
678 JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl->withScriptStateAttributeRaises(exec, ec)));
679 setDOMException(exec, ec);
684 JSValue jsTestObjWithScriptExecutionContextAttributeRaises(ExecState* exec, JSValue slotBase, const Identifier&)
686 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
687 ExceptionCode ec = 0;
688 ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
690 return jsUndefined();
691 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
692 JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl->withScriptExecutionContextAttributeRaises(scriptContext, ec)));
693 setDOMException(exec, ec);
698 JSValue jsTestObjWithScriptExecutionContextAndScriptStateAttribute(ExecState* exec, JSValue slotBase, const Identifier&)
700 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
701 ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
703 return jsUndefined();
704 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
705 JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl->withScriptExecutionContextAndScriptStateAttribute(exec, scriptContext)));
710 JSValue jsTestObjWithScriptExecutionContextAndScriptStateAttributeRaises(ExecState* exec, JSValue slotBase, const Identifier&)
712 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
713 ExceptionCode ec = 0;
714 ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
716 return jsUndefined();
717 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
718 JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl->withScriptExecutionContextAndScriptStateAttributeRaises(exec, scriptContext, ec)));
719 setDOMException(exec, ec);
724 JSValue jsTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute(ExecState* exec, JSValue slotBase, const Identifier&)
726 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
727 ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
729 return jsUndefined();
730 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
731 JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl->withScriptExecutionContextAndScriptStateWithSpacesAttribute(exec, scriptContext)));
736 JSValue jsTestObjWithScriptArgumentsAndCallStackAttribute(ExecState* exec, JSValue slotBase, const Identifier&)
738 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
739 RefPtr<ScriptCallStack> callStack(createScriptCallStackForInspector(exec));
740 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
741 JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl->withScriptArgumentsAndCallStackAttribute(callStack)));
746 #if ENABLE(Condition1)
747 JSValue jsTestObjConditionalAttr1(ExecState* exec, JSValue slotBase, const Identifier&)
749 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
751 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
752 JSValue result = jsNumber(impl->conditionalAttr1());
758 #if ENABLE(Condition1) && ENABLE(Condition2)
759 JSValue jsTestObjConditionalAttr2(ExecState* exec, JSValue slotBase, const Identifier&)
761 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
763 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
764 JSValue result = jsNumber(impl->conditionalAttr2());
770 #if ENABLE(Condition1) || ENABLE(Condition2)
771 JSValue jsTestObjConditionalAttr3(ExecState* exec, JSValue slotBase, const Identifier&)
773 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
775 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
776 JSValue result = jsNumber(impl->conditionalAttr3());
782 #if ENABLE(Condition1)
783 JSValue jsTestObjConditionalAttr4Constructor(ExecState* exec, JSValue slotBase, const Identifier&)
785 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
786 return JSTestObjectA::getConstructor(exec, castedThis);
791 #if ENABLE(Condition1) && ENABLE(Condition2)
792 JSValue jsTestObjConditionalAttr5Constructor(ExecState* exec, JSValue slotBase, const Identifier&)
794 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
795 return JSTestObjectB::getConstructor(exec, castedThis);
800 #if ENABLE(Condition1) || ENABLE(Condition2)
801 JSValue jsTestObjConditionalAttr6Constructor(ExecState* exec, JSValue slotBase, const Identifier&)
803 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
804 return JSTestObjectC::getConstructor(exec, castedThis);
809 JSValue jsTestObjCachedAttribute1(ExecState* exec, JSValue slotBase, const Identifier&)
811 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
813 if (JSValue cachedValue = castedThis->m_cachedAttribute1.get())
815 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
816 JSValue result = impl->cachedAttribute1() ? impl->cachedAttribute1()->deserialize(exec, castedThis->globalObject(), 0) : jsNull();
817 castedThis->m_cachedAttribute1.set(exec->globalData(), castedThis, result);
822 JSValue jsTestObjCachedAttribute2(ExecState* exec, JSValue slotBase, const Identifier&)
824 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
826 if (JSValue cachedValue = castedThis->m_cachedAttribute2.get())
828 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
829 JSValue result = impl->cachedAttribute2() ? impl->cachedAttribute2()->deserialize(exec, castedThis->globalObject(), 0) : jsNull();
830 castedThis->m_cachedAttribute2.set(exec->globalData(), castedThis, result);
835 JSValue jsTestObjContentDocument(ExecState* exec, JSValue slotBase, const Identifier&)
837 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
838 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
839 return shouldAllowAccessToNode(exec, impl->contentDocument()) ? toJS(exec, castedThis->globalObject(), WTF::getPtr(impl->contentDocument())) : jsNull();
843 JSValue jsTestObjMutablePoint(ExecState* exec, JSValue slotBase, const Identifier&)
845 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
847 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
848 JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(SVGStaticPropertyTearOff<TestObj, FloatPoint>::create(impl, impl->mutablePoint(), &TestObj::updateMutablePoint)));
853 JSValue jsTestObjImmutablePoint(ExecState* exec, JSValue slotBase, const Identifier&)
855 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
857 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
858 JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(SVGPropertyTearOff<FloatPoint>::create(impl->immutablePoint())));
863 JSValue jsTestObjStrawberry(ExecState* exec, JSValue slotBase, const Identifier&)
865 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
867 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
868 JSValue result = jsNumber(impl->blueberry());
873 JSValue jsTestObjStrictFloat(ExecState* exec, JSValue slotBase, const Identifier&)
875 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
877 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
878 JSValue result = jsNumber(impl->strictFloat());
883 JSValue jsTestObjDescription(ExecState* exec, JSValue slotBase, const Identifier&)
885 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
887 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
888 JSValue result = jsNumber(impl->description());
893 JSValue jsTestObjId(ExecState* exec, JSValue slotBase, const Identifier&)
895 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
897 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
898 JSValue result = jsNumber(impl->id());
903 JSValue jsTestObjHash(ExecState* exec, JSValue slotBase, const Identifier&)
905 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
907 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
908 JSValue result = jsString(exec, impl->hash());
913 JSValue jsTestObjConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
915 JSTestObj* domObject = jsCast<JSTestObj*>(asObject(slotBase));
916 return JSTestObj::getConstructor(exec, domObject->globalObject());
919 void JSTestObj::put(JSCell* cell, ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot)
921 JSTestObj* thisObject = jsCast<JSTestObj*>(cell);
922 ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
923 lookupPut<JSTestObj, Base>(exec, propertyName, value, &JSTestObjTable, thisObject, slot);
926 void setJSTestObjShortAttr(ExecState* exec, JSObject* thisObject, JSValue value)
928 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
929 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
930 impl->setShortAttr(value.toInt32(exec));
934 void setJSTestObjUnsignedShortAttr(ExecState* exec, JSObject* thisObject, JSValue value)
936 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
937 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
938 impl->setUnsignedShortAttr(value.toUInt32(exec));
942 void setJSTestObjIntAttr(ExecState* exec, JSObject* thisObject, JSValue value)
944 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
945 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
946 impl->setIntAttr(value.toInt32(exec));
950 void setJSTestObjLongLongAttr(ExecState* exec, JSObject* thisObject, JSValue value)
952 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
953 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
954 impl->setLongLongAttr(static_cast<long long>(value.toInteger(exec)));
958 void setJSTestObjUnsignedLongLongAttr(ExecState* exec, JSObject* thisObject, JSValue value)
960 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
961 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
962 impl->setUnsignedLongLongAttr(static_cast<unsigned long long>(value.toInteger(exec)));
966 void setJSTestObjStringAttr(ExecState* exec, JSObject* thisObject, JSValue value)
968 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
969 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
970 impl->setStringAttr(ustringToString(value.isEmpty() ? UString() : value.toString(exec)->value(exec)));
974 void setJSTestObjTestObjAttr(ExecState* exec, JSObject* thisObject, JSValue value)
976 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
977 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
978 impl->setTestObjAttr(toTestObj(value));
982 void setJSTestObjSequenceAttr(ExecState* exec, JSObject* thisObject, JSValue value)
984 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
985 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
986 impl->setSequenceAttr(toNativeArray<ScriptProfile>(exec, value));
990 void setJSTestObjXMLObjAttr(ExecState* exec, JSObject* thisObject, JSValue value)
992 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
993 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
994 impl->setXMLObjAttr(toTestObj(value));
998 void setJSTestObjCreate(ExecState* exec, JSObject* thisObject, JSValue value)
1000 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
1001 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1002 impl->setCreate(value.toBoolean(exec));
1006 void setJSTestObjReflectedStringAttr(ExecState* exec, JSObject* thisObject, JSValue value)
1008 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
1009 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1010 impl->setAttribute(WebCore::HTMLNames::reflectedstringattrAttr, valueToStringWithNullCheck(exec, value));
1014 void setJSTestObjReflectedIntegralAttr(ExecState* exec, JSObject* thisObject, JSValue value)
1016 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
1017 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1018 impl->setIntegralAttribute(WebCore::HTMLNames::reflectedintegralattrAttr, value.toInt32(exec));
1022 void setJSTestObjReflectedUnsignedIntegralAttr(ExecState* exec, JSObject* thisObject, JSValue value)
1024 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
1025 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1026 impl->setUnsignedIntegralAttribute(WebCore::HTMLNames::reflectedunsignedintegralattrAttr, value.toUInt32(exec));
1030 void setJSTestObjReflectedBooleanAttr(ExecState* exec, JSObject* thisObject, JSValue value)
1032 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
1033 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1034 impl->setBooleanAttribute(WebCore::HTMLNames::reflectedbooleanattrAttr, value.toBoolean(exec));
1038 void setJSTestObjReflectedURLAttr(ExecState* exec, JSObject* thisObject, JSValue value)
1040 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
1041 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1042 impl->setAttribute(WebCore::HTMLNames::reflectedurlattrAttr, valueToStringWithNullCheck(exec, value));
1046 void setJSTestObjReflectedStringAttr(ExecState* exec, JSObject* thisObject, JSValue value)
1048 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
1049 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1050 impl->setAttribute(WebCore::HTMLNames::customContentStringAttrAttr, valueToStringWithNullCheck(exec, value));
1054 void setJSTestObjReflectedCustomIntegralAttr(ExecState* exec, JSObject* thisObject, JSValue value)
1056 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
1057 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1058 impl->setIntegralAttribute(WebCore::HTMLNames::customContentIntegralAttrAttr, value.toInt32(exec));
1062 void setJSTestObjReflectedCustomBooleanAttr(ExecState* exec, JSObject* thisObject, JSValue value)
1064 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
1065 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1066 impl->setBooleanAttribute(WebCore::HTMLNames::customContentBooleanAttrAttr, value.toBoolean(exec));
1070 void setJSTestObjReflectedCustomURLAttr(ExecState* exec, JSObject* thisObject, JSValue value)
1072 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
1073 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1074 impl->setAttribute(WebCore::HTMLNames::customContentURLAttrAttr, valueToStringWithNullCheck(exec, value));
1078 void setJSTestObjAttrWithGetterException(ExecState* exec, JSObject* thisObject, JSValue value)
1080 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
1081 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1082 ExceptionCode ec = 0;
1083 impl->setAttrWithGetterException(value.toInt32(exec), ec);
1084 setDOMException(exec, ec);
1088 void setJSTestObjAttrWithSetterException(ExecState* exec, JSObject* thisObject, JSValue value)
1090 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
1091 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1092 ExceptionCode ec = 0;
1093 impl->setAttrWithSetterException(value.toInt32(exec), ec);
1094 setDOMException(exec, ec);
1098 void setJSTestObjStringAttrWithGetterException(ExecState* exec, JSObject* thisObject, JSValue value)
1100 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
1101 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1102 ExceptionCode ec = 0;
1103 impl->setStringAttrWithGetterException(ustringToString(value.isEmpty() ? UString() : value.toString(exec)->value(exec)), ec);
1104 setDOMException(exec, ec);
1108 void setJSTestObjStringAttrWithSetterException(ExecState* exec, JSObject* thisObject, JSValue value)
1110 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
1111 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1112 ExceptionCode ec = 0;
1113 impl->setStringAttrWithSetterException(ustringToString(value.isEmpty() ? UString() : value.toString(exec)->value(exec)), ec);
1114 setDOMException(exec, ec);
1118 void setJSTestObjCustomAttr(ExecState* exec, JSObject* thisObject, JSValue value)
1120 jsCast<JSTestObj*>(thisObject)->setCustomAttr(exec, value);
1124 void setJSTestObjWithScriptStateAttribute(ExecState* exec, JSObject* thisObject, JSValue value)
1126 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
1127 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1128 impl->setWithScriptStateAttribute(exec, value.toInt32(exec));
1132 void setJSTestObjWithScriptExecutionContextAttribute(ExecState* exec, JSObject* thisObject, JSValue value)
1134 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
1135 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1136 ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
1139 impl->setWithScriptExecutionContextAttribute(scriptContext, toTestObj(value));
1143 void setJSTestObjWithScriptStateAttributeRaises(ExecState* exec, JSObject* thisObject, JSValue value)
1145 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
1146 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1147 ExceptionCode ec = 0;
1148 impl->setWithScriptStateAttributeRaises(exec, toTestObj(value), ec);
1149 setDOMException(exec, ec);
1153 void setJSTestObjWithScriptExecutionContextAttributeRaises(ExecState* exec, JSObject* thisObject, JSValue value)
1155 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
1156 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1157 ExceptionCode ec = 0;
1158 ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
1161 impl->setWithScriptExecutionContextAttributeRaises(scriptContext, toTestObj(value), ec);
1162 setDOMException(exec, ec);
1166 void setJSTestObjWithScriptExecutionContextAndScriptStateAttribute(ExecState* exec, JSObject* thisObject, JSValue value)
1168 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
1169 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1170 ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
1173 impl->setWithScriptExecutionContextAndScriptStateAttribute(exec, scriptContext, toTestObj(value));
1177 void setJSTestObjWithScriptExecutionContextAndScriptStateAttributeRaises(ExecState* exec, JSObject* thisObject, JSValue value)
1179 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
1180 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1181 ExceptionCode ec = 0;
1182 ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
1185 impl->setWithScriptExecutionContextAndScriptStateAttributeRaises(exec, scriptContext, toTestObj(value), ec);
1186 setDOMException(exec, ec);
1190 void setJSTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute(ExecState* exec, JSObject* thisObject, JSValue value)
1192 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
1193 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1194 ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
1197 impl->setWithScriptExecutionContextAndScriptStateWithSpacesAttribute(exec, scriptContext, toTestObj(value));
1201 void setJSTestObjWithScriptArgumentsAndCallStackAttribute(ExecState* exec, JSObject* thisObject, JSValue value)
1203 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
1204 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1205 RefPtr<ScriptCallStack> callStack(createScriptCallStackForInspector(exec));
1206 impl->setWithScriptArgumentsAndCallStackAttribute(callStack, toTestObj(value));
1210 #if ENABLE(Condition1)
1211 void setJSTestObjConditionalAttr1(ExecState* exec, JSObject* thisObject, JSValue value)
1213 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
1214 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1215 impl->setConditionalAttr1(value.toInt32(exec));
1220 #if ENABLE(Condition1) && ENABLE(Condition2)
1221 void setJSTestObjConditionalAttr2(ExecState* exec, JSObject* thisObject, JSValue value)
1223 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
1224 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1225 impl->setConditionalAttr2(value.toInt32(exec));
1230 #if ENABLE(Condition1) || ENABLE(Condition2)
1231 void setJSTestObjConditionalAttr3(ExecState* exec, JSObject* thisObject, JSValue value)
1233 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
1234 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1235 impl->setConditionalAttr3(value.toInt32(exec));
1240 #if ENABLE(Condition1)
1241 void setJSTestObjConditionalAttr4Constructor(ExecState* exec, JSObject* thisObject, JSValue value)
1243 // Shadowing a built-in constructor
1244 jsCast<JSTestObj*>(thisObject)->putDirect(exec->globalData(), Identifier(exec, "conditionalAttr4"), value);
1249 #if ENABLE(Condition1) && ENABLE(Condition2)
1250 void setJSTestObjConditionalAttr5Constructor(ExecState* exec, JSObject* thisObject, JSValue value)
1252 // Shadowing a built-in constructor
1253 jsCast<JSTestObj*>(thisObject)->putDirect(exec->globalData(), Identifier(exec, "conditionalAttr5"), value);
1258 #if ENABLE(Condition1) || ENABLE(Condition2)
1259 void setJSTestObjConditionalAttr6Constructor(ExecState* exec, JSObject* thisObject, JSValue value)
1261 // Shadowing a built-in constructor
1262 jsCast<JSTestObj*>(thisObject)->putDirect(exec->globalData(), Identifier(exec, "conditionalAttr6"), value);
1267 void setJSTestObjMutablePoint(ExecState* exec, JSObject* thisObject, JSValue value)
1269 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
1270 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1271 impl->setMutablePoint(toSVGPoint(value));
1275 void setJSTestObjImmutablePoint(ExecState* exec, JSObject* thisObject, JSValue value)
1277 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
1278 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1279 impl->setImmutablePoint(toSVGPoint(value));
1283 void setJSTestObjStrawberry(ExecState* exec, JSObject* thisObject, JSValue value)
1285 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
1286 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1287 impl->setBlueberry(toint(value));
1291 void setJSTestObjStrictFloat(ExecState* exec, JSObject* thisObject, JSValue value)
1293 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
1294 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1295 impl->setStrictFloat(value.toFloat(exec));
1299 void setJSTestObjId(ExecState* exec, JSObject* thisObject, JSValue value)
1301 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
1302 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1303 impl->setId(value.toInt32(exec));
1307 JSValue JSTestObj::getConstructor(ExecState* exec, JSGlobalObject* globalObject)
1309 return getDOMConstructor<JSTestObjConstructor>(exec, jsCast<JSDOMGlobalObject*>(globalObject));
1312 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionVoidMethod(ExecState* exec)
1314 JSValue thisValue = exec->hostThisValue();
1315 if (!thisValue.inherits(&JSTestObj::s_info))
1316 return throwVMTypeError(exec);
1317 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
1318 ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
1319 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1321 return JSValue::encode(jsUndefined());
1324 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionVoidMethodWithArgs(ExecState* exec)
1326 JSValue thisValue = exec->hostThisValue();
1327 if (!thisValue.inherits(&JSTestObj::s_info))
1328 return throwVMTypeError(exec);
1329 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
1330 ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
1331 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1332 if (exec->argumentCount() < 3)
1333 return throwVMError(exec, createTypeError(exec, "Not enough arguments"));
1334 int intArg(MAYBE_MISSING_PARAMETER(exec, 0, DefaultIsUndefined).toInt32(exec));
1335 if (exec->hadException())
1336 return JSValue::encode(jsUndefined());
1337 const String& strArg(ustringToString(MAYBE_MISSING_PARAMETER(exec, 1, DefaultIsUndefined).isEmpty() ? UString() : MAYBE_MISSING_PARAMETER(exec, 1, DefaultIsUndefined).toString(exec)->value(exec)));
1338 if (exec->hadException())
1339 return JSValue::encode(jsUndefined());
1340 TestObj* objArg(toTestObj(MAYBE_MISSING_PARAMETER(exec, 2, DefaultIsUndefined)));
1341 if (exec->hadException())
1342 return JSValue::encode(jsUndefined());
1343 impl->voidMethodWithArgs(intArg, strArg, objArg);
1344 return JSValue::encode(jsUndefined());
1347 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionIntMethod(ExecState* exec)
1349 JSValue thisValue = exec->hostThisValue();
1350 if (!thisValue.inherits(&JSTestObj::s_info))
1351 return throwVMTypeError(exec);
1352 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
1353 ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
1354 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1356 JSC::JSValue result = jsNumber(impl->intMethod());
1357 return JSValue::encode(result);
1360 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionIntMethodWithArgs(ExecState* exec)
1362 JSValue thisValue = exec->hostThisValue();
1363 if (!thisValue.inherits(&JSTestObj::s_info))
1364 return throwVMTypeError(exec);
1365 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
1366 ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
1367 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1368 if (exec->argumentCount() < 3)
1369 return throwVMError(exec, createTypeError(exec, "Not enough arguments"));
1370 int intArg(MAYBE_MISSING_PARAMETER(exec, 0, DefaultIsUndefined).toInt32(exec));
1371 if (exec->hadException())
1372 return JSValue::encode(jsUndefined());
1373 const String& strArg(ustringToString(MAYBE_MISSING_PARAMETER(exec, 1, DefaultIsUndefined).isEmpty() ? UString() : MAYBE_MISSING_PARAMETER(exec, 1, DefaultIsUndefined).toString(exec)->value(exec)));
1374 if (exec->hadException())
1375 return JSValue::encode(jsUndefined());
1376 TestObj* objArg(toTestObj(MAYBE_MISSING_PARAMETER(exec, 2, DefaultIsUndefined)));
1377 if (exec->hadException())
1378 return JSValue::encode(jsUndefined());
1380 JSC::JSValue result = jsNumber(impl->intMethodWithArgs(intArg, strArg, objArg));
1381 return JSValue::encode(result);
1384 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionObjMethod(ExecState* exec)
1386 JSValue thisValue = exec->hostThisValue();
1387 if (!thisValue.inherits(&JSTestObj::s_info))
1388 return throwVMTypeError(exec);
1389 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
1390 ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
1391 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1393 JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl->objMethod()));
1394 return JSValue::encode(result);
1397 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionObjMethodWithArgs(ExecState* exec)
1399 JSValue thisValue = exec->hostThisValue();
1400 if (!thisValue.inherits(&JSTestObj::s_info))
1401 return throwVMTypeError(exec);
1402 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
1403 ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
1404 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1405 if (exec->argumentCount() < 3)
1406 return throwVMError(exec, createTypeError(exec, "Not enough arguments"));
1407 int intArg(MAYBE_MISSING_PARAMETER(exec, 0, DefaultIsUndefined).toInt32(exec));
1408 if (exec->hadException())
1409 return JSValue::encode(jsUndefined());
1410 const String& strArg(ustringToString(MAYBE_MISSING_PARAMETER(exec, 1, DefaultIsUndefined).isEmpty() ? UString() : MAYBE_MISSING_PARAMETER(exec, 1, DefaultIsUndefined).toString(exec)->value(exec)));
1411 if (exec->hadException())
1412 return JSValue::encode(jsUndefined());
1413 TestObj* objArg(toTestObj(MAYBE_MISSING_PARAMETER(exec, 2, DefaultIsUndefined)));
1414 if (exec->hadException())
1415 return JSValue::encode(jsUndefined());
1417 JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl->objMethodWithArgs(intArg, strArg, objArg)));
1418 return JSValue::encode(result);
1421 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithSequenceArg(ExecState* exec)
1423 JSValue thisValue = exec->hostThisValue();
1424 if (!thisValue.inherits(&JSTestObj::s_info))
1425 return throwVMTypeError(exec);
1426 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
1427 ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
1428 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1429 if (exec->argumentCount() < 1)
1430 return throwVMError(exec, createTypeError(exec, "Not enough arguments"));
1431 sequence<ScriptProfile>* sequenceArg(toNativeArray<ScriptProfile>(exec, MAYBE_MISSING_PARAMETER(exec, 0, DefaultIsUndefined)));
1432 if (exec->hadException())
1433 return JSValue::encode(jsUndefined());
1434 impl->methodWithSequenceArg(sequenceArg);
1435 return JSValue::encode(jsUndefined());
1438 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodReturningSequence(ExecState* exec)
1440 JSValue thisValue = exec->hostThisValue();
1441 if (!thisValue.inherits(&JSTestObj::s_info))
1442 return throwVMTypeError(exec);
1443 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
1444 ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
1445 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1446 if (exec->argumentCount() < 1)
1447 return throwVMError(exec, createTypeError(exec, "Not enough arguments"));
1448 int intArg(MAYBE_MISSING_PARAMETER(exec, 0, DefaultIsUndefined).toInt32(exec));
1449 if (exec->hadException())
1450 return JSValue::encode(jsUndefined());
1452 JSC::JSValue result = jsArray(exec, castedThis->globalObject(), impl->methodReturningSequence(intArg));
1453 return JSValue::encode(result);
1456 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows(ExecState* exec)
1458 JSValue thisValue = exec->hostThisValue();
1459 if (!thisValue.inherits(&JSTestObj::s_info))
1460 return throwVMTypeError(exec);
1461 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
1462 ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
1463 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1464 if (exec->argumentCount() < 2)
1465 return throwVMError(exec, createTypeError(exec, "Not enough arguments"));
1466 ExceptionCode ec = 0;
1467 const String& strArg(ustringToString(MAYBE_MISSING_PARAMETER(exec, 0, DefaultIsUndefined).isEmpty() ? UString() : MAYBE_MISSING_PARAMETER(exec, 0, DefaultIsUndefined).toString(exec)->value(exec)));
1468 if (exec->hadException())
1469 return JSValue::encode(jsUndefined());
1470 TestObj* objArg(toTestObj(MAYBE_MISSING_PARAMETER(exec, 1, DefaultIsUndefined)));
1471 if (exec->hadException())
1472 return JSValue::encode(jsUndefined());
1474 JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl->methodThatRequiresAllArgsAndThrows(strArg, objArg, ec)));
1475 setDOMException(exec, ec);
1476 return JSValue::encode(result);
1479 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionSerializedValue(ExecState* exec)
1481 JSValue thisValue = exec->hostThisValue();
1482 if (!thisValue.inherits(&JSTestObj::s_info))
1483 return throwVMTypeError(exec);
1484 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
1485 ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
1486 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1487 if (exec->argumentCount() < 1)
1488 return throwVMError(exec, createTypeError(exec, "Not enough arguments"));
1489 RefPtr<SerializedScriptValue> serializedArg(SerializedScriptValue::create(exec, MAYBE_MISSING_PARAMETER(exec, 0, DefaultIsUndefined)));
1490 if (exec->hadException())
1491 return JSValue::encode(jsUndefined());
1492 impl->serializedValue(serializedArg);
1493 return JSValue::encode(jsUndefined());
1496 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionIdbKey(ExecState* exec)
1498 JSValue thisValue = exec->hostThisValue();
1499 if (!thisValue.inherits(&JSTestObj::s_info))
1500 return throwVMTypeError(exec);
1501 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
1502 ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
1503 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1504 if (exec->argumentCount() < 1)
1505 return throwVMError(exec, createTypeError(exec, "Not enough arguments"));
1506 PassRefPtr<IDBKey> key(createIDBKeyFromValue(exec, MAYBE_MISSING_PARAMETER(exec, 0, DefaultIsUndefined)));
1507 if (exec->hadException())
1508 return JSValue::encode(jsUndefined());
1510 return JSValue::encode(jsUndefined());
1513 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOptionsObject(ExecState* exec)
1515 JSValue thisValue = exec->hostThisValue();
1516 if (!thisValue.inherits(&JSTestObj::s_info))
1517 return throwVMTypeError(exec);
1518 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
1519 ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
1520 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1521 if (exec->argumentCount() < 1)
1522 return throwVMError(exec, createTypeError(exec, "Not enough arguments"));
1523 Dictionary oo(createDictionaryFromValue(exec, MAYBE_MISSING_PARAMETER(exec, 0, DefaultIsUndefined)));
1524 if (exec->hadException())
1525 return JSValue::encode(jsUndefined());
1527 size_t argsCount = exec->argumentCount();
1528 if (argsCount <= 1) {
1529 impl->optionsObject(oo);
1530 return JSValue::encode(jsUndefined());
1533 Dictionary ooo(createDictionaryFromValue(exec, MAYBE_MISSING_PARAMETER(exec, 1, DefaultIsUndefined)));
1534 if (exec->hadException())
1535 return JSValue::encode(jsUndefined());
1536 impl->optionsObject(oo, ooo);
1537 return JSValue::encode(jsUndefined());
1540 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithException(ExecState* exec)
1542 JSValue thisValue = exec->hostThisValue();
1543 if (!thisValue.inherits(&JSTestObj::s_info))
1544 return throwVMTypeError(exec);
1545 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
1546 ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
1547 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1548 ExceptionCode ec = 0;
1549 impl->methodWithException(ec);
1550 setDOMException(exec, ec);
1551 return JSValue::encode(jsUndefined());
1554 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionCustomMethod(ExecState* exec)
1556 JSValue thisValue = exec->hostThisValue();
1557 if (!thisValue.inherits(&JSTestObj::s_info))
1558 return throwVMTypeError(exec);
1559 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
1560 ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
1561 return JSValue::encode(castedThis->customMethod(exec));
1564 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionCustomMethodWithArgs(ExecState* exec)
1566 JSValue thisValue = exec->hostThisValue();
1567 if (!thisValue.inherits(&JSTestObj::s_info))
1568 return throwVMTypeError(exec);
1569 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
1570 ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
1571 return JSValue::encode(castedThis->customMethodWithArgs(exec));
1574 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionAddEventListener(ExecState* exec)
1576 JSValue thisValue = exec->hostThisValue();
1577 if (!thisValue.inherits(&JSTestObj::s_info))
1578 return throwVMTypeError(exec);
1579 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
1580 ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
1581 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1582 if (exec->argumentCount() < 2)
1583 return throwVMError(exec, createTypeError(exec, "Not enough arguments"));
1584 JSValue listener = exec->argument(1);
1585 if (!listener.isObject())
1586 return JSValue::encode(jsUndefined());
1587 impl->addEventListener(ustringToAtomicString(exec->argument(0).toString(exec)->value(exec)), JSEventListener::create(asObject(listener), castedThis, false, currentWorld(exec)), exec->argument(2).toBoolean(exec));
1588 return JSValue::encode(jsUndefined());
1591 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionRemoveEventListener(ExecState* exec)
1593 JSValue thisValue = exec->hostThisValue();
1594 if (!thisValue.inherits(&JSTestObj::s_info))
1595 return throwVMTypeError(exec);
1596 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
1597 ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
1598 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1599 if (exec->argumentCount() < 2)
1600 return throwVMError(exec, createTypeError(exec, "Not enough arguments"));
1601 JSValue listener = exec->argument(1);
1602 if (!listener.isObject())
1603 return JSValue::encode(jsUndefined());
1604 impl->removeEventListener(ustringToAtomicString(exec->argument(0).toString(exec)->value(exec)), JSEventListener::create(asObject(listener), castedThis, false, currentWorld(exec)).get(), exec->argument(2).toBoolean(exec));
1605 return JSValue::encode(jsUndefined());
1608 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptStateVoid(ExecState* exec)
1610 JSValue thisValue = exec->hostThisValue();
1611 if (!thisValue.inherits(&JSTestObj::s_info))
1612 return throwVMTypeError(exec);
1613 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
1614 ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
1615 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1616 impl->withScriptStateVoid(exec);
1617 return JSValue::encode(jsUndefined());
1620 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptStateObj(ExecState* exec)
1622 JSValue thisValue = exec->hostThisValue();
1623 if (!thisValue.inherits(&JSTestObj::s_info))
1624 return throwVMTypeError(exec);
1625 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
1626 ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
1627 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1629 JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl->withScriptStateObj(exec)));
1630 if (exec->hadException())
1631 return JSValue::encode(jsUndefined());
1632 return JSValue::encode(result);
1635 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptStateVoidException(ExecState* exec)
1637 JSValue thisValue = exec->hostThisValue();
1638 if (!thisValue.inherits(&JSTestObj::s_info))
1639 return throwVMTypeError(exec);
1640 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
1641 ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
1642 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1643 ExceptionCode ec = 0;
1644 impl->withScriptStateVoidException(exec, ec);
1645 setDOMException(exec, ec);
1646 return JSValue::encode(jsUndefined());
1649 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptStateObjException(ExecState* exec)
1651 JSValue thisValue = exec->hostThisValue();
1652 if (!thisValue.inherits(&JSTestObj::s_info))
1653 return throwVMTypeError(exec);
1654 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
1655 ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
1656 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1657 ExceptionCode ec = 0;
1659 JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl->withScriptStateObjException(exec, ec)));
1660 setDOMException(exec, ec);
1661 if (exec->hadException())
1662 return JSValue::encode(jsUndefined());
1663 return JSValue::encode(result);
1666 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptExecutionContext(ExecState* exec)
1668 JSValue thisValue = exec->hostThisValue();
1669 if (!thisValue.inherits(&JSTestObj::s_info))
1670 return throwVMTypeError(exec);
1671 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
1672 ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
1673 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1674 ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
1676 return JSValue::encode(jsUndefined());
1677 impl->withScriptExecutionContext(scriptContext);
1678 return JSValue::encode(jsUndefined());
1681 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptState(ExecState* exec)
1683 JSValue thisValue = exec->hostThisValue();
1684 if (!thisValue.inherits(&JSTestObj::s_info))
1685 return throwVMTypeError(exec);
1686 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
1687 ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
1688 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1689 ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
1691 return JSValue::encode(jsUndefined());
1692 impl->withScriptExecutionContextAndScriptState(exec, scriptContext);
1693 return JSValue::encode(jsUndefined());
1696 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateObjException(ExecState* exec)
1698 JSValue thisValue = exec->hostThisValue();
1699 if (!thisValue.inherits(&JSTestObj::s_info))
1700 return throwVMTypeError(exec);
1701 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
1702 ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
1703 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1704 ExceptionCode ec = 0;
1705 ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
1707 return JSValue::encode(jsUndefined());
1709 JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl->withScriptExecutionContextAndScriptStateObjException(exec, scriptContext, ec)));
1710 setDOMException(exec, ec);
1711 if (exec->hadException())
1712 return JSValue::encode(jsUndefined());
1713 return JSValue::encode(result);
1716 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateWithSpaces(ExecState* exec)
1718 JSValue thisValue = exec->hostThisValue();
1719 if (!thisValue.inherits(&JSTestObj::s_info))
1720 return throwVMTypeError(exec);
1721 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
1722 ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
1723 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1724 ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
1726 return JSValue::encode(jsUndefined());
1728 JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl->withScriptExecutionContextAndScriptStateWithSpaces(exec, scriptContext)));
1729 if (exec->hadException())
1730 return JSValue::encode(jsUndefined());
1731 return JSValue::encode(result);
1734 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptArgumentsAndCallStack(ExecState* exec)
1736 JSValue thisValue = exec->hostThisValue();
1737 if (!thisValue.inherits(&JSTestObj::s_info))
1738 return throwVMTypeError(exec);
1739 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
1740 ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
1741 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1742 RefPtr<ScriptArguments> scriptArguments(createScriptArguments(exec, 0));
1743 RefPtr<ScriptCallStack> callStack(createScriptCallStackForInspector(exec));
1744 impl->withScriptArgumentsAndCallStack(scriptArguments, callStack);
1745 return JSValue::encode(jsUndefined());
1748 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalArg(ExecState* exec)
1750 JSValue thisValue = exec->hostThisValue();
1751 if (!thisValue.inherits(&JSTestObj::s_info))
1752 return throwVMTypeError(exec);
1753 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
1754 ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
1755 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1757 size_t argsCount = exec->argumentCount();
1758 if (argsCount <= 0) {
1759 impl->methodWithOptionalArg();
1760 return JSValue::encode(jsUndefined());
1763 int opt(MAYBE_MISSING_PARAMETER(exec, 0, DefaultIsUndefined).toInt32(exec));
1764 if (exec->hadException())
1765 return JSValue::encode(jsUndefined());
1766 impl->methodWithOptionalArg(opt);
1767 return JSValue::encode(jsUndefined());
1770 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg(ExecState* exec)
1772 JSValue thisValue = exec->hostThisValue();
1773 if (!thisValue.inherits(&JSTestObj::s_info))
1774 return throwVMTypeError(exec);
1775 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
1776 ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
1777 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1778 if (exec->argumentCount() < 1)
1779 return throwVMError(exec, createTypeError(exec, "Not enough arguments"));
1780 int nonOpt(MAYBE_MISSING_PARAMETER(exec, 0, DefaultIsUndefined).toInt32(exec));
1781 if (exec->hadException())
1782 return JSValue::encode(jsUndefined());
1784 size_t argsCount = exec->argumentCount();
1785 if (argsCount <= 1) {
1786 impl->methodWithNonOptionalArgAndOptionalArg(nonOpt);
1787 return JSValue::encode(jsUndefined());
1790 int opt(MAYBE_MISSING_PARAMETER(exec, 1, DefaultIsUndefined).toInt32(exec));
1791 if (exec->hadException())
1792 return JSValue::encode(jsUndefined());
1793 impl->methodWithNonOptionalArgAndOptionalArg(nonOpt, opt);
1794 return JSValue::encode(jsUndefined());
1797 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs(ExecState* exec)
1799 JSValue thisValue = exec->hostThisValue();
1800 if (!thisValue.inherits(&JSTestObj::s_info))
1801 return throwVMTypeError(exec);
1802 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
1803 ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
1804 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1805 if (exec->argumentCount() < 1)
1806 return throwVMError(exec, createTypeError(exec, "Not enough arguments"));
1807 int nonOpt(MAYBE_MISSING_PARAMETER(exec, 0, DefaultIsUndefined).toInt32(exec));
1808 if (exec->hadException())
1809 return JSValue::encode(jsUndefined());
1811 size_t argsCount = exec->argumentCount();
1812 if (argsCount <= 1) {
1813 impl->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt);
1814 return JSValue::encode(jsUndefined());
1817 int opt1(MAYBE_MISSING_PARAMETER(exec, 1, DefaultIsUndefined).toInt32(exec));
1818 if (exec->hadException())
1819 return JSValue::encode(jsUndefined());
1820 if (argsCount <= 2) {
1821 impl->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt, opt1);
1822 return JSValue::encode(jsUndefined());
1825 int opt2(MAYBE_MISSING_PARAMETER(exec, 2, DefaultIsUndefined).toInt32(exec));
1826 if (exec->hadException())
1827 return JSValue::encode(jsUndefined());
1828 impl->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt, opt1, opt2);
1829 return JSValue::encode(jsUndefined());
1832 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalString(ExecState* exec)
1834 JSValue thisValue = exec->hostThisValue();
1835 if (!thisValue.inherits(&JSTestObj::s_info))
1836 return throwVMTypeError(exec);
1837 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
1838 ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
1839 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1841 size_t argsCount = exec->argumentCount();
1842 if (argsCount <= 0) {
1843 impl->methodWithOptionalString();
1844 return JSValue::encode(jsUndefined());
1847 const String& str(ustringToString(MAYBE_MISSING_PARAMETER(exec, 0, DefaultIsUndefined).isEmpty() ? UString() : MAYBE_MISSING_PARAMETER(exec, 0, DefaultIsUndefined).toString(exec)->value(exec)));
1848 if (exec->hadException())
1849 return JSValue::encode(jsUndefined());
1850 impl->methodWithOptionalString(str);
1851 return JSValue::encode(jsUndefined());
1854 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalStringIsUndefined(ExecState* exec)
1856 JSValue thisValue = exec->hostThisValue();
1857 if (!thisValue.inherits(&JSTestObj::s_info))
1858 return throwVMTypeError(exec);
1859 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
1860 ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
1861 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1862 const String& str(ustringToString(MAYBE_MISSING_PARAMETER(exec, 0, DefaultIsUndefined).isEmpty() ? UString() : MAYBE_MISSING_PARAMETER(exec, 0, DefaultIsUndefined).toString(exec)->value(exec)));
1863 if (exec->hadException())
1864 return JSValue::encode(jsUndefined());
1865 impl->methodWithOptionalStringIsUndefined(str);
1866 return JSValue::encode(jsUndefined());
1869 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalStringIsNullString(ExecState* exec)
1871 JSValue thisValue = exec->hostThisValue();
1872 if (!thisValue.inherits(&JSTestObj::s_info))
1873 return throwVMTypeError(exec);
1874 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
1875 ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
1876 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1877 const String& str(ustringToString(MAYBE_MISSING_PARAMETER(exec, 0, DefaultIsNullString).isEmpty() ? UString() : MAYBE_MISSING_PARAMETER(exec, 0, DefaultIsNullString).toString(exec)->value(exec)));
1878 if (exec->hadException())
1879 return JSValue::encode(jsUndefined());
1880 impl->methodWithOptionalStringIsNullString(str);
1881 return JSValue::encode(jsUndefined());
1884 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithCallbackArg(ExecState* exec)
1886 JSValue thisValue = exec->hostThisValue();
1887 if (!thisValue.inherits(&JSTestObj::s_info))
1888 return throwVMTypeError(exec);
1889 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
1890 ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
1891 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1892 if (exec->argumentCount() < 1)
1893 return throwVMError(exec, createTypeError(exec, "Not enough arguments"));
1894 if (exec->argumentCount() <= 0 || !exec->argument(0).isFunction()) {
1895 setDOMException(exec, TYPE_MISMATCH_ERR);
1896 return JSValue::encode(jsUndefined());
1898 RefPtr<TestCallback> callback = JSTestCallback::create(asObject(exec->argument(0)), castedThis->globalObject());
1899 impl->methodWithCallbackArg(callback);
1900 return JSValue::encode(jsUndefined());
1903 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg(ExecState* exec)
1905 JSValue thisValue = exec->hostThisValue();
1906 if (!thisValue.inherits(&JSTestObj::s_info))
1907 return throwVMTypeError(exec);
1908 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
1909 ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
1910 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1911 if (exec->argumentCount() < 2)
1912 return throwVMError(exec, createTypeError(exec, "Not enough arguments"));
1913 int nonCallback(MAYBE_MISSING_PARAMETER(exec, 0, DefaultIsUndefined).toInt32(exec));
1914 if (exec->hadException())
1915 return JSValue::encode(jsUndefined());
1916 if (exec->argumentCount() <= 1 || !exec->argument(1).isFunction()) {
1917 setDOMException(exec, TYPE_MISMATCH_ERR);
1918 return JSValue::encode(jsUndefined());
1920 RefPtr<TestCallback> callback = JSTestCallback::create(asObject(exec->argument(1)), castedThis->globalObject());
1921 impl->methodWithNonCallbackArgAndCallbackArg(nonCallback, callback);
1922 return JSValue::encode(jsUndefined());
1925 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArg(ExecState* exec)
1927 JSValue thisValue = exec->hostThisValue();
1928 if (!thisValue.inherits(&JSTestObj::s_info))
1929 return throwVMTypeError(exec);
1930 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
1931 ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
1932 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1933 RefPtr<TestCallback> callback;
1934 if (exec->argumentCount() > 0 && !exec->argument(0).isUndefinedOrNull()) {
1935 if (!exec->argument(0).isFunction()) {
1936 setDOMException(exec, TYPE_MISMATCH_ERR);
1937 return JSValue::encode(jsUndefined());
1939 callback = JSTestCallback::create(asObject(exec->argument(0)), castedThis->globalObject());
1941 impl->methodWithCallbackAndOptionalArg(callback);
1942 return JSValue::encode(jsUndefined());
1945 #if ENABLE(Condition1)
1946 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConditionalMethod1(ExecState* exec)
1948 JSValue thisValue = exec->hostThisValue();
1949 if (!thisValue.inherits(&JSTestObj::s_info))
1950 return throwVMTypeError(exec);
1951 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
1952 ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
1953 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1955 JSC::JSValue result = jsString(exec, impl->conditionalMethod1());
1956 return JSValue::encode(result);
1961 #if ENABLE(Condition1) && ENABLE(Condition2)
1962 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConditionalMethod2(ExecState* exec)
1964 JSValue thisValue = exec->hostThisValue();
1965 if (!thisValue.inherits(&JSTestObj::s_info))
1966 return throwVMTypeError(exec);
1967 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
1968 ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
1969 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1970 impl->conditionalMethod2();
1971 return JSValue::encode(jsUndefined());
1976 #if ENABLE(Condition1) || ENABLE(Condition2)
1977 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConditionalMethod3(ExecState* exec)
1979 JSValue thisValue = exec->hostThisValue();
1980 if (!thisValue.inherits(&JSTestObj::s_info))
1981 return throwVMTypeError(exec);
1982 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
1983 ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
1984 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1985 impl->conditionalMethod3();
1986 return JSValue::encode(jsUndefined());
1991 static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod1(ExecState* exec)
1993 JSValue thisValue = exec->hostThisValue();
1994 if (!thisValue.inherits(&JSTestObj::s_info))
1995 return throwVMTypeError(exec);
1996 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
1997 ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
1998 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
1999 if (exec->argumentCount() < 2)
2000 return throwVMError(exec, createTypeError(exec, "Not enough arguments"));
2001 TestObj* objArg(toTestObj(MAYBE_MISSING_PARAMETER(exec, 0, DefaultIsUndefined)));
2002 if (exec->hadException())
2003 return JSValue::encode(jsUndefined());
2004 const String& strArg(ustringToString(MAYBE_MISSING_PARAMETER(exec, 1, DefaultIsUndefined).isEmpty() ? UString() : MAYBE_MISSING_PARAMETER(exec, 1, DefaultIsUndefined).toString(exec)->value(exec)));
2005 if (exec->hadException())
2006 return JSValue::encode(jsUndefined());
2007 impl->overloadedMethod(objArg, strArg);
2008 return JSValue::encode(jsUndefined());
2011 static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod2(ExecState* exec)
2013 JSValue thisValue = exec->hostThisValue();
2014 if (!thisValue.inherits(&JSTestObj::s_info))
2015 return throwVMTypeError(exec);
2016 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
2017 ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
2018 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
2019 if (exec->argumentCount() < 1)
2020 return throwVMError(exec, createTypeError(exec, "Not enough arguments"));
2021 TestObj* objArg(toTestObj(MAYBE_MISSING_PARAMETER(exec, 0, DefaultIsUndefined)));
2022 if (exec->hadException())
2023 return JSValue::encode(jsUndefined());
2025 size_t argsCount = exec->argumentCount();
2026 if (argsCount <= 1) {
2027 impl->overloadedMethod(objArg);
2028 return JSValue::encode(jsUndefined());
2031 int intArg(MAYBE_MISSING_PARAMETER(exec, 1, DefaultIsUndefined).toInt32(exec));
2032 if (exec->hadException())
2033 return JSValue::encode(jsUndefined());
2034 impl->overloadedMethod(objArg, intArg);
2035 return JSValue::encode(jsUndefined());
2038 static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod3(ExecState* exec)
2040 JSValue thisValue = exec->hostThisValue();
2041 if (!thisValue.inherits(&JSTestObj::s_info))
2042 return throwVMTypeError(exec);
2043 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
2044 ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
2045 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
2046 if (exec->argumentCount() < 1)
2047 return throwVMError(exec, createTypeError(exec, "Not enough arguments"));
2048 const String& strArg(ustringToString(MAYBE_MISSING_PARAMETER(exec, 0, DefaultIsUndefined).isEmpty() ? UString() : MAYBE_MISSING_PARAMETER(exec, 0, DefaultIsUndefined).toString(exec)->value(exec)));
2049 if (exec->hadException())
2050 return JSValue::encode(jsUndefined());
2051 impl->overloadedMethod(strArg);
2052 return JSValue::encode(jsUndefined());
2055 static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod4(ExecState* exec)
2057 JSValue thisValue = exec->hostThisValue();
2058 if (!thisValue.inherits(&JSTestObj::s_info))
2059 return throwVMTypeError(exec);
2060 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
2061 ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
2062 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
2063 if (exec->argumentCount() < 1)
2064 return throwVMError(exec, createTypeError(exec, "Not enough arguments"));
2065 int intArg(MAYBE_MISSING_PARAMETER(exec, 0, DefaultIsUndefined).toInt32(exec));
2066 if (exec->hadException())
2067 return JSValue::encode(jsUndefined());
2068 impl->overloadedMethod(intArg);
2069 return JSValue::encode(jsUndefined());
2072 static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod5(ExecState* exec)
2074 JSValue thisValue = exec->hostThisValue();
2075 if (!thisValue.inherits(&JSTestObj::s_info))
2076 return throwVMTypeError(exec);
2077 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
2078 ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
2079 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
2080 if (exec->argumentCount() < 1)
2081 return throwVMError(exec, createTypeError(exec, "Not enough arguments"));
2082 if (exec->argumentCount() <= 0 || !exec->argument(0).isFunction()) {
2083 setDOMException(exec, TYPE_MISMATCH_ERR);
2084 return JSValue::encode(jsUndefined());
2086 RefPtr<TestCallback> callback = JSTestCallback::create(asObject(exec->argument(0)), castedThis->globalObject());
2087 impl->overloadedMethod(callback);
2088 return JSValue::encode(jsUndefined());
2091 static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod6(ExecState* exec)
2093 JSValue thisValue = exec->hostThisValue();
2094 if (!thisValue.inherits(&JSTestObj::s_info))
2095 return throwVMTypeError(exec);
2096 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
2097 ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
2098 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
2099 if (exec->argumentCount() < 1)
2100 return throwVMError(exec, createTypeError(exec, "Not enough arguments"));
2101 DOMStringList* listArg(toDOMStringList(MAYBE_MISSING_PARAMETER(exec, 0, DefaultIsUndefined)));
2102 if (exec->hadException())
2103 return JSValue::encode(jsUndefined());
2104 impl->overloadedMethod(listArg);
2105 return JSValue::encode(jsUndefined());
2108 static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod7(ExecState* exec)
2110 JSValue thisValue = exec->hostThisValue();
2111 if (!thisValue.inherits(&JSTestObj::s_info))
2112 return throwVMTypeError(exec);
2113 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
2114 ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
2115 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
2116 if (exec->argumentCount() < 1)
2117 return throwVMError(exec, createTypeError(exec, "Not enough arguments"));
2118 DOMStringList* arrayArg(toDOMStringList(MAYBE_MISSING_PARAMETER(exec, 0, DefaultIsUndefined)));
2119 if (exec->hadException())
2120 return JSValue::encode(jsUndefined());
2121 impl->overloadedMethod(arrayArg);
2122 return JSValue::encode(jsUndefined());
2125 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod(ExecState* exec)
2127 size_t argsCount = exec->argumentCount();
2128 JSValue arg1(exec->argument(1));
2129 JSValue arg0(exec->argument(0));
2130 if ((argsCount == 2 && (arg0.isNull() || (arg0.isObject() && asObject(arg0)->inherits(&JSTestObj::s_info))) && (arg1.isUndefinedOrNull() || arg1.isString() || arg1.isObject())))
2131 return jsTestObjPrototypeFunctionOverloadedMethod1(exec);
2132 if ((argsCount == 1 && (arg0.isNull() || (arg0.isObject() && asObject(arg0)->inherits(&JSTestObj::s_info)))) || (argsCount == 2 && (arg0.isNull() || (arg0.isObject() && asObject(arg0)->inherits(&JSTestObj::s_info)))))
2133 return jsTestObjPrototypeFunctionOverloadedMethod2(exec);
2134 if ((argsCount == 1 && (arg0.isUndefinedOrNull() || arg0.isString() || arg0.isObject())))
2135 return jsTestObjPrototypeFunctionOverloadedMethod3(exec);
2137 return jsTestObjPrototypeFunctionOverloadedMethod4(exec);
2138 if ((argsCount == 1 && (arg0.isNull() || arg0.isFunction())))
2139 return jsTestObjPrototypeFunctionOverloadedMethod5(exec);
2140 if ((argsCount == 1 && (arg0.isNull() || (arg0.isObject() && asObject(arg0)->inherits(&JSDOMStringList::s_info)))))
2141 return jsTestObjPrototypeFunctionOverloadedMethod6(exec);
2142 if ((argsCount == 1 && (arg0.isNull() || (arg0.isObject() && asObject(arg0)->inherits(&JSArray::s_info)))))
2143 return jsTestObjPrototypeFunctionOverloadedMethod7(exec);
2144 return throwVMTypeError(exec);
2147 EncodedJSValue JSC_HOST_CALL jsTestObjConstructorFunctionClassMethod(ExecState* exec)
2149 TestObj::classMethod();
2150 return JSValue::encode(jsUndefined());
2153 EncodedJSValue JSC_HOST_CALL jsTestObjConstructorFunctionClassMethodWithOptional(ExecState* exec)
2156 size_t argsCount = exec->argumentCount();
2157 if (argsCount <= 0) {
2159 JSC::JSValue result = jsNumber(TestObj::classMethodWithOptional());
2160 return JSValue::encode(result);
2163 int arg(MAYBE_MISSING_PARAMETER(exec, 0, DefaultIsUndefined).toInt32(exec));
2164 if (exec->hadException())
2165 return JSValue::encode(jsUndefined());
2167 JSC::JSValue result = jsNumber(TestObj::classMethodWithOptional(arg));
2168 return JSValue::encode(result);
2171 EncodedJSValue JSC_HOST_CALL jsTestObjConstructorFunctionClassMethod2(ExecState* exec)
2173 if (exec->argumentCount() < 1)
2174 return throwVMError(exec, createTypeError(exec, "Not enough arguments"));
2175 return JSValue::encode(JSTestObj::classMethod2(exec));
2178 #if ENABLE(Condition1)
2179 static EncodedJSValue JSC_HOST_CALL jsTestObjConstructorFunctionOverloadedMethod11(ExecState* exec)
2181 if (exec->argumentCount() < 1)
2182 return throwVMError(exec, createTypeError(exec, "Not enough arguments"));
2183 int arg(MAYBE_MISSING_PARAMETER(exec, 0, DefaultIsUndefined).toInt32(exec));
2184 if (exec->hadException())
2185 return JSValue::encode(jsUndefined());
2186 TestObj::overloadedMethod1(arg);
2187 return JSValue::encode(jsUndefined());
2192 #if ENABLE(Condition1)
2193 static EncodedJSValue JSC_HOST_CALL jsTestObjConstructorFunctionOverloadedMethod12(ExecState* exec)
2195 if (exec->argumentCount() < 1)
2196 return throwVMError(exec, createTypeError(exec, "Not enough arguments"));
2197 const String& type(ustringToString(MAYBE_MISSING_PARAMETER(exec, 0, DefaultIsUndefined).isEmpty() ? UString() : MAYBE_MISSING_PARAMETER(exec, 0, DefaultIsUndefined).toString(exec)->value(exec)));
2198 if (exec->hadException())
2199 return JSValue::encode(jsUndefined());
2200 TestObj::overloadedMethod1(type);
2201 return JSValue::encode(jsUndefined());
2204 EncodedJSValue JSC_HOST_CALL jsTestObjConstructorFunctionOverloadedMethod1(ExecState* exec)
2206 size_t argsCount = exec->argumentCount();
2208 return jsTestObjConstructorFunctionOverloadedMethod11(exec);
2209 JSValue arg0(exec->argument(0));
2210 if ((argsCount == 1 && (arg0.isUndefinedOrNull() || arg0.isString() || arg0.isObject())))
2211 return jsTestObjConstructorFunctionOverloadedMethod12(exec);
2212 return throwVMTypeError(exec);
2217 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithUnsignedLongArray(ExecState* exec)
2219 JSValue thisValue = exec->hostThisValue();
2220 if (!thisValue.inherits(&JSTestObj::s_info))
2221 return throwVMTypeError(exec);
2222 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
2223 ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
2224 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
2225 if (exec->argumentCount() < 1)
2226 return throwVMError(exec, createTypeError(exec, "Not enough arguments"));
2227 Vector<unsigned long> unsignedLongArray(jsUnsignedLongArrayToVector(exec, MAYBE_MISSING_PARAMETER(exec, 0, DefaultIsUndefined)));
2228 if (exec->hadException())
2229 return JSValue::encode(jsUndefined());
2230 impl->methodWithUnsignedLongArray(unsignedLongArray);
2231 return JSValue::encode(jsUndefined());
2234 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionGetSVGDocument(ExecState* exec)
2236 JSValue thisValue = exec->hostThisValue();
2237 if (!thisValue.inherits(&JSTestObj::s_info))
2238 return throwVMTypeError(exec);
2239 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
2240 ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
2241 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
2242 ExceptionCode ec = 0;
2243 if (!shouldAllowAccessToNode(exec, impl->getSVGDocument(ec)))
2244 return JSValue::encode(jsNull());
2246 JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl->getSVGDocument(ec)));
2247 setDOMException(exec, ec);
2248 return JSValue::encode(result);
2251 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConvert1(ExecState* exec)
2253 JSValue thisValue = exec->hostThisValue();
2254 if (!thisValue.inherits(&JSTestObj::s_info))
2255 return throwVMTypeError(exec);
2256 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
2257 ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
2258 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
2259 if (exec->argumentCount() < 1)
2260 return throwVMError(exec, createTypeError(exec, "Not enough arguments"));
2261 a* (toa(MAYBE_MISSING_PARAMETER(exec, 0, DefaultIsUndefined)));
2262 if (exec->hadException())
2263 return JSValue::encode(jsUndefined());
2265 return JSValue::encode(jsUndefined());
2268 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConvert2(ExecState* exec)
2270 JSValue thisValue = exec->hostThisValue();
2271 if (!thisValue.inherits(&JSTestObj::s_info))
2272 return throwVMTypeError(exec);
2273 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
2274 ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
2275 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
2276 if (exec->argumentCount() < 1)
2277 return throwVMError(exec, createTypeError(exec, "Not enough arguments"));
2278 b* (tob(MAYBE_MISSING_PARAMETER(exec, 0, DefaultIsUndefined)));
2279 if (exec->hadException())
2280 return JSValue::encode(jsUndefined());
2282 return JSValue::encode(jsUndefined());
2285 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConvert3(ExecState* exec)
2287 JSValue thisValue = exec->hostThisValue();
2288 if (!thisValue.inherits(&JSTestObj::s_info))
2289 return throwVMTypeError(exec);
2290 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
2291 ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
2292 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
2293 if (exec->argumentCount() < 1)
2294 return throwVMError(exec, createTypeError(exec, "Not enough arguments"));
2295 c* (toc(MAYBE_MISSING_PARAMETER(exec, 0, DefaultIsUndefined)));
2296 if (exec->hadException())
2297 return JSValue::encode(jsUndefined());
2299 return JSValue::encode(jsUndefined());
2302 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConvert4(ExecState* exec)
2304 JSValue thisValue = exec->hostThisValue();
2305 if (!thisValue.inherits(&JSTestObj::s_info))
2306 return throwVMTypeError(exec);
2307 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
2308 ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
2309 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
2310 if (exec->argumentCount() < 1)
2311 return throwVMError(exec, createTypeError(exec, "Not enough arguments"));
2312 d* (tod(MAYBE_MISSING_PARAMETER(exec, 0, DefaultIsUndefined)));
2313 if (exec->hadException())
2314 return JSValue::encode(jsUndefined());
2316 return JSValue::encode(jsUndefined());
2319 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConvert5(ExecState* exec)
2321 JSValue thisValue = exec->hostThisValue();
2322 if (!thisValue.inherits(&JSTestObj::s_info))
2323 return throwVMTypeError(exec);
2324 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
2325 ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
2326 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
2327 if (exec->argumentCount() < 1)
2328 return throwVMError(exec, createTypeError(exec, "Not enough arguments"));
2329 e* (toe(MAYBE_MISSING_PARAMETER(exec, 0, DefaultIsUndefined)));
2330 if (exec->hadException())
2331 return JSValue::encode(jsUndefined());
2333 return JSValue::encode(jsUndefined());
2336 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMutablePointFunction(ExecState* exec)
2338 JSValue thisValue = exec->hostThisValue();
2339 if (!thisValue.inherits(&JSTestObj::s_info))
2340 return throwVMTypeError(exec);
2341 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
2342 ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
2343 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
2345 JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(SVGPropertyTearOff<FloatPoint>::create(impl->mutablePointFunction())));
2346 return JSValue::encode(result);
2349 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionImmutablePointFunction(ExecState* exec)
2351 JSValue thisValue = exec->hostThisValue();
2352 if (!thisValue.inherits(&JSTestObj::s_info))
2353 return throwVMTypeError(exec);
2354 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
2355 ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
2356 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
2358 JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(SVGPropertyTearOff<FloatPoint>::create(impl->immutablePointFunction())));
2359 return JSValue::encode(result);
2362 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOrange(ExecState* exec)
2364 JSValue thisValue = exec->hostThisValue();
2365 if (!thisValue.inherits(&JSTestObj::s_info))
2366 return throwVMTypeError(exec);
2367 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
2368 ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
2369 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
2371 return JSValue::encode(jsUndefined());
2374 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionStrictFunction(ExecState* exec)
2376 JSValue thisValue = exec->hostThisValue();
2377 if (!thisValue.inherits(&JSTestObj::s_info))
2378 return throwVMTypeError(exec);
2379 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
2380 ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
2381 TestObj* impl = static_cast<TestObj*>(castedThis->impl());
2382 if (exec->argumentCount() < 3)
2383 return throwVMError(exec, createTypeError(exec, "Not enough arguments"));
2384 ExceptionCode ec = 0;
2385 const String& str(ustringToString(MAYBE_MISSING_PARAMETER(exec, 0, DefaultIsUndefined).isEmpty() ? UString() : MAYBE_MISSING_PARAMETER(exec, 0, DefaultIsUndefined).toString(exec)->value(exec)));
2386 if (exec->hadException())
2387 return JSValue::encode(jsUndefined());
2388 float a(MAYBE_MISSING_PARAMETER(exec, 1, DefaultIsUndefined).toFloat(exec));
2389 if (exec->hadException())
2390 return JSValue::encode(jsUndefined());
2391 if (exec->argumentCount() > 2 && !exec->argument(2).isUndefinedOrNull() && !exec->argument(2).inherits(&JSint::s_info))
2392 return throwVMTypeError(exec);
2393 int* b(toint(MAYBE_MISSING_PARAMETER(exec, 2, DefaultIsUndefined)));
2394 if (exec->hadException())
2395 return JSValue::encode(jsUndefined());
2397 JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl->strictFunction(str, a, b, ec)));
2398 setDOMException(exec, ec);
2399 return JSValue::encode(result);
2402 void JSTestObj::visitChildren(JSCell* cell, SlotVisitor& visitor)
2404 JSTestObj* thisObject = jsCast<JSTestObj*>(cell);
2405 ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
2406 COMPILE_ASSERT(StructureFlags & OverridesVisitChildren, OverridesVisitChildrenWithoutSettingFlag);
2407 ASSERT(thisObject->structure()->typeInfo().overridesVisitChildren());
2408 Base::visitChildren(thisObject, visitor);
2409 if (thisObject->m_cachedAttribute1)
2410 visitor.append(&thisObject->m_cachedAttribute1);
2411 if (thisObject->m_cachedAttribute2)
2412 visitor.append(&thisObject->m_cachedAttribute2);
2417 #if ENABLE(Condition1)
2418 JSValue jsTestObjCONDITIONAL_CONST(ExecState* exec, JSValue, const Identifier&)
2421 return jsNumber(static_cast<int>(0));
2425 JSValue jsTestObjCONST_VALUE_0(ExecState* exec, JSValue, const Identifier&)
2428 return jsNumber(static_cast<int>(0));
2431 JSValue jsTestObjCONST_VALUE_1(ExecState* exec, JSValue, const Identifier&)
2434 return jsNumber(static_cast<int>(1));
2437 JSValue jsTestObjCONST_VALUE_2(ExecState* exec, JSValue, const Identifier&)
2440 return jsNumber(static_cast<int>(2));
2443 JSValue jsTestObjCONST_VALUE_4(ExecState* exec, JSValue, const Identifier&)
2446 return jsNumber(static_cast<int>(4));
2449 JSValue jsTestObjCONST_VALUE_8(ExecState* exec, JSValue, const Identifier&)
2452 return jsNumber(static_cast<int>(8));
2455 JSValue jsTestObjCONST_VALUE_9(ExecState* exec, JSValue, const Identifier&)
2458 return jsNumber(static_cast<int>(-1));
2461 JSValue jsTestObjCONST_VALUE_10(ExecState* exec, JSValue, const Identifier&)
2463 return jsStringOrNull(exec, String("my constant string"));
2466 JSValue jsTestObjCONST_VALUE_11(ExecState* exec, JSValue, const Identifier&)
2469 return jsNumber(static_cast<int>(0xffffffff));
2472 JSValue jsTestObjCONST_VALUE_12(ExecState* exec, JSValue, const Identifier&)
2475 return jsNumber(static_cast<int>(0x01));
2478 JSValue jsTestObjCONST_VALUE_13(ExecState* exec, JSValue, const Identifier&)
2481 return jsNumber(static_cast<int>(0X20));
2484 JSValue jsTestObjCONST_VALUE_14(ExecState* exec, JSValue, const Identifier&)
2487 return jsNumber(static_cast<int>(0x1abc));
2490 JSValue jsTestObjCONST_JAVASCRIPT(ExecState* exec, JSValue, const Identifier&)
2493 return jsNumber(static_cast<int>(15));
2496 static inline bool isObservable(JSTestObj* jsTestObj)
2498 if (jsTestObj->hasCustomProperties())
2503 bool JSTestObjOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor)
2505 JSTestObj* jsTestObj = jsCast<JSTestObj*>(handle.get().asCell());
2506 if (!isObservable(jsTestObj))
2508 UNUSED_PARAM(visitor);
2512 void JSTestObjOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context)
2514 JSTestObj* jsTestObj = jsCast<JSTestObj*>(handle.get().asCell());
2515 DOMWrapperWorld* world = static_cast<DOMWrapperWorld*>(context);
2516 uncacheWrapper(world, jsTestObj->impl(), jsTestObj);
2517 jsTestObj->releaseImpl();
2520 JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, TestObj* impl)
2522 return wrap<JSTestObj>(exec, globalObject, impl);
2525 TestObj* toTestObj(JSC::JSValue value)
2527 return value.inherits(&JSTestObj::s_info) ? jsCast<JSTestObj*>(asObject(value))->impl() : 0;