EncodedJSValue jsTestGenerateIsReachableConstructor(ExecState* state, JSObject* baseValue, EncodedJSValue, PropertyName) { JSTestGenerateIsReachablePrototype* domObject = jsDynamicCast<JSTestGenerateIsReachablePrototype*>(baseValue); if (!domObject) return throwVMTypeError(state); return JSValue::encode(JSTestGenerateIsReachable::getConstructor(state->vm(), domObject->globalObject())); }
EncodedJSValue jsTestGenerateIsReachableConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName) { VM& vm = state->vm(); auto throwScope = DECLARE_THROW_SCOPE(vm); JSTestGenerateIsReachablePrototype* domObject = jsDynamicDowncast<JSTestGenerateIsReachablePrototype*>(JSValue::decode(thisValue)); if (UNLIKELY(!domObject)) return throwVMTypeError(state, throwScope); return JSValue::encode(JSTestGenerateIsReachable::getConstructor(state->vm(), domObject->globalObject())); }
void setJSTestGenerateIsReachableConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) { JSValue value = JSValue::decode(encodedValue); JSTestGenerateIsReachablePrototype* domObject = jsDynamicCast<JSTestGenerateIsReachablePrototype*>(JSValue::decode(thisValue)); if (UNLIKELY(!domObject)) { throwVMTypeError(state); return; } // Shadowing a built-in constructor domObject->putDirect(state->vm(), state->propertyNames().constructor, value); }
bool setJSTestGenerateIsReachableConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) { VM& vm = state->vm(); auto throwScope = DECLARE_THROW_SCOPE(vm); JSValue value = JSValue::decode(encodedValue); JSTestGenerateIsReachablePrototype* domObject = jsDynamicDowncast<JSTestGenerateIsReachablePrototype*>(JSValue::decode(thisValue)); if (UNLIKELY(!domObject)) { throwVMTypeError(state, throwScope); return false; } // Shadowing a built-in constructor return domObject->putDirect(state->vm(), state->propertyNames().constructor, value); }