// Set prototype, and also insert the object prototype at the end of the chain. void JSGlobalObject::resetPrototype(JSValue prototype) { setPrototype(prototype); JSObject* oldLastInPrototypeChain = lastInPrototypeChain(this); JSObject* objectPrototype = d()->objectPrototype; if (oldLastInPrototypeChain != objectPrototype) oldLastInPrototypeChain->setPrototype(objectPrototype); }
// Set prototype, and also insert the object prototype at the end of the chain. void JSGlobalObject::resetPrototype(VM& vm, JSValue prototype) { setPrototype(vm, prototype); JSObject* oldLastInPrototypeChain = lastInPrototypeChain(this); JSObject* objectPrototype = m_objectPrototype.get(); if (oldLastInPrototypeChain != objectPrototype) oldLastInPrototypeChain->setPrototype(vm, objectPrototype); }
// Set prototype, and also insert the object prototype at the end of the chain. void JSGlobalObject::resetPrototype(JSValue* prototype) { setPrototype(prototype); lastInPrototypeChain(this)->setPrototype(d()->objectPrototype); }