/** 15.2.4.6 Object.prototype.isPrototypeOf (V) When the isPrototypeOf method is called with argument V, the following steps are taken: 1. Let O be this object. 2. If V is not an object, return false. 3. Let V be the value of the [[Prototype]] property of V. 4. if V is null, return false 5. If O and V refer to the same object or if they refer to objects joined to each other (section 13.1.2), return true. 6. Go to step 3. */ bool ObjectClass::_isPrototypeOf(Atom thisAtom, Atom V) { // ECMA-262 Section 15.2.4.6 if (AvmCore::isNullOrUndefined(V)) return false; ScriptObject* o = toplevel()->toPrototype(V); for (; o != NULL; o = o->getDelegate()) { if (o->atom() == thisAtom) return true; } return false; }