#include "IDBBindingUtilities.h"
#include "IDBKey.h"
#include "JSDOMBinding.h"
+#include "JSDOMStringList.h"
#include "JSEventListener.h"
#include "JSOptionsObject.h"
#include "JSTestCallback.h"
};
#undef THUNK_GENERATOR
-static JSC_CONST_HASHTABLE HashTable JSTestObjTable = { 135, 127, JSTestObjTableValues, 0 };
+static const HashTable JSTestObjTable = { 135, 127, JSTestObjTableValues, 0 };
/* Hash table for constructor */
#if ENABLE(JIT)
#define THUNK_GENERATOR(generator) , generator
static const HashTableValue JSTestObjConstructorTableValues[] =
{
+#if ENABLE(Condition1)
+ { "CONDITIONAL_CONST", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONDITIONAL_CONST), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
+#endif
{ "CONST_VALUE_0", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_0), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
{ "CONST_VALUE_1", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_1), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
{ "CONST_VALUE_2", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_2), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
{ "CONST_VALUE_12", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_12), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
{ "CONST_VALUE_13", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_13), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
{ "CONST_VALUE_14", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_14), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
+ { "CONST_JAVASCRIPT", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_JAVASCRIPT), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
+ { "classMethod", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsTestObjConstructorFunctionClassMethod), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
+ { "classMethodWithOptional", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsTestObjConstructorFunctionClassMethodWithOptional), (intptr_t)1 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
{ 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
};
#undef THUNK_GENERATOR
-static JSC_CONST_HASHTABLE HashTable JSTestObjConstructorTable = { 33, 31, JSTestObjConstructorTableValues, 0 };
+static const HashTable JSTestObjConstructorTable = { 35, 31, JSTestObjConstructorTableValues, 0 };
+#if ENABLE(Condition1)
+COMPILE_ASSERT(0 == TestObj::CONDITIONAL_CONST, TestObjEnumCONDITIONAL_CONSTIsWrongUseDontCheckEnums);
+#endif
COMPILE_ASSERT(0 == TestObj::CONST_VALUE_0, TestObjEnumCONST_VALUE_0IsWrongUseDontCheckEnums);
COMPILE_ASSERT(1 == TestObj::CONST_VALUE_1, TestObjEnumCONST_VALUE_1IsWrongUseDontCheckEnums);
COMPILE_ASSERT(2 == TestObj::CONST_VALUE_2, TestObjEnumCONST_VALUE_2IsWrongUseDontCheckEnums);
COMPILE_ASSERT(0x01 == TestObj::CONST_VALUE_12, TestObjEnumCONST_VALUE_12IsWrongUseDontCheckEnums);
COMPILE_ASSERT(0X20 == TestObj::CONST_VALUE_13, TestObjEnumCONST_VALUE_13IsWrongUseDontCheckEnums);
COMPILE_ASSERT(0x1abc == TestObj::CONST_VALUE_14, TestObjEnumCONST_VALUE_14IsWrongUseDontCheckEnums);
+COMPILE_ASSERT(15 == TestObj::CONST_IMPL, TestObjEnumCONST_IMPLIsWrongUseDontCheckEnums);
const ClassInfo JSTestObjConstructor::s_info = { "TestObjConstructor", &DOMConstructorObject::s_info, &JSTestObjConstructorTable, 0, CREATE_METHOD_TABLE(JSTestObjConstructor) };
putDirect(exec->globalData(), exec->propertyNames().prototype, JSTestObjPrototype::self(exec, globalObject), DontDelete | ReadOnly);
}
-bool JSTestObjConstructor::getOwnPropertySlotVirtual(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
+bool JSTestObjConstructor::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
{
- return getOwnPropertySlot(this, exec, propertyName, slot);
+ return getStaticPropertySlot<JSTestObjConstructor, JSDOMWrapper>(exec, &JSTestObjConstructorTable, static_cast<JSTestObjConstructor*>(cell), propertyName, slot);
}
-bool JSTestObjConstructor::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
+bool JSTestObjConstructor::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
+{
+ return getStaticPropertyDescriptor<JSTestObjConstructor, JSDOMWrapper>(exec, &JSTestObjConstructorTable, static_cast<JSTestObjConstructor*>(object), propertyName, descriptor);
+}
+
+EncodedJSValue JSC_HOST_CALL JSTestObjConstructor::constructJSTestObj(ExecState* exec)
{
- return getStaticValueSlot<JSTestObjConstructor, JSDOMWrapper>(exec, &JSTestObjConstructorTable, static_cast<JSTestObjConstructor*>(cell), propertyName, slot);
+ JSTestObjConstructor* jsConstructor = static_cast<JSTestObjConstructor*>(exec->callee());
+ RefPtr<TestObj> object = TestObj::create();
+ return JSValue::encode(asObject(toJS(exec, jsConstructor->globalObject(), object.get())));
}
-bool JSTestObjConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
+ConstructType JSTestObjConstructor::getConstructData(JSCell*, ConstructData& constructData)
{
- return getStaticValueDescriptor<JSTestObjConstructor, JSDOMWrapper>(exec, &JSTestObjConstructorTable, this, propertyName, descriptor);
+ constructData.native.function = constructJSTestObj;
+ return ConstructTypeHost;
}
/* Hash table for prototype */
static const HashTableValue JSTestObjPrototypeTableValues[] =
{
+#if ENABLE(Condition1)
+ { "CONDITIONAL_CONST", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONDITIONAL_CONST), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
+#endif
{ "CONST_VALUE_0", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_0), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
{ "CONST_VALUE_1", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_1), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
{ "CONST_VALUE_2", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_2), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
{ "CONST_VALUE_12", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_12), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
{ "CONST_VALUE_13", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_13), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
{ "CONST_VALUE_14", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_14), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
+ { "CONST_JAVASCRIPT", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_JAVASCRIPT), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
{ "voidMethod", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionVoidMethod), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
{ "voidMethodWithArgs", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionVoidMethodWithArgs), (intptr_t)3 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
{ "intMethod", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionIntMethod), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
{ "intMethodWithArgs", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionIntMethodWithArgs), (intptr_t)3 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
{ "objMethod", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionObjMethod), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
{ "objMethodWithArgs", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionObjMethodWithArgs), (intptr_t)3 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
- { "methodThatRequiresAllArgs", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodThatRequiresAllArgs), (intptr_t)2 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
{ "methodThatRequiresAllArgsAndThrows", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows), (intptr_t)2 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
{ "serializedValue", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionSerializedValue), (intptr_t)1 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
{ "idbKey", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionIdbKey), (intptr_t)1 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
{ "conditionalMethod3", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionConditionalMethod3), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
#endif
{ "overloadedMethod", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionOverloadedMethod), (intptr_t)2 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
- { "classMethod", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionClassMethod), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
- { "classMethodWithOptional", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionClassMethodWithOptional), (intptr_t)1 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
{ 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
};
#undef THUNK_GENERATOR
-static JSC_CONST_HASHTABLE HashTable JSTestObjPrototypeTable = { 137, 127, JSTestObjPrototypeTableValues, 0 };
+static const HashTable JSTestObjPrototypeTable = { 137, 127, JSTestObjPrototypeTableValues, 0 };
const ClassInfo JSTestObjPrototype::s_info = { "TestObjPrototype", &JSC::JSNonFinalObject::s_info, &JSTestObjPrototypeTable, 0, CREATE_METHOD_TABLE(JSTestObjPrototype) };
JSObject* JSTestObjPrototype::self(ExecState* exec, JSGlobalObject* globalObject)
return getDOMPrototype<JSTestObj>(exec, globalObject);
}
-bool JSTestObjPrototype::getOwnPropertySlotVirtual(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
-{
- return getOwnPropertySlot(this, exec, propertyName, slot);
-}
-
bool JSTestObjPrototype::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
{
- JSTestObjPrototype* thisObject = static_cast<JSTestObjPrototype*>(cell);
+ JSTestObjPrototype* thisObject = jsCast<JSTestObjPrototype*>(cell);
return getStaticPropertySlot<JSTestObjPrototype, JSObject>(exec, &JSTestObjPrototypeTable, thisObject, propertyName, slot);
}
-bool JSTestObjPrototype::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
+bool JSTestObjPrototype::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
{
- return getStaticPropertyDescriptor<JSTestObjPrototype, JSObject>(exec, &JSTestObjPrototypeTable, this, propertyName, descriptor);
+ JSTestObjPrototype* thisObject = jsCast<JSTestObjPrototype*>(object);
+ return getStaticPropertyDescriptor<JSTestObjPrototype, JSObject>(exec, &JSTestObjPrototypeTable, thisObject, propertyName, descriptor);
}
const ClassInfo JSTestObj::s_info = { "TestObj", &JSDOMWrapper::s_info, &JSTestObjTable, 0 , CREATE_METHOD_TABLE(JSTestObj) };
JSTestObj::JSTestObj(Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<TestObj> impl)
: JSDOMWrapper(structure, globalObject)
- , m_impl(impl)
+ , m_impl(impl.leakRef())
{
}
return JSTestObjPrototype::create(exec->globalData(), globalObject, JSTestObjPrototype::createStructure(globalObject->globalData(), globalObject, globalObject->objectPrototype()));
}
-bool JSTestObj::getOwnPropertySlotVirtual(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
-{
- return getOwnPropertySlot(this, exec, propertyName, slot);
-}
-
bool JSTestObj::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
{
- JSTestObj* thisObject = static_cast<JSTestObj*>(cell);
+ JSTestObj* thisObject = jsCast<JSTestObj*>(cell);
ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
return getStaticValueSlot<JSTestObj, Base>(exec, &JSTestObjTable, thisObject, propertyName, slot);
}
-bool JSTestObj::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
+bool JSTestObj::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
{
- ASSERT_GC_OBJECT_INHERITS(this, &s_info);
- return getStaticValueDescriptor<JSTestObj, Base>(exec, &JSTestObjTable, this, propertyName, descriptor);
+ JSTestObj* thisObject = jsCast<JSTestObj*>(object);
+ ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
+ return getStaticValueDescriptor<JSTestObj, Base>(exec, &JSTestObjTable, thisObject, propertyName, descriptor);
}
JSValue jsTestObjReadOnlyIntAttr(ExecState* exec, JSValue slotBase, const Identifier&)
return JSTestObj::getConstructor(exec, domObject->globalObject());
}
-void JSTestObj::putVirtual(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot)
-{
- put(this, exec, propertyName, value, slot);
-}
-
void JSTestObj::put(JSCell* cell, ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot)
{
- JSTestObj* thisObject = static_cast<JSTestObj*>(cell);
+ JSTestObj* thisObject = jsCast<JSTestObj*>(cell);
ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
lookupPut<JSTestObj, Base>(exec, propertyName, value, &JSTestObjTable, thisObject, slot);
}
{
JSTestObj* castedThis = static_cast<JSTestObj*>(thisObject);
TestObj* imp = static_cast<TestObj*>(castedThis->impl());
- imp->setStringAttr(ustringToString(value.toString(exec)));
+ imp->setStringAttr(ustringToString(value.isEmpty() ? UString() : value.toString(exec)));
}
JSTestObj* castedThis = static_cast<JSTestObj*>(thisObject);
TestObj* imp = static_cast<TestObj*>(castedThis->impl());
ExceptionCode ec = 0;
- imp->setStringAttrWithGetterException(ustringToString(value.toString(exec)), ec);
+ imp->setStringAttrWithGetterException(ustringToString(value.isEmpty() ? UString() : value.toString(exec)), ec);
setDOMException(exec, ec);
}
JSTestObj* castedThis = static_cast<JSTestObj*>(thisObject);
TestObj* imp = static_cast<TestObj*>(castedThis->impl());
ExceptionCode ec = 0;
- imp->setStringAttrWithSetterException(ustringToString(value.toString(exec)), ec);
+ imp->setStringAttrWithSetterException(ustringToString(value.isEmpty() ? UString() : value.toString(exec)), ec);
setDOMException(exec, ec);
}
JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
TestObj* imp = static_cast<TestObj*>(castedThis->impl());
- int intArg(exec->argument(0).toInt32(exec));
+ if (exec->argumentCount() < 3)
+ return throwVMError(exec, createTypeError(exec, "Not enough arguments"));
+ int intArg(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined).toInt32(exec));
if (exec->hadException())
return JSValue::encode(jsUndefined());
- const String& strArg(ustringToString(exec->argument(1).toString(exec)));
+ const String& strArg(ustringToString(MAYBE_MISSING_PARAMETER(exec, 1, MissingIsUndefined).isEmpty() ? UString() : MAYBE_MISSING_PARAMETER(exec, 1, MissingIsUndefined).toString(exec)));
if (exec->hadException())
return JSValue::encode(jsUndefined());
- TestObj* objArg(toTestObj(exec->argument(2)));
+ TestObj* objArg(toTestObj(MAYBE_MISSING_PARAMETER(exec, 2, MissingIsUndefined)));
if (exec->hadException())
return JSValue::encode(jsUndefined());
imp->voidMethodWithArgs(intArg, strArg, objArg);
JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
TestObj* imp = static_cast<TestObj*>(castedThis->impl());
- int intArg(exec->argument(0).toInt32(exec));
+ if (exec->argumentCount() < 3)
+ return throwVMError(exec, createTypeError(exec, "Not enough arguments"));
+ int intArg(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined).toInt32(exec));
if (exec->hadException())
return JSValue::encode(jsUndefined());
- const String& strArg(ustringToString(exec->argument(1).toString(exec)));
+ const String& strArg(ustringToString(MAYBE_MISSING_PARAMETER(exec, 1, MissingIsUndefined).isEmpty() ? UString() : MAYBE_MISSING_PARAMETER(exec, 1, MissingIsUndefined).toString(exec)));
if (exec->hadException())
return JSValue::encode(jsUndefined());
- TestObj* objArg(toTestObj(exec->argument(2)));
+ TestObj* objArg(toTestObj(MAYBE_MISSING_PARAMETER(exec, 2, MissingIsUndefined)));
if (exec->hadException())
return JSValue::encode(jsUndefined());
JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
TestObj* imp = static_cast<TestObj*>(castedThis->impl());
- int intArg(exec->argument(0).toInt32(exec));
+ if (exec->argumentCount() < 3)
+ return throwVMError(exec, createTypeError(exec, "Not enough arguments"));
+ int intArg(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined).toInt32(exec));
if (exec->hadException())
return JSValue::encode(jsUndefined());
- const String& strArg(ustringToString(exec->argument(1).toString(exec)));
+ const String& strArg(ustringToString(MAYBE_MISSING_PARAMETER(exec, 1, MissingIsUndefined).isEmpty() ? UString() : MAYBE_MISSING_PARAMETER(exec, 1, MissingIsUndefined).toString(exec)));
if (exec->hadException())
return JSValue::encode(jsUndefined());
- TestObj* objArg(toTestObj(exec->argument(2)));
+ TestObj* objArg(toTestObj(MAYBE_MISSING_PARAMETER(exec, 2, MissingIsUndefined)));
if (exec->hadException())
return JSValue::encode(jsUndefined());
return JSValue::encode(result);
}
-EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodThatRequiresAllArgs(ExecState* exec)
-{
- JSValue thisValue = exec->hostThisValue();
- if (!thisValue.inherits(&JSTestObj::s_info))
- return throwVMTypeError(exec);
- JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
- ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
- TestObj* imp = static_cast<TestObj*>(castedThis->impl());
- if (exec->argumentCount() < 2)
- return JSValue::encode(jsUndefined());
- const String& strArg(ustringToString(exec->argument(0).toString(exec)));
- if (exec->hadException())
- return JSValue::encode(jsUndefined());
- TestObj* objArg(toTestObj(exec->argument(1)));
- if (exec->hadException())
- return JSValue::encode(jsUndefined());
-
- JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->methodThatRequiresAllArgs(strArg, objArg)));
- return JSValue::encode(result);
-}
-
EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows(ExecState* exec)
{
JSValue thisValue = exec->hostThisValue();
if (exec->argumentCount() < 2)
return throwVMError(exec, createTypeError(exec, "Not enough arguments"));
ExceptionCode ec = 0;
- const String& strArg(ustringToString(exec->argument(0).toString(exec)));
+ const String& strArg(ustringToString(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined).isEmpty() ? UString() : MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined).toString(exec)));
if (exec->hadException())
return JSValue::encode(jsUndefined());
- TestObj* objArg(toTestObj(exec->argument(1)));
+ TestObj* objArg(toTestObj(MAYBE_MISSING_PARAMETER(exec, 1, MissingIsUndefined)));
if (exec->hadException())
return JSValue::encode(jsUndefined());
JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
TestObj* imp = static_cast<TestObj*>(castedThis->impl());
- RefPtr<SerializedScriptValue> serializedArg(SerializedScriptValue::create(exec, exec->argument(0)));
+ if (exec->argumentCount() < 1)
+ return throwVMError(exec, createTypeError(exec, "Not enough arguments"));
+ RefPtr<SerializedScriptValue> serializedArg(SerializedScriptValue::create(exec, MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined)));
if (exec->hadException())
return JSValue::encode(jsUndefined());
imp->serializedValue(serializedArg);
JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
TestObj* imp = static_cast<TestObj*>(castedThis->impl());
- RefPtr<IDBKey> key(createIDBKeyFromValue(exec, exec->argument(0)));
+ if (exec->argumentCount() < 1)
+ return throwVMError(exec, createTypeError(exec, "Not enough arguments"));
+ RefPtr<IDBKey> key(createIDBKeyFromValue(exec, MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined)));
if (exec->hadException())
return JSValue::encode(jsUndefined());
imp->idbKey(key);
JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
TestObj* imp = static_cast<TestObj*>(castedThis->impl());
- OptionsObject* oo(toOptionsObject(exec->argument(0)));
+ if (exec->argumentCount() < 1)
+ return throwVMError(exec, createTypeError(exec, "Not enough arguments"));
+ OptionsObject* oo(toOptionsObject(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined)));
if (exec->hadException())
return JSValue::encode(jsUndefined());
return JSValue::encode(jsUndefined());
}
- OptionsObject* ooo(toOptionsObject(exec->argument(1)));
+ OptionsObject* ooo(toOptionsObject(MAYBE_MISSING_PARAMETER(exec, 1, MissingIsUndefined)));
if (exec->hadException())
return JSValue::encode(jsUndefined());
imp->optionsObject(oo, ooo);
JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
TestObj* imp = static_cast<TestObj*>(castedThis->impl());
+ if (exec->argumentCount() < 1)
+ return throwVMError(exec, createTypeError(exec, "Not enough arguments"));
ExceptionCode ec = 0;
RefPtr<ScriptArguments> scriptArguments(createScriptArguments(exec, 1));
size_t maxStackSize = imp->shouldCaptureFullStackTrace() ? ScriptCallStack::maxCallStackSizeToCapture : 1;
RefPtr<ScriptCallStack> callStack(createScriptCallStack(exec, maxStackSize));
- log* intArg(tolog(exec->argument(0)));
+ log* intArg(tolog(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined)));
if (exec->hadException())
return JSValue::encode(jsUndefined());
imp->customArgsAndException(intArg, scriptArguments, callStack, ec);
JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
TestObj* imp = static_cast<TestObj*>(castedThis->impl());
+ if (exec->argumentCount() < 2)
+ return throwVMError(exec, createTypeError(exec, "Not enough arguments"));
JSValue listener = exec->argument(1);
if (!listener.isObject())
return JSValue::encode(jsUndefined());
JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
TestObj* imp = static_cast<TestObj*>(castedThis->impl());
+ if (exec->argumentCount() < 2)
+ return throwVMError(exec, createTypeError(exec, "Not enough arguments"));
JSValue listener = exec->argument(1);
if (!listener.isObject())
return JSValue::encode(jsUndefined());
JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
TestObj* imp = static_cast<TestObj*>(castedThis->impl());
+ if (exec->argumentCount() < 1)
+ return throwVMError(exec, createTypeError(exec, "Not enough arguments"));
Frame* dynamicFrame = toDynamicFrame(exec);
if (!dynamicFrame)
return JSValue::encode(jsUndefined());
- int intArg(exec->argument(0).toInt32(exec));
+ int intArg(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined).toInt32(exec));
if (exec->hadException())
return JSValue::encode(jsUndefined());
imp->withDynamicFrameAndArg(dynamicFrame, intArg);
JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
TestObj* imp = static_cast<TestObj*>(castedThis->impl());
+ if (exec->argumentCount() < 1)
+ return throwVMError(exec, createTypeError(exec, "Not enough arguments"));
Frame* dynamicFrame = toDynamicFrame(exec);
if (!dynamicFrame)
return JSValue::encode(jsUndefined());
- int intArg(exec->argument(0).toInt32(exec));
+ int intArg(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined).toInt32(exec));
if (exec->hadException())
return JSValue::encode(jsUndefined());
return JSValue::encode(jsUndefined());
}
- int optionalArg(exec->argument(1).toInt32(exec));
+ int optionalArg(MAYBE_MISSING_PARAMETER(exec, 1, MissingIsUndefined).toInt32(exec));
if (exec->hadException())
return JSValue::encode(jsUndefined());
imp->withDynamicFrameAndOptionalArg(dynamicFrame, intArg, optionalArg);
JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
TestObj* imp = static_cast<TestObj*>(castedThis->impl());
+ if (exec->argumentCount() < 1)
+ return throwVMError(exec, createTypeError(exec, "Not enough arguments"));
Frame* dynamicFrame = toDynamicFrame(exec);
if (!dynamicFrame)
return JSValue::encode(jsUndefined());
- int intArg(exec->argument(0).toInt32(exec));
+ int intArg(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined).toInt32(exec));
if (exec->hadException())
return JSValue::encode(jsUndefined());
imp->withDynamicFrameAndUserGesture(dynamicFrame, intArg, ScriptController::processingUserGesture());
JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
TestObj* imp = static_cast<TestObj*>(castedThis->impl());
+ if (exec->argumentCount() < 1)
+ return throwVMError(exec, createTypeError(exec, "Not enough arguments"));
Frame* dynamicFrame = toDynamicFrame(exec);
if (!dynamicFrame)
return JSValue::encode(jsUndefined());
- int intArg(exec->argument(0).toInt32(exec));
+ int intArg(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined).toInt32(exec));
if (exec->hadException())
return JSValue::encode(jsUndefined());
return JSValue::encode(jsUndefined());
}
- int optionalArg(exec->argument(1).toInt32(exec));
+ int optionalArg(MAYBE_MISSING_PARAMETER(exec, 1, MissingIsUndefined).toInt32(exec));
if (exec->hadException())
return JSValue::encode(jsUndefined());
imp->withDynamicFrameAndUserGestureASAD(dynamicFrame, intArg, optionalArg, ScriptController::processingUserGesture());
return JSValue::encode(jsUndefined());
}
- int opt(exec->argument(0).toInt32(exec));
+ int opt(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined).toInt32(exec));
if (exec->hadException())
return JSValue::encode(jsUndefined());
imp->methodWithOptionalArg(opt);
JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
TestObj* imp = static_cast<TestObj*>(castedThis->impl());
- int nonOpt(exec->argument(0).toInt32(exec));
+ if (exec->argumentCount() < 1)
+ return throwVMError(exec, createTypeError(exec, "Not enough arguments"));
+ int nonOpt(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined).toInt32(exec));
if (exec->hadException())
return JSValue::encode(jsUndefined());
return JSValue::encode(jsUndefined());
}
- int opt(exec->argument(1).toInt32(exec));
+ int opt(MAYBE_MISSING_PARAMETER(exec, 1, MissingIsUndefined).toInt32(exec));
if (exec->hadException())
return JSValue::encode(jsUndefined());
imp->methodWithNonOptionalArgAndOptionalArg(nonOpt, opt);
JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
TestObj* imp = static_cast<TestObj*>(castedThis->impl());
- int nonOpt(exec->argument(0).toInt32(exec));
+ if (exec->argumentCount() < 1)
+ return throwVMError(exec, createTypeError(exec, "Not enough arguments"));
+ int nonOpt(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined).toInt32(exec));
if (exec->hadException())
return JSValue::encode(jsUndefined());
return JSValue::encode(jsUndefined());
}
- int opt1(exec->argument(1).toInt32(exec));
+ int opt1(MAYBE_MISSING_PARAMETER(exec, 1, MissingIsUndefined).toInt32(exec));
if (exec->hadException())
return JSValue::encode(jsUndefined());
- int opt2(exec->argument(2).toInt32(exec));
+ if (argsCount <= 2) {
+ imp->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt, opt1);
+ return JSValue::encode(jsUndefined());
+ }
+
+ int opt2(MAYBE_MISSING_PARAMETER(exec, 2, MissingIsUndefined).toInt32(exec));
if (exec->hadException())
return JSValue::encode(jsUndefined());
imp->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt, opt1, opt2);
JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
TestObj* imp = static_cast<TestObj*>(castedThis->impl());
+ if (exec->argumentCount() < 1)
+ return throwVMError(exec, createTypeError(exec, "Not enough arguments"));
if (exec->argumentCount() <= 0 || !exec->argument(0).isObject()) {
setDOMException(exec, TYPE_MISMATCH_ERR);
return JSValue::encode(jsUndefined());
JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
TestObj* imp = static_cast<TestObj*>(castedThis->impl());
- int nonCallback(exec->argument(0).toInt32(exec));
+ if (exec->argumentCount() < 2)
+ return throwVMError(exec, createTypeError(exec, "Not enough arguments"));
+ int nonCallback(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined).toInt32(exec));
if (exec->hadException())
return JSValue::encode(jsUndefined());
if (exec->argumentCount() <= 1 || !exec->argument(1).isObject()) {
JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
TestObj* imp = static_cast<TestObj*>(castedThis->impl());
- TestObj* objArg(toTestObj(exec->argument(0)));
+ if (exec->argumentCount() < 2)
+ return throwVMError(exec, createTypeError(exec, "Not enough arguments"));
+ TestObj* objArg(toTestObj(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined)));
if (exec->hadException())
return JSValue::encode(jsUndefined());
- const String& strArg(ustringToString(exec->argument(1).toString(exec)));
+ const String& strArg(ustringToString(MAYBE_MISSING_PARAMETER(exec, 1, MissingIsUndefined).isEmpty() ? UString() : MAYBE_MISSING_PARAMETER(exec, 1, MissingIsUndefined).toString(exec)));
if (exec->hadException())
return JSValue::encode(jsUndefined());
imp->overloadedMethod(objArg, strArg);
JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
TestObj* imp = static_cast<TestObj*>(castedThis->impl());
- TestObj* objArg(toTestObj(exec->argument(0)));
+ if (exec->argumentCount() < 1)
+ return throwVMError(exec, createTypeError(exec, "Not enough arguments"));
+ TestObj* objArg(toTestObj(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined)));
if (exec->hadException())
return JSValue::encode(jsUndefined());
return JSValue::encode(jsUndefined());
}
- int intArg(exec->argument(1).toInt32(exec));
+ int intArg(MAYBE_MISSING_PARAMETER(exec, 1, MissingIsUndefined).toInt32(exec));
if (exec->hadException())
return JSValue::encode(jsUndefined());
imp->overloadedMethod(objArg, intArg);
JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
TestObj* imp = static_cast<TestObj*>(castedThis->impl());
- const String& strArg(ustringToString(exec->argument(0).toString(exec)));
+ if (exec->argumentCount() < 1)
+ return throwVMError(exec, createTypeError(exec, "Not enough arguments"));
+ const String& strArg(ustringToString(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined).isEmpty() ? UString() : MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined).toString(exec)));
if (exec->hadException())
return JSValue::encode(jsUndefined());
imp->overloadedMethod(strArg);
JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
TestObj* imp = static_cast<TestObj*>(castedThis->impl());
- int intArg(exec->argument(0).toInt32(exec));
+ if (exec->argumentCount() < 1)
+ return throwVMError(exec, createTypeError(exec, "Not enough arguments"));
+ int intArg(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined).toInt32(exec));
if (exec->hadException())
return JSValue::encode(jsUndefined());
imp->overloadedMethod(intArg);
JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
TestObj* imp = static_cast<TestObj*>(castedThis->impl());
+ if (exec->argumentCount() < 1)
+ return throwVMError(exec, createTypeError(exec, "Not enough arguments"));
if (exec->argumentCount() <= 0 || !exec->argument(0).isObject()) {
setDOMException(exec, TYPE_MISMATCH_ERR);
return JSValue::encode(jsUndefined());
return JSValue::encode(jsUndefined());
}
+static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod6(ExecState* exec)
+{
+ JSValue thisValue = exec->hostThisValue();
+ if (!thisValue.inherits(&JSTestObj::s_info))
+ return throwVMTypeError(exec);
+ JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
+ ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
+ TestObj* imp = static_cast<TestObj*>(castedThis->impl());
+ if (exec->argumentCount() < 1)
+ return throwVMError(exec, createTypeError(exec, "Not enough arguments"));
+ DOMStringList* listArg(toDOMStringList(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined)));
+ if (exec->hadException())
+ return JSValue::encode(jsUndefined());
+ imp->overloadedMethod(listArg);
+ return JSValue::encode(jsUndefined());
+}
+
+static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod7(ExecState* exec)
+{
+ JSValue thisValue = exec->hostThisValue();
+ if (!thisValue.inherits(&JSTestObj::s_info))
+ return throwVMTypeError(exec);
+ JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
+ ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
+ TestObj* imp = static_cast<TestObj*>(castedThis->impl());
+ if (exec->argumentCount() < 1)
+ return throwVMError(exec, createTypeError(exec, "Not enough arguments"));
+ DOMStringList* arrayArg(toDOMStringList(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined)));
+ if (exec->hadException())
+ return JSValue::encode(jsUndefined());
+ imp->overloadedMethod(arrayArg);
+ return JSValue::encode(jsUndefined());
+}
+
EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod(ExecState* exec)
{
size_t argsCount = exec->argumentCount();
return jsTestObjPrototypeFunctionOverloadedMethod4(exec);
if ((argsCount == 1 && (arg0.isNull() || arg0.isObject())))
return jsTestObjPrototypeFunctionOverloadedMethod5(exec);
+ if ((argsCount == 1 && (arg0.isNull() || (arg0.isObject() && asObject(arg0)->inherits(&JSDOMStringList::s_info)))))
+ return jsTestObjPrototypeFunctionOverloadedMethod6(exec);
+ if ((argsCount == 1 && (arg0.isNull() || (arg0.isObject() && asObject(arg0)->inherits(&JSArray::s_info)))))
+ return jsTestObjPrototypeFunctionOverloadedMethod7(exec);
return throwVMTypeError(exec);
}
-EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionClassMethod(ExecState* exec)
+EncodedJSValue JSC_HOST_CALL jsTestObjConstructorFunctionClassMethod(ExecState* exec)
{
- JSValue thisValue = exec->hostThisValue();
- if (!thisValue.inherits(&JSTestObj::s_info))
- return throwVMTypeError(exec);
- JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
- ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
- TestObj* imp = static_cast<TestObj*>(castedThis->impl());
- imp->classMethod();
+ TestObj::classMethod();
return JSValue::encode(jsUndefined());
}
-EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionClassMethodWithOptional(ExecState* exec)
+EncodedJSValue JSC_HOST_CALL jsTestObjConstructorFunctionClassMethodWithOptional(ExecState* exec)
{
- JSValue thisValue = exec->hostThisValue();
- if (!thisValue.inherits(&JSTestObj::s_info))
- return throwVMTypeError(exec);
- JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
- ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
- TestObj* imp = static_cast<TestObj*>(castedThis->impl());
size_t argsCount = exec->argumentCount();
if (argsCount <= 0) {
- JSC::JSValue result = jsNumber(imp->classMethodWithOptional());
+ JSC::JSValue result = jsNumber(TestObj::classMethodWithOptional());
return JSValue::encode(result);
}
- int arg(exec->argument(0).toInt32(exec));
+ int arg(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined).toInt32(exec));
if (exec->hadException())
return JSValue::encode(jsUndefined());
- JSC::JSValue result = jsNumber(imp->classMethodWithOptional(arg));
+ JSC::JSValue result = jsNumber(TestObj::classMethodWithOptional(arg));
return JSValue::encode(result);
}
void JSTestObj::visitChildren(JSCell* cell, SlotVisitor& visitor)
{
- JSTestObj* thisObject = static_cast<JSTestObj*>(cell);
+ JSTestObj* thisObject = jsCast<JSTestObj*>(cell);
ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
COMPILE_ASSERT(StructureFlags & OverridesVisitChildren, OverridesVisitChildrenWithoutSettingFlag);
ASSERT(thisObject->structure()->typeInfo().overridesVisitChildren());
// Constant getters
+#if ENABLE(Condition1)
+JSValue jsTestObjCONDITIONAL_CONST(ExecState* exec, JSValue, const Identifier&)
+{
+ UNUSED_PARAM(exec);
+ return jsNumber(static_cast<int>(0));
+}
+
+#endif
JSValue jsTestObjCONST_VALUE_0(ExecState* exec, JSValue, const Identifier&)
{
UNUSED_PARAM(exec);
return jsNumber(static_cast<int>(0x1abc));
}
+JSValue jsTestObjCONST_JAVASCRIPT(ExecState* exec, JSValue, const Identifier&)
+{
+ UNUSED_PARAM(exec);
+ return jsNumber(static_cast<int>(15));
+}
+
+static inline bool isObservable(JSTestObj* jsTestObj)
+{
+ if (jsTestObj->hasCustomProperties())
+ return true;
+ return false;
+}
+
+bool JSTestObjOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor)
+{
+ JSTestObj* jsTestObj = static_cast<JSTestObj*>(handle.get().asCell());
+ if (!isObservable(jsTestObj))
+ return false;
+ UNUSED_PARAM(visitor);
+ return false;
+}
+
+void JSTestObjOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context)
+{
+ JSTestObj* jsTestObj = static_cast<JSTestObj*>(handle.get().asCell());
+ DOMWrapperWorld* world = static_cast<DOMWrapperWorld*>(context);
+ uncacheWrapper(world, jsTestObj->impl(), jsTestObj);
+ jsTestObj->releaseImpl();
+}
+
JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, TestObj* impl)
{
return wrap<JSTestObj>(exec, globalObject, impl);