EncodedJSValue jsTestInterfaceConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName) { JSTestInterfacePrototype* domObject = jsDynamicCast<JSTestInterfacePrototype*>(JSValue::decode(thisValue)); if (UNLIKELY(!domObject)) return throwVMTypeError(state); return JSValue::encode(JSTestInterface::getConstructor(state->vm(), domObject->globalObject())); }
EncodedJSValue jsTestInterfaceConstructor(ExecState* exec, JSObject* baseValue, EncodedJSValue thisValue, PropertyName) { UNUSED_PARAM(baseValue); UNUSED_PARAM(thisValue); JSTestInterfacePrototype* domObject = jsDynamicCast<JSTestInterfacePrototype*>(baseValue); if (!domObject) return throwVMTypeError(exec); return JSValue::encode(JSTestInterface::getConstructor(exec->vm(), domObject->globalObject())); }
bool setJSTestInterfaceConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) { JSValue value = JSValue::decode(encodedValue); JSTestInterfacePrototype* domObject = jsDynamicCast<JSTestInterfacePrototype*>(JSValue::decode(thisValue)); if (UNLIKELY(!domObject)) { throwVMTypeError(state); return false; } // Shadowing a built-in constructor return domObject->putDirect(state->vm(), state->propertyNames().constructor, value); }
static JSTestInterfacePrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure) { JSTestInterfacePrototype* ptr = new (NotNull, JSC::allocateCell<JSTestInterfacePrototype>(vm.heap)) JSTestInterfacePrototype(vm, globalObject, structure); ptr->finishCreation(vm); return ptr; }