- ErrorInstance* obj = new (exec) ErrorInstance(exec->lexicalGlobalObject()->errorStructure());
- if (!args.at(exec, 0).isUndefined())
- obj->putDirect(exec->propertyNames().message, jsString(exec, args.at(exec, 0).toString(exec)));
- return obj;
+ Base::finishCreation(vm, errorPrototype->classInfo()->className);
+ // ECMA 15.11.3.1 Error.prototype
+ putDirectWithoutTransition(vm, vm.propertyNames->prototype, errorPrototype, DontEnum | DontDelete | ReadOnly);
+ putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), DontDelete | ReadOnly | DontEnum);