void JSTestTypedefsOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context) { JSTestTypedefs* jsTestTypedefs = jsCast<JSTestTypedefs*>(handle.slot()->asCell()); DOMWrapperWorld& world = *static_cast<DOMWrapperWorld*>(context); uncacheWrapper(world, &jsTestTypedefs->impl(), jsTestTypedefs); jsTestTypedefs->releaseImpl(); }
void setJSTestTypedefsStringAttrWithGetterException(ExecState* exec, JSObject* thisObject, JSValue value) { UNUSED_PARAM(exec); JSTestTypedefs* castedThis = jsCast<JSTestTypedefs*>(thisObject); TestTypedefs& impl = castedThis->impl(); const String& nativeValue(value.isEmpty() ? String() : value.toString(exec)->value(exec)); if (exec->hadException()) return; impl.setStringAttrWithGetterException(nativeValue); }
void setJSTestTypedefsAttrWithGetterException(ExecState* exec, JSObject* thisObject, JSValue value) { UNUSED_PARAM(exec); JSTestTypedefs* castedThis = jsCast<JSTestTypedefs*>(thisObject); TestTypedefs& impl = castedThis->impl(); int nativeValue(toInt32(exec, value, NormalConversion)); if (exec->hadException()) return; impl.setAttrWithGetterException(nativeValue); }
void setJSTestTypedefsImmutableSerializedScriptValue(ExecState* exec, JSObject* thisObject, JSValue value) { UNUSED_PARAM(exec); JSTestTypedefs* castedThis = jsCast<JSTestTypedefs*>(thisObject); TestTypedefs& impl = castedThis->impl(); RefPtr<SerializedScriptValue> nativeValue(SerializedScriptValue::create(exec, value, 0, 0)); if (exec->hadException()) return; impl.setImmutableSerializedScriptValue(nativeValue); }
void setJSTestTypedefsUnsignedLongLongAttr(ExecState* exec, JSObject* thisObject, JSValue value) { UNUSED_PARAM(exec); JSTestTypedefs* castedThis = jsCast<JSTestTypedefs*>(thisObject); TestTypedefs& impl = castedThis->impl(); unsigned long long nativeValue(toUInt64(exec, value, NormalConversion)); if (exec->hadException()) return; impl.setUnsignedLongLongAttr(nativeValue); }
EncodedJSValue jsTestTypedefsStringAttrWithSetterException(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName) { JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(JSValue::decode(thisValue)); UNUSED_PARAM(slotBase); if (!castedThis) return throwVMTypeError(exec); UNUSED_PARAM(exec); TestTypedefs& impl = castedThis->impl(); JSValue result = jsStringWithCache(exec, impl.stringAttrWithSetterException()); return JSValue::encode(result); }
EncodedJSValue jsTestTypedefsImmutableSerializedScriptValue(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName) { JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(JSValue::decode(thisValue)); UNUSED_PARAM(slotBase); if (!castedThis) return throwVMTypeError(exec); UNUSED_PARAM(exec); TestTypedefs& impl = castedThis->impl(); JSValue result = impl.immutableSerializedScriptValue() ? impl.immutableSerializedScriptValue()->deserialize(exec, castedThis->globalObject(), 0) : jsNull(); return JSValue::encode(result); }
EncodedJSValue jsTestTypedefsUnsignedLongLongAttr(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName) { JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(JSValue::decode(thisValue)); UNUSED_PARAM(slotBase); if (!castedThis) return throwVMTypeError(exec); UNUSED_PARAM(exec); TestTypedefs& impl = castedThis->impl(); JSValue result = jsNumber(impl.unsignedLongLongAttr()); return JSValue::encode(result); }
EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionImmutablePointFunction(ExecState* exec) { JSValue thisValue = exec->thisValue(); JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue); if (UNLIKELY(!castedThis)) return throwThisTypeError(*exec, "TestTypedefs", "immutablePointFunction"); ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestTypedefs::info()); auto& impl = castedThis->impl(); JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(SVGPropertyTearOff<SVGPoint>::create(impl.immutablePointFunction()))); return JSValue::encode(result); }
EncodedJSValue jsTestTypedefsAttrWithGetterException(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName) { JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(JSValue::decode(thisValue)); UNUSED_PARAM(slotBase); if (!castedThis) return throwVMTypeError(exec); ExceptionCode ec = 0; TestTypedefs& impl = castedThis->impl(); JSC::JSValue result = jsNumber(impl.attrWithGetterException(ec)); setDOMException(exec, ec); return JSValue::encode(result); }
EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionMethodWithException(ExecState* exec) { JSValue thisValue = exec->thisValue(); JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue); if (UNLIKELY(!castedThis)) return throwThisTypeError(*exec, "TestTypedefs", "methodWithException"); ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestTypedefs::info()); auto& impl = castedThis->impl(); ExceptionCode ec = 0; impl.methodWithException(ec); setDOMException(exec, ec); return JSValue::encode(jsUndefined()); }
void setJSTestTypedefsAttrWithGetterException(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue) { JSValue value = JSValue::decode(encodedValue); UNUSED_PARAM(exec); JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(JSValue::decode(thisValue)); if (!castedThis) { throwVMTypeError(exec); return; } TestTypedefs& impl = castedThis->impl(); int nativeValue(toInt32(exec, value, NormalConversion)); if (exec->hadException()) return; impl.setAttrWithGetterException(nativeValue); }
void setJSTestTypedefsImmutableSerializedScriptValue(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue) { JSValue value = JSValue::decode(encodedValue); UNUSED_PARAM(exec); JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(JSValue::decode(thisValue)); if (!castedThis) { throwVMTypeError(exec); return; } TestTypedefs& impl = castedThis->impl(); RefPtr<SerializedScriptValue> nativeValue(SerializedScriptValue::create(exec, value, 0, 0)); if (exec->hadException()) return; impl.setImmutableSerializedScriptValue(nativeValue); }
void setJSTestTypedefsStringAttrWithGetterException(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue) { JSValue value = JSValue::decode(encodedValue); UNUSED_PARAM(exec); JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(JSValue::decode(thisValue)); if (!castedThis) { throwVMTypeError(exec); return; } TestTypedefs& impl = castedThis->impl(); const String& nativeValue(value.isEmpty() ? String() : value.toString(exec)->value(exec)); if (exec->hadException()) return; impl.setStringAttrWithGetterException(nativeValue); }
void setJSTestTypedefsUnsignedLongLongAttr(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue) { JSValue value = JSValue::decode(encodedValue); UNUSED_PARAM(exec); JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(JSValue::decode(thisValue)); if (!castedThis) { throwVMTypeError(exec); return; } TestTypedefs& impl = castedThis->impl(); unsigned long long nativeValue(toUInt64(exec, value, NormalConversion)); if (exec->hadException()) return; impl.setUnsignedLongLongAttr(nativeValue); }
EncodedJSValue jsTestTypedefsStringAttrWithSetterException(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName) { UNUSED_PARAM(exec); UNUSED_PARAM(slotBase); UNUSED_PARAM(thisValue); JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(JSValue::decode(thisValue)); if (UNLIKELY(!castedThis)) { if (jsDynamicCast<JSTestTypedefsPrototype*>(slotBase)) return reportDeprecatedGetterError(*exec, "TestTypedefs", "stringAttrWithSetterException"); return throwGetterTypeError(*exec, "TestTypedefs", "stringAttrWithSetterException"); } auto& impl = castedThis->impl(); JSValue result = jsStringWithCache(exec, impl.stringAttrWithSetterException()); return JSValue::encode(result); }
EncodedJSValue jsTestTypedefsImmutableSerializedScriptValue(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName) { UNUSED_PARAM(exec); UNUSED_PARAM(slotBase); UNUSED_PARAM(thisValue); JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(JSValue::decode(thisValue)); if (UNLIKELY(!castedThis)) { if (jsDynamicCast<JSTestTypedefsPrototype*>(slotBase)) return reportDeprecatedGetterError(*exec, "TestTypedefs", "immutableSerializedScriptValue"); return throwGetterTypeError(*exec, "TestTypedefs", "immutableSerializedScriptValue"); } auto& impl = castedThis->impl(); JSValue result = impl.immutableSerializedScriptValue() ? impl.immutableSerializedScriptValue()->deserialize(exec, castedThis->globalObject(), 0) : jsNull(); return JSValue::encode(result); }
EncodedJSValue jsTestTypedefsUnsignedLongLongAttr(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName) { UNUSED_PARAM(exec); UNUSED_PARAM(slotBase); UNUSED_PARAM(thisValue); JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(JSValue::decode(thisValue)); if (UNLIKELY(!castedThis)) { if (jsDynamicCast<JSTestTypedefsPrototype*>(slotBase)) return reportDeprecatedGetterError(*exec, "TestTypedefs", "unsignedLongLongAttr"); return throwGetterTypeError(*exec, "TestTypedefs", "unsignedLongLongAttr"); } auto& impl = castedThis->impl(); JSValue result = jsNumber(impl.unsignedLongLongAttr()); return JSValue::encode(result); }
EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionNullableArrayArg(ExecState* exec) { JSValue thisValue = exec->thisValue(); JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue); if (UNLIKELY(!castedThis)) return throwThisTypeError(*exec, "TestTypedefs", "nullableArrayArg"); ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestTypedefs::info()); auto& impl = castedThis->impl(); if (UNLIKELY(exec->argumentCount() < 1)) return throwVMError(exec, createNotEnoughArgumentsError(exec)); Vector<String> arrayArg(toNativeArray<String>(exec, exec->argument(0))); if (UNLIKELY(exec->hadException())) return JSValue::encode(jsUndefined()); impl.nullableArrayArg(arrayArg); return JSValue::encode(jsUndefined()); }
EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionCallWithSequenceThatRequiresInclude(ExecState* exec) { JSValue thisValue = exec->thisValue(); JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue); if (UNLIKELY(!castedThis)) return throwThisTypeError(*exec, "TestTypedefs", "callWithSequenceThatRequiresInclude"); ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestTypedefs::info()); auto& impl = castedThis->impl(); if (UNLIKELY(exec->argumentCount() < 1)) return throwVMError(exec, createNotEnoughArgumentsError(exec)); Vector<RefPtr<TestEventTarget>> sequenceArg((toRefPtrNativeArray<TestEventTarget, JSTestEventTarget>(exec, exec->argument(0), &JSTestEventTarget::toWrapped))); if (UNLIKELY(exec->hadException())) return JSValue::encode(jsUndefined()); JSValue result = jsBoolean(impl.callWithSequenceThatRequiresInclude(sequenceArg)); return JSValue::encode(result); }
EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionMethodWithSequenceArg(ExecState* exec) { JSValue thisValue = exec->thisValue(); JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue); if (UNLIKELY(!castedThis)) return throwThisTypeError(*exec, "TestTypedefs", "methodWithSequenceArg"); ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestTypedefs::info()); auto& impl = castedThis->impl(); if (UNLIKELY(exec->argumentCount() < 1)) return throwVMError(exec, createNotEnoughArgumentsError(exec)); Vector<RefPtr<SerializedScriptValue>> sequenceArg((toRefPtrNativeArray<SerializedScriptValue, JSSerializedScriptValue>(exec, exec->argument(0), &JSSerializedScriptValue::toWrapped))); if (UNLIKELY(exec->hadException())) return JSValue::encode(jsUndefined()); JSValue result = jsNumber(impl.methodWithSequenceArg(sequenceArg)); return JSValue::encode(result); }
EncodedJSValue jsTestTypedefsAttrWithGetterException(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName) { UNUSED_PARAM(exec); UNUSED_PARAM(slotBase); UNUSED_PARAM(thisValue); JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(JSValue::decode(thisValue)); if (UNLIKELY(!castedThis)) { if (jsDynamicCast<JSTestTypedefsPrototype*>(slotBase)) return reportDeprecatedGetterError(*exec, "TestTypedefs", "attrWithGetterException"); return throwGetterTypeError(*exec, "TestTypedefs", "attrWithGetterException"); } ExceptionCode ec = 0; auto& impl = castedThis->impl(); JSValue result = jsNumber(impl.attrWithGetterException(ec)); setDOMException(exec, ec); return JSValue::encode(result); }
EncodedJSValue jsTestTypedefsStringAttrWithSetterException(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName) { JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(JSValue::decode(thisValue)); UNUSED_PARAM(slotBase); if (!castedThis) { if (jsDynamicCast<JSTestTypedefsPrototype*>(slotBase)) { ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext(); scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'stringAttrWithSetterException' on a non-TestTypedefs object.")); return JSValue::encode(jsUndefined()); } return throwVMTypeError(exec); } UNUSED_PARAM(exec); TestTypedefs& impl = castedThis->impl(); JSValue result = jsStringWithCache(exec, impl.stringAttrWithSetterException()); return JSValue::encode(result); }
EncodedJSValue jsTestTypedefsImmutableSerializedScriptValue(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName) { JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(JSValue::decode(thisValue)); UNUSED_PARAM(slotBase); if (!castedThis) { if (jsDynamicCast<JSTestTypedefsPrototype*>(slotBase)) { ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext(); scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'immutableSerializedScriptValue' on a non-TestTypedefs object.")); return JSValue::encode(jsUndefined()); } return throwVMTypeError(exec); } UNUSED_PARAM(exec); TestTypedefs& impl = castedThis->impl(); JSValue result = impl.immutableSerializedScriptValue() ? impl.immutableSerializedScriptValue()->deserialize(exec, castedThis->globalObject(), 0) : jsNull(); return JSValue::encode(result); }
void setJSTestTypedefsUnsignedLongLongAttr(ExecState* exec, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue) { JSValue value = JSValue::decode(encodedValue); UNUSED_PARAM(baseObject); JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(JSValue::decode(thisValue)); if (UNLIKELY(!castedThis)) { if (jsDynamicCast<JSTestTypedefsPrototype*>(JSValue::decode(thisValue))) reportDeprecatedSetterError(*exec, "TestTypedefs", "unsignedLongLongAttr"); else throwSetterTypeError(*exec, "TestTypedefs", "unsignedLongLongAttr"); return; } TestTypedefs& impl = castedThis->impl(); unsigned long long nativeValue(toUInt64(exec, value, NormalConversion)); if (UNLIKELY(exec->hadException())) return; impl.setUnsignedLongLongAttr(nativeValue); }
void setJSTestTypedefsImmutableSerializedScriptValue(ExecState* exec, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue) { JSValue value = JSValue::decode(encodedValue); UNUSED_PARAM(baseObject); JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(JSValue::decode(thisValue)); if (UNLIKELY(!castedThis)) { if (jsDynamicCast<JSTestTypedefsPrototype*>(JSValue::decode(thisValue))) reportDeprecatedSetterError(*exec, "TestTypedefs", "immutableSerializedScriptValue"); else throwSetterTypeError(*exec, "TestTypedefs", "immutableSerializedScriptValue"); return; } auto& impl = castedThis->impl(); RefPtr<SerializedScriptValue> nativeValue(SerializedScriptValue::create(exec, value, 0, 0)); if (UNLIKELY(exec->hadException())) return; impl.setImmutableSerializedScriptValue(nativeValue); }
void setJSTestTypedefsAttrWithGetterException(ExecState* exec, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue) { JSValue value = JSValue::decode(encodedValue); UNUSED_PARAM(baseObject); JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(JSValue::decode(thisValue)); if (UNLIKELY(!castedThis)) { if (jsDynamicCast<JSTestTypedefsPrototype*>(JSValue::decode(thisValue))) reportDeprecatedSetterError(*exec, "TestTypedefs", "attrWithGetterException"); else throwSetterTypeError(*exec, "TestTypedefs", "attrWithGetterException"); return; } auto& impl = castedThis->impl(); int nativeValue(toInt32(exec, value, NormalConversion)); if (UNLIKELY(exec->hadException())) return; impl.setAttrWithGetterException(nativeValue); }
void setJSTestTypedefsStringAttrWithGetterException(ExecState* exec, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue) { JSValue value = JSValue::decode(encodedValue); UNUSED_PARAM(baseObject); JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(JSValue::decode(thisValue)); if (UNLIKELY(!castedThis)) { if (jsDynamicCast<JSTestTypedefsPrototype*>(JSValue::decode(thisValue))) reportDeprecatedSetterError(*exec, "TestTypedefs", "stringAttrWithGetterException"); else throwSetterTypeError(*exec, "TestTypedefs", "stringAttrWithGetterException"); return; } auto& impl = castedThis->impl(); const String& nativeValue(value.isEmpty() ? String() : value.toString(exec)->value(exec)); if (UNLIKELY(exec->hadException())) return; impl.setStringAttrWithGetterException(nativeValue); }
EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionStringArrayFunction2(ExecState* exec) { JSValue thisValue = exec->thisValue(); JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue); if (UNLIKELY(!castedThis)) return throwThisTypeError(*exec, "TestTypedefs", "stringArrayFunction2"); ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestTypedefs::info()); auto& impl = castedThis->impl(); if (UNLIKELY(exec->argumentCount() < 1)) return throwVMError(exec, createNotEnoughArgumentsError(exec)); ExceptionCode ec = 0; Vector<String> values(toNativeArray<String>(exec, exec->argument(0))); if (UNLIKELY(exec->hadException())) return JSValue::encode(jsUndefined()); JSValue result = jsArray(exec, castedThis->globalObject(), impl.stringArrayFunction2(values, ec)); setDOMException(exec, ec); return JSValue::encode(result); }
void setJSTestTypedefsStringAttrWithSetterException(ExecState* state, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue) { JSValue value = JSValue::decode(encodedValue); UNUSED_PARAM(baseObject); JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(JSValue::decode(thisValue)); if (UNLIKELY(!castedThis)) { if (jsDynamicCast<JSTestTypedefsPrototype*>(JSValue::decode(thisValue))) reportDeprecatedSetterError(*state, "TestTypedefs", "stringAttrWithSetterException"); else throwSetterTypeError(*state, "TestTypedefs", "stringAttrWithSetterException"); return; } auto& impl = castedThis->impl(); ExceptionCode ec = 0; String nativeValue = value.toString(state)->value(state); if (UNLIKELY(state->hadException())) return; impl.setStringAttrWithSetterException(nativeValue, ec); setDOMException(state, ec); }