X-Git-Url: http://git.webkit.org/?p=WebKit-https.git;a=blobdiff_plain;f=Source%2FWebCore%2Fbindings%2Fscripts%2Ftest%2FJS%2FJSTestEventTarget.cpp;h=4f4b56673ef219bd99995249ea7972986c9e9b48;hp=e70726ab07caf51bbd10f600984a0fe7f3599013;hb=62ab9550bd17d1e805fe152b80bb296c360641f2;hpb=e8dc331a332c6bf290044027c74c554813a2dccb diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp index e70726a..4f4b566 100644 --- a/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp +++ b/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp @@ -42,19 +42,19 @@ namespace WebCore { static const HashTableValue JSTestEventTargetTableValues[] = { - { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast(jsTestEventTargetConstructor), (intptr_t)0, NoIntrinsic }, - { 0, 0, 0, 0, NoIntrinsic } + { "constructor", DontEnum | ReadOnly, NoIntrinsic, (intptr_t)static_cast(jsTestEventTargetConstructor), (intptr_t) static_cast(0) }, + { 0, 0, NoIntrinsic, 0, 0 } }; -static const HashTable JSTestEventTargetTable = { 2, 1, JSTestEventTargetTableValues, 0 }; +static const HashTable JSTestEventTargetTable = { 2, 1, true, JSTestEventTargetTableValues, 0 }; /* Hash table for constructor */ static const HashTableValue JSTestEventTargetConstructorTableValues[] = { - { 0, 0, 0, 0, NoIntrinsic } + { 0, 0, NoIntrinsic, 0, 0 } }; -static const HashTable JSTestEventTargetConstructorTable = { 1, 0, JSTestEventTargetConstructorTableValues, 0 }; +static const HashTable JSTestEventTargetConstructorTable = { 1, 0, false, JSTestEventTargetConstructorTableValues, 0 }; const ClassInfo JSTestEventTargetConstructor::s_info = { "TestEventTargetConstructor", &Base::s_info, &JSTestEventTargetConstructorTable, 0, CREATE_METHOD_TABLE(JSTestEventTargetConstructor) }; JSTestEventTargetConstructor::JSTestEventTargetConstructor(Structure* structure, JSDOMGlobalObject* globalObject) @@ -62,52 +62,42 @@ JSTestEventTargetConstructor::JSTestEventTargetConstructor(Structure* structure, { } -void JSTestEventTargetConstructor::finishCreation(ExecState* exec, JSDOMGlobalObject* globalObject) +void JSTestEventTargetConstructor::finishCreation(VM& vm, JSDOMGlobalObject* globalObject) { - Base::finishCreation(exec->globalData()); - ASSERT(inherits(&s_info)); - putDirect(exec->globalData(), exec->propertyNames().prototype, JSTestEventTargetPrototype::self(exec, globalObject), DontDelete | ReadOnly); + Base::finishCreation(vm); + ASSERT(inherits(info())); + putDirect(vm, vm.propertyNames->prototype, JSTestEventTargetPrototype::self(vm, globalObject), DontDelete | ReadOnly); + putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontDelete | DontEnum); } -bool JSTestEventTargetConstructor::getOwnPropertySlot(JSCell* cell, ExecState* exec, PropertyName propertyName, PropertySlot& slot) +bool JSTestEventTargetConstructor::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot& slot) { - return getStaticValueSlot(exec, &JSTestEventTargetConstructorTable, jsCast(cell), propertyName, slot); -} - -bool JSTestEventTargetConstructor::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, PropertyName propertyName, PropertyDescriptor& descriptor) -{ - return getStaticValueDescriptor(exec, &JSTestEventTargetConstructorTable, jsCast(object), propertyName, descriptor); + return getStaticValueSlot(exec, JSTestEventTargetConstructorTable, jsCast(object), propertyName, slot); } /* Hash table for prototype */ static const HashTableValue JSTestEventTargetPrototypeTableValues[] = { - { "item", DontDelete | JSC::Function, (intptr_t)static_cast(jsTestEventTargetPrototypeFunctionItem), (intptr_t)1, NoIntrinsic }, - { "addEventListener", DontDelete | JSC::Function, (intptr_t)static_cast(jsTestEventTargetPrototypeFunctionAddEventListener), (intptr_t)3, NoIntrinsic }, - { "removeEventListener", DontDelete | JSC::Function, (intptr_t)static_cast(jsTestEventTargetPrototypeFunctionRemoveEventListener), (intptr_t)3, NoIntrinsic }, - { "dispatchEvent", DontDelete | JSC::Function, (intptr_t)static_cast(jsTestEventTargetPrototypeFunctionDispatchEvent), (intptr_t)1, NoIntrinsic }, - { 0, 0, 0, 0, NoIntrinsic } + { "item", JSC::Function, NoIntrinsic, (intptr_t)static_cast(jsTestEventTargetPrototypeFunctionItem), (intptr_t) (1) }, + { "addEventListener", JSC::Function, NoIntrinsic, (intptr_t)static_cast(jsTestEventTargetPrototypeFunctionAddEventListener), (intptr_t) (2) }, + { "removeEventListener", JSC::Function, NoIntrinsic, (intptr_t)static_cast(jsTestEventTargetPrototypeFunctionRemoveEventListener), (intptr_t) (2) }, + { "dispatchEvent", JSC::Function, NoIntrinsic, (intptr_t)static_cast(jsTestEventTargetPrototypeFunctionDispatchEvent), (intptr_t) (1) }, + { 0, 0, NoIntrinsic, 0, 0 } }; -static const HashTable JSTestEventTargetPrototypeTable = { 8, 7, JSTestEventTargetPrototypeTableValues, 0 }; +static const HashTable JSTestEventTargetPrototypeTable = { 8, 7, false, JSTestEventTargetPrototypeTableValues, 0 }; const ClassInfo JSTestEventTargetPrototype::s_info = { "TestEventTargetPrototype", &Base::s_info, &JSTestEventTargetPrototypeTable, 0, CREATE_METHOD_TABLE(JSTestEventTargetPrototype) }; -JSObject* JSTestEventTargetPrototype::self(ExecState* exec, JSGlobalObject* globalObject) -{ - return getDOMPrototype(exec, globalObject); -} - -bool JSTestEventTargetPrototype::getOwnPropertySlot(JSCell* cell, ExecState* exec, PropertyName propertyName, PropertySlot& slot) +JSObject* JSTestEventTargetPrototype::self(VM& vm, JSGlobalObject* globalObject) { - JSTestEventTargetPrototype* thisObject = jsCast(cell); - return getStaticFunctionSlot(exec, &JSTestEventTargetPrototypeTable, thisObject, propertyName, slot); + return getDOMPrototype(vm, globalObject); } -bool JSTestEventTargetPrototype::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, PropertyName propertyName, PropertyDescriptor& descriptor) +bool JSTestEventTargetPrototype::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot& slot) { JSTestEventTargetPrototype* thisObject = jsCast(object); - return getStaticFunctionDescriptor(exec, &JSTestEventTargetPrototypeTable, thisObject, propertyName, descriptor); + return getStaticFunctionSlot(exec, JSTestEventTargetPrototypeTable, thisObject, propertyName, slot); } const ClassInfo JSTestEventTarget::s_info = { "TestEventTarget", &Base::s_info, &JSTestEventTargetTable, 0 , CREATE_METHOD_TABLE(JSTestEventTarget) }; @@ -118,15 +108,15 @@ JSTestEventTarget::JSTestEventTarget(Structure* structure, JSDOMGlobalObject* gl { } -void JSTestEventTarget::finishCreation(JSGlobalData& globalData) +void JSTestEventTarget::finishCreation(VM& vm) { - Base::finishCreation(globalData); - ASSERT(inherits(&s_info)); + Base::finishCreation(vm); + ASSERT(inherits(info())); } -JSObject* JSTestEventTarget::createPrototype(ExecState* exec, JSGlobalObject* globalObject) +JSObject* JSTestEventTarget::createPrototype(VM& vm, JSGlobalObject* globalObject) { - return JSTestEventTargetPrototype::create(exec->globalData(), globalObject, JSTestEventTargetPrototype::createStructure(globalObject->globalData(), globalObject, globalObject->objectPrototype())); + return JSTestEventTargetPrototype::create(vm, globalObject, JSTestEventTargetPrototype::createStructure(vm, globalObject, globalObject->objectPrototype())); } void JSTestEventTarget::destroy(JSC::JSCell* cell) @@ -140,98 +130,77 @@ JSTestEventTarget::~JSTestEventTarget() releaseImplIfNotNull(); } -bool JSTestEventTarget::getOwnPropertySlot(JSCell* cell, ExecState* exec, PropertyName propertyName, PropertySlot& slot) +bool JSTestEventTarget::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot& slot) { - JSTestEventTarget* thisObject = jsCast(cell); - ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info); + JSTestEventTarget* thisObject = jsCast(object); + ASSERT_GC_OBJECT_INHERITS(thisObject, info()); const HashEntry* entry = getStaticValueSlotEntryWithoutCaching(exec, propertyName); if (entry) { - slot.setCustom(thisObject, entry->propertyGetter()); + slot.setCustom(thisObject, entry->attributes(), entry->propertyGetter()); return true; } unsigned index = propertyName.asIndex(); - if (index != PropertyName::NotAnIndex && index < static_cast(thisObject->impl())->length()) { - slot.setCustomIndex(thisObject, index, indexGetter); + if (index != PropertyName::NotAnIndex && index < thisObject->impl().length()) { + unsigned attributes = DontDelete | ReadOnly; + slot.setCustomIndex(thisObject, attributes, index, indexGetter); return true; } - if (canGetItemsForName(exec, static_cast(thisObject->impl()), propertyName)) { - slot.setCustom(thisObject, thisObject->nameGetter); + if (canGetItemsForName(exec, &thisObject->impl(), propertyName)) { + slot.setCustom(thisObject, ReadOnly | DontDelete | DontEnum, thisObject->nameGetter); return true; } - return getStaticValueSlot(exec, &JSTestEventTargetTable, thisObject, propertyName, slot); + return getStaticValueSlot(exec, JSTestEventTargetTable, thisObject, propertyName, slot); } -bool JSTestEventTarget::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, PropertyName propertyName, PropertyDescriptor& descriptor) +bool JSTestEventTarget::getOwnPropertySlotByIndex(JSObject* object, ExecState* exec, unsigned index, PropertySlot& slot) { JSTestEventTarget* thisObject = jsCast(object); - ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info); - const HashEntry* entry = JSTestEventTargetTable.entry(exec, propertyName); - if (entry) { - PropertySlot slot; - slot.setCustom(thisObject, entry->propertyGetter()); - descriptor.setDescriptor(slot.getValue(exec, propertyName), entry->attributes()); - return true; - } - unsigned index = propertyName.asIndex(); - if (index != PropertyName::NotAnIndex && index < static_cast(thisObject->impl())->length()) { - PropertySlot slot; - slot.setCustomIndex(thisObject, index, indexGetter); - descriptor.setDescriptor(slot.getValue(exec, propertyName), DontDelete | ReadOnly); - return true; - } - if (canGetItemsForName(exec, static_cast(thisObject->impl()), propertyName)) { - PropertySlot slot; - slot.setCustom(thisObject, nameGetter); - descriptor.setDescriptor(slot.getValue(exec, propertyName), ReadOnly | DontDelete | DontEnum); - return true; - } - return getStaticValueDescriptor(exec, &JSTestEventTargetTable, thisObject, propertyName, descriptor); -} - -bool JSTestEventTarget::getOwnPropertySlotByIndex(JSCell* cell, ExecState* exec, unsigned index, PropertySlot& slot) -{ - JSTestEventTarget* thisObject = jsCast(cell); - ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info); - if (index < static_cast(thisObject->impl())->length()) { - slot.setCustomIndex(thisObject, index, thisObject->indexGetter); + ASSERT_GC_OBJECT_INHERITS(thisObject, info()); + if (index < thisObject->impl().length()) { + unsigned attributes = DontDelete | ReadOnly; + slot.setCustomIndex(thisObject, attributes, index, thisObject->indexGetter); return true; } PropertyName propertyName = Identifier::from(exec, index); - if (canGetItemsForName(exec, static_cast(thisObject->impl()), propertyName)) { - slot.setCustom(thisObject, thisObject->nameGetter); + if (canGetItemsForName(exec, &thisObject->impl(), propertyName)) { + slot.setCustom(thisObject, ReadOnly | DontDelete | DontEnum, thisObject->nameGetter); return true; } return Base::getOwnPropertySlotByIndex(thisObject, exec, index, slot); } -JSValue jsTestEventTargetConstructor(ExecState* exec, JSValue slotBase, PropertyName) +EncodedJSValue jsTestEventTargetConstructor(ExecState* exec, JSObject* baseValue, EncodedJSValue thisValue, PropertyName) { - JSTestEventTarget* domObject = jsCast(asObject(slotBase)); - return JSTestEventTarget::getConstructor(exec, domObject->globalObject()); + UNUSED_PARAM(baseValue); + UNUSED_PARAM(thisValue); + JSTestEventTarget* domObject = jsDynamicCast(JSValue::decode(thisValue)); + if (!domObject) + return throwVMTypeError(exec); + return JSValue::encode(JSTestEventTarget::getConstructor(exec->vm(), domObject->globalObject())); } void JSTestEventTarget::getOwnPropertyNames(JSObject* object, ExecState* exec, PropertyNameArray& propertyNames, EnumerationMode mode) { JSTestEventTarget* thisObject = jsCast(object); - ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info); - for (unsigned i = 0; i < static_cast(thisObject->impl())->length(); ++i) + ASSERT_GC_OBJECT_INHERITS(thisObject, info()); + for (unsigned i = 0, count = thisObject->impl().length(); i < count; ++i) propertyNames.add(Identifier::from(exec, i)); Base::getOwnPropertyNames(thisObject, exec, propertyNames, mode); } -JSValue JSTestEventTarget::getConstructor(ExecState* exec, JSGlobalObject* globalObject) +JSValue JSTestEventTarget::getConstructor(VM& vm, JSGlobalObject* globalObject) { - return getDOMConstructor(exec, jsCast(globalObject)); + return getDOMConstructor(vm, jsCast(globalObject)); } EncodedJSValue JSC_HOST_CALL jsTestEventTargetPrototypeFunctionItem(ExecState* exec) { JSValue thisValue = exec->hostThisValue(); - if (!thisValue.inherits(&JSTestEventTarget::s_info)) + JSTestEventTarget* castedThis = jsDynamicCast(thisValue); + if (UNLIKELY(!castedThis)) return throwVMTypeError(exec); - JSTestEventTarget* castedThis = jsCast(asObject(thisValue)); - ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestEventTarget::s_info); - TestEventTarget* impl = static_cast(castedThis->impl()); + ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestEventTarget::info()); + TestEventTarget& impl = castedThis->impl(); if (exec->argumentCount() < 1) return throwVMError(exec, createNotEnoughArgumentsError(exec)); int index(toUInt32(exec, exec->argument(0), NormalConversion)); @@ -239,59 +208,58 @@ EncodedJSValue JSC_HOST_CALL jsTestEventTargetPrototypeFunctionItem(ExecState* e setDOMException(exec, INDEX_SIZE_ERR); return JSValue::encode(jsUndefined()); } - if (exec->hadException()) + if (UNLIKELY(exec->hadException())) return JSValue::encode(jsUndefined()); - - JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl->item(index))); + JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.item(index))); return JSValue::encode(result); } EncodedJSValue JSC_HOST_CALL jsTestEventTargetPrototypeFunctionAddEventListener(ExecState* exec) { JSValue thisValue = exec->hostThisValue(); - if (!thisValue.inherits(&JSTestEventTarget::s_info)) + JSTestEventTarget* castedThis = jsDynamicCast(thisValue); + if (UNLIKELY(!castedThis)) return throwVMTypeError(exec); - JSTestEventTarget* castedThis = jsCast(asObject(thisValue)); - ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestEventTarget::s_info); - TestEventTarget* impl = static_cast(castedThis->impl()); + ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestEventTarget::info()); + TestEventTarget& impl = castedThis->impl(); JSValue listener = exec->argument(1); if (!listener.isObject()) return JSValue::encode(jsUndefined()); - impl->addEventListener(exec->argument(0).toString(exec)->value(exec), JSEventListener::create(asObject(listener), castedThis, false, currentWorld(exec)), exec->argument(2).toBoolean(exec)); + impl.addEventListener(exec->argument(0).toString(exec)->value(exec), JSEventListener::create(asObject(listener), castedThis, false, currentWorld(exec)), exec->argument(2).toBoolean(exec)); return JSValue::encode(jsUndefined()); } EncodedJSValue JSC_HOST_CALL jsTestEventTargetPrototypeFunctionRemoveEventListener(ExecState* exec) { JSValue thisValue = exec->hostThisValue(); - if (!thisValue.inherits(&JSTestEventTarget::s_info)) + JSTestEventTarget* castedThis = jsDynamicCast(thisValue); + if (UNLIKELY(!castedThis)) return throwVMTypeError(exec); - JSTestEventTarget* castedThis = jsCast(asObject(thisValue)); - ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestEventTarget::s_info); - TestEventTarget* impl = static_cast(castedThis->impl()); + ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestEventTarget::info()); + TestEventTarget& impl = castedThis->impl(); JSValue listener = exec->argument(1); if (!listener.isObject()) return JSValue::encode(jsUndefined()); - impl->removeEventListener(exec->argument(0).toString(exec)->value(exec), JSEventListener::create(asObject(listener), castedThis, false, currentWorld(exec)).get(), exec->argument(2).toBoolean(exec)); + impl.removeEventListener(exec->argument(0).toString(exec)->value(exec), JSEventListener::create(asObject(listener), castedThis, false, currentWorld(exec)).get(), exec->argument(2).toBoolean(exec)); return JSValue::encode(jsUndefined()); } EncodedJSValue JSC_HOST_CALL jsTestEventTargetPrototypeFunctionDispatchEvent(ExecState* exec) { JSValue thisValue = exec->hostThisValue(); - if (!thisValue.inherits(&JSTestEventTarget::s_info)) + JSTestEventTarget* castedThis = jsDynamicCast(thisValue); + if (UNLIKELY(!castedThis)) return throwVMTypeError(exec); - JSTestEventTarget* castedThis = jsCast(asObject(thisValue)); - ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestEventTarget::s_info); - TestEventTarget* impl = static_cast(castedThis->impl()); + ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestEventTarget::info()); + TestEventTarget& impl = castedThis->impl(); if (exec->argumentCount() < 1) return throwVMError(exec, createNotEnoughArgumentsError(exec)); ExceptionCode ec = 0; Event* evt(toEvent(exec->argument(0))); - if (exec->hadException()) + if (UNLIKELY(exec->hadException())) return JSValue::encode(jsUndefined()); + JSValue result = jsBoolean(impl.dispatchEvent(evt, ec)); - JSC::JSValue result = jsBoolean(impl->dispatchEvent(evt, ec)); setDOMException(exec, ec); return JSValue::encode(result); } @@ -299,35 +267,26 @@ EncodedJSValue JSC_HOST_CALL jsTestEventTargetPrototypeFunctionDispatchEvent(Exe void JSTestEventTarget::visitChildren(JSCell* cell, SlotVisitor& visitor) { JSTestEventTarget* thisObject = jsCast(cell); - ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info); + ASSERT_GC_OBJECT_INHERITS(thisObject, info()); COMPILE_ASSERT(StructureFlags & OverridesVisitChildren, OverridesVisitChildrenWithoutSettingFlag); ASSERT(thisObject->structure()->typeInfo().overridesVisitChildren()); Base::visitChildren(thisObject, visitor); - thisObject->impl()->visitJSEventListeners(visitor); + thisObject->impl().visitJSEventListeners(visitor); } -JSValue JSTestEventTarget::indexGetter(ExecState* exec, JSValue slotBase, unsigned index) +EncodedJSValue JSTestEventTarget::indexGetter(ExecState* exec, JSObject* slotBase, EncodedJSValue, unsigned index) { - JSTestEventTarget* thisObj = jsCast(asObject(slotBase)); - ASSERT_GC_OBJECT_INHERITS(thisObj, &s_info); - return toJS(exec, thisObj->globalObject(), static_cast(thisObj->impl())->item(index)); -} - -static inline bool isObservable(JSTestEventTarget* jsTestEventTarget) -{ - if (jsTestEventTarget->hasCustomProperties()) - return true; - if (jsTestEventTarget->impl()->hasEventListeners()) - return true; - return false; + JSTestEventTarget* thisObj = jsCast(slotBase); + ASSERT_GC_OBJECT_INHERITS(thisObj, info()); + return JSValue::encode(toJS(exec, thisObj->globalObject(), thisObj->impl().item(index))); } bool JSTestEventTargetOwner::isReachableFromOpaqueRoots(JSC::Handle handle, void*, SlotVisitor& visitor) { JSTestEventTarget* jsTestEventTarget = jsCast(handle.get().asCell()); - if (!isObservable(jsTestEventTarget)) - return false; + if (jsTestEventTarget->impl().isFiringEventListeners()) + return true; UNUSED_PARAM(visitor); return false; } @@ -335,8 +294,8 @@ bool JSTestEventTargetOwner::isReachableFromOpaqueRoots(JSC::Handle handle, void* context) { JSTestEventTarget* jsTestEventTarget = jsCast(handle.get().asCell()); - DOMWrapperWorld* world = static_cast(context); - uncacheWrapper(world, jsTestEventTarget->impl(), jsTestEventTarget); + DOMWrapperWorld& world = *static_cast(context); + uncacheWrapper(world, &jsTestEventTarget->impl(), jsTestEventTarget); jsTestEventTarget->releaseImpl(); } @@ -352,7 +311,8 @@ JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, TestEve { if (!impl) return jsNull(); - if (JSValue result = getExistingWrapper(exec, impl)) return result; + if (JSValue result = getExistingWrapper(exec, impl)) + return result; #if ENABLE(BINDING_INTEGRITY) void* actualVTablePointer = *(reinterpret_cast(impl)); @@ -361,9 +321,15 @@ JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, TestEve #else void* expectedVTablePointer = &_ZTVN7WebCore15TestEventTargetE[2]; #if COMPILER(CLANG) + // If this fails TestEventTarget does not have a vtable, so you need to add the + // ImplementationLacksVTable attribute to the interface definition COMPILE_ASSERT(__is_polymorphic(TestEventTarget), TestEventTarget_is_not_polymorphic); #endif #endif + // If you hit this assertion you either have a use after free bug, or + // TestEventTarget has subclasses. If TestEventTarget has subclasses that get passed + // to toJS() we currently require TestEventTarget you to opt out of binding hardening + // by adding the SkipVTableValidation attribute to the interface IDL definition RELEASE_ASSERT(actualVTablePointer == expectedVTablePointer); #endif return createNewWrapper(exec, globalObject, impl); @@ -371,7 +337,7 @@ JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, TestEve TestEventTarget* toTestEventTarget(JSC::JSValue value) { - return value.inherits(&JSTestEventTarget::s_info) ? jsCast(asObject(value))->impl() : 0; + return value.inherits(JSTestEventTarget::info()) ? &jsCast(value)->impl() : 0; } }