void setJSTestInterfaceImplementsStr2(ExecState* exec, JSObject* thisObject, JSValue value) { UNUSED_PARAM(exec); JSTestInterface* castedThis = jsCast<JSTestInterface*>(thisObject); TestInterface* impl = static_cast<TestInterface*>(castedThis->impl()); const String& nativeValue(value.isEmpty() ? String() : value.toString(exec)->value(exec)); if (exec->hadException()) return; impl->setImplementsStr2(nativeValue); }
void setJSTestInterfaceSupplementalNode(ExecState* exec, JSObject* thisObject, JSValue value) { UNUSED_PARAM(exec); JSTestInterface* castedThis = jsCast<JSTestInterface*>(thisObject); TestInterface& impl = castedThis->impl(); Node* nativeValue(toNode(value)); if (exec->hadException()) return; TestSupplemental::setSupplementalNode(&impl, nativeValue); }
void JSTestInterface::putByIndex(JSCell* cell, ExecState* exec, unsigned index, JSValue value, bool shouldThrow) { JSTestInterface* thisObject = jsCast<JSTestInterface*>(cell); ASSERT_GC_OBJECT_INHERITS(thisObject, info()); PropertyName propertyName = Identifier::from(exec, index); PutPropertySlot slot(shouldThrow); if (thisObject->putDelegate(exec, propertyName, value, slot)) return; Base::putByIndex(cell, exec, index, value, shouldThrow); }
void setJSTestInterfaceSupplementalStr2(ExecState* exec, JSObject* thisObject, JSValue value) { UNUSED_PARAM(exec); JSTestInterface* castedThis = jsCast<JSTestInterface*>(thisObject); TestInterface& impl = castedThis->impl(); const String& nativeValue(value.isEmpty() ? String() : value.toString(exec)->value(exec)); if (exec->hadException()) return; TestSupplemental::setSupplementalStr2(&impl, nativeValue); }
bool JSTestInterfaceOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor) { JSTestInterface* jsTestInterface = static_cast<JSTestInterface*>(handle.get().asCell()); if (jsTestInterface->impl()->hasPendingActivity()) return true; if (!isObservable(jsTestInterface)) return false; UNUSED_PARAM(visitor); return false; }
EncodedJSValue JSC_HOST_CALL jsTestInterfacePrototypeFunctionSupplementalMethod1(ExecState* exec) { JSValue thisValue = exec->hostThisValue(); if (!thisValue.inherits(JSTestInterface::info())) return throwVMTypeError(exec); JSTestInterface* castedThis = jsCast<JSTestInterface*>(asObject(thisValue)); ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestInterface::info()); TestInterface* impl = static_cast<TestInterface*>(castedThis->impl()); TestSupplemental::supplementalMethod1(impl); return JSValue::encode(jsUndefined()); }
EncodedJSValue jsTestInterfaceSupplementalNode(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName) { JSTestInterface* castedThis = jsDynamicCast<JSTestInterface*>(JSValue::decode(thisValue)); UNUSED_PARAM(slotBase); if (!castedThis) return throwVMTypeError(exec); UNUSED_PARAM(exec); TestInterface& impl = castedThis->impl(); JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(TestSupplemental::supplementalNode(&impl))); return JSValue::encode(result); }
EncodedJSValue jsTestInterfaceSupplementalStr2(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName) { JSTestInterface* castedThis = jsDynamicCast<JSTestInterface*>(JSValue::decode(thisValue)); UNUSED_PARAM(slotBase); if (!castedThis) return throwVMTypeError(exec); UNUSED_PARAM(exec); TestInterface& impl = castedThis->impl(); JSValue result = jsStringWithCache(exec, TestSupplemental::supplementalStr2(&impl)); return JSValue::encode(result); }
EncodedJSValue JSC_HOST_CALL jsTestInterfacePrototypeFunctionSupplementalMethod1(ExecState* exec) { JSValue thisValue = exec->hostThisValue(); JSTestInterface* castedThis = jsDynamicCast<JSTestInterface*>(thisValue); if (!castedThis) return throwVMTypeError(exec); ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestInterface::info()); TestInterface& impl = castedThis->impl(); TestSupplemental::supplementalMethod1(&impl); return JSValue::encode(jsUndefined()); }
bool setJSTestInterfaceSupplementalStr3(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) { JSValue value = JSValue::decode(encodedValue); UNUSED_PARAM(thisValue); JSTestInterface* castedThis = jsDynamicCast<JSTestInterface*>(JSValue::decode(thisValue)); if (UNLIKELY(!castedThis)) { return throwSetterTypeError(*state, "TestInterface", "supplementalStr3"); } castedThis->setSupplementalStr3(*state, value); return true; }
void setJSTestInterfaceSupplementalStr3(ExecState* exec, JSObject* /* baseObject */, EncodedJSValue thisValue, EncodedJSValue encodedValue) { JSValue value = JSValue::decode(encodedValue); UNUSED_PARAM(exec); JSTestInterface* castedThis = jsDynamicCast<JSTestInterface*>(JSValue::decode(thisValue)); if (!castedThis) { throwVMTypeError(exec); return; } castedThis->setSupplementalStr3(exec, value); }
EncodedJSValue jsTestInterfaceSupplementalStr3(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName) { JSTestInterface* castedThis = jsDynamicCast<JSTestInterface*>(JSValue::decode(thisValue)); UNUSED_PARAM(slotBase); if (!castedThis) { if (jsDynamicCast<JSTestInterfacePrototype*>(slotBase)) { ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext(); scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'supplementalStr3' on a non-TestInterface object.")); return JSValue::encode(jsUndefined()); } return throwVMTypeError(exec); } return JSValue::encode(castedThis->supplementalStr3(exec)); }
void setJSTestInterfaceImplementsStr2(ExecState* exec, JSObject* /* baseObject */, EncodedJSValue thisValue, EncodedJSValue encodedValue) { JSValue value = JSValue::decode(encodedValue); UNUSED_PARAM(exec); JSTestInterface* castedThis = jsDynamicCast<JSTestInterface*>(JSValue::decode(thisValue)); if (!castedThis) { throwVMTypeError(exec); return; } TestInterface& impl = castedThis->impl(); const String& nativeValue(value.isEmpty() ? String() : value.toString(exec)->value(exec)); if (exec->hadException()) return; impl.setImplementsStr2(nativeValue); }
void setJSTestInterfaceImplementsNode(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue) { JSValue value = JSValue::decode(encodedValue); UNUSED_PARAM(exec); JSTestInterface* castedThis = jsDynamicCast<JSTestInterface*>(JSValue::decode(thisValue)); if (!castedThis) { throwVMTypeError(exec); return; } TestInterface& impl = castedThis->impl(); Node* nativeValue(toNode(value)); if (exec->hadException()) return; impl.setImplementsNode(nativeValue); }
bool setJSTestInterfaceSupplementalStr2(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) { JSValue value = JSValue::decode(encodedValue); UNUSED_PARAM(thisValue); JSTestInterface* castedThis = jsDynamicCast<JSTestInterface*>(JSValue::decode(thisValue)); if (UNLIKELY(!castedThis)) { return throwSetterTypeError(*state, "TestInterface", "supplementalStr2"); } auto& impl = castedThis->wrapped(); auto nativeValue = value.toWTFString(state); if (UNLIKELY(state->hadException())) return false; WebCore::TestSupplemental::setSupplementalStr2(impl, WTFMove(nativeValue)); return true; }
void setJSTestInterfaceSupplementalNode(ExecState* exec, JSObject* /* baseObject */, EncodedJSValue thisValue, EncodedJSValue encodedValue) { JSValue value = JSValue::decode(encodedValue); UNUSED_PARAM(exec); JSTestInterface* castedThis = jsDynamicCast<JSTestInterface*>(JSValue::decode(thisValue)); if (!castedThis) { throwVMTypeError(exec); return; } TestInterface& impl = castedThis->impl(); Node* nativeValue(toNode(value)); if (exec->hadException()) return; TestSupplemental::setSupplementalNode(&impl, nativeValue); }
EncodedJSValue jsTestInterfaceImplementsNode(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName) { JSTestInterface* castedThis = jsDynamicCast<JSTestInterface*>(JSValue::decode(thisValue)); UNUSED_PARAM(slotBase); if (!castedThis) { if (jsDynamicCast<JSTestInterfacePrototype*>(slotBase)) { ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext(); scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'implementsNode' on a non-TestInterface object.")); return JSValue::encode(jsUndefined()); } return throwVMTypeError(exec); } UNUSED_PARAM(exec); TestInterface& impl = castedThis->impl(); JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.implementsNode())); return JSValue::encode(result); }
bool setJSTestInterfaceSupplementalNode(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) { JSValue value = JSValue::decode(encodedValue); UNUSED_PARAM(thisValue); JSTestInterface* castedThis = jsDynamicCast<JSTestInterface*>(JSValue::decode(thisValue)); if (UNLIKELY(!castedThis)) { return throwSetterTypeError(*state, "TestInterface", "supplementalNode"); } auto& impl = castedThis->wrapped(); auto nativeValue = JSNode::toWrapped(value); if (UNLIKELY(!nativeValue)) { throwAttributeTypeError(*state, "TestInterface", "supplementalNode", "Node"); return false; } WebCore::TestSupplemental::setSupplementalNode(impl, *nativeValue); return true; }
JSValue jsTestInterfaceSupplementalStr3(ExecState* exec, JSValue slotBase, const Identifier&) { JSTestInterface* castedThis = static_cast<JSTestInterface*>(asObject(slotBase)); return castedThis->supplementalStr3(exec); }
void setJSTestInterfaceSupplementalNode(ExecState* exec, JSObject* thisObject, JSValue value) { JSTestInterface* castedThis = static_cast<JSTestInterface*>(thisObject); TestInterface* impl = static_cast<TestInterface*>(castedThis->impl()); TestSupplemental::setSupplementalNode(impl, toNode(value)); }
JSValue jsTestInterfaceConstructor(ExecState* exec, JSValue slotBase, const Identifier&) { JSTestInterface* domObject = static_cast<JSTestInterface*>(asObject(slotBase)); return JSTestInterface::getConstructor(exec, domObject->globalObject()); }
void setJSTestInterfaceSupplementalStr2(ExecState* exec, JSObject* thisObject, JSValue value) { JSTestInterface* castedThis = static_cast<JSTestInterface*>(thisObject); TestInterface* impl = static_cast<TestInterface*>(castedThis->impl()); TestSupplemental::setSupplementalStr2(impl, ustringToString(value.isEmpty() ? UString() : value.toString(exec)->value(exec))); }
JSValue jsTestInterfaceConstructor(ExecState* exec, JSValue slotBase, PropertyName) { JSTestInterface* domObject = jsCast<JSTestInterface*>(asObject(slotBase)); return JSTestInterface::getConstructor(exec, domObject->globalObject()); }
JSValue jsTestInterfaceSupplementalStr3(ExecState* exec, JSValue slotBase, PropertyName) { JSTestInterface* castedThis = jsCast<JSTestInterface*>(asObject(slotBase)); return castedThis->supplementalStr3(exec); }