EncodedJSValue jsTestNamedConstructorConstructor(ExecState* exec, JSObject* baseValue, EncodedJSValue, PropertyName) { JSTestNamedConstructorPrototype* domObject = jsDynamicCast<JSTestNamedConstructorPrototype*>(baseValue); if (!domObject) return throwVMTypeError(exec); return JSValue::encode(JSTestNamedConstructor::getConstructor(exec->vm(), domObject->globalObject())); }
EncodedJSValue jsTestNamedConstructorConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName) { JSTestNamedConstructorPrototype* domObject = jsDynamicCast<JSTestNamedConstructorPrototype*>(JSValue::decode(thisValue)); if (!domObject) return throwVMTypeError(state); return JSValue::encode(JSTestNamedConstructor::getConstructor(state->vm(), domObject->globalObject())); }
void setJSTestNamedConstructorConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) { JSValue value = JSValue::decode(encodedValue); JSTestNamedConstructorPrototype* domObject = jsDynamicCast<JSTestNamedConstructorPrototype*>(JSValue::decode(thisValue)); if (UNLIKELY(!domObject)) { throwVMTypeError(state); return; } // Shadowing a built-in constructor domObject->putDirect(state->vm(), state->propertyNames().constructor, value); }