private IsPrototypeOf ( ScriptEngine engine, object thisObject, object obj ) : bool | ||
engine | ScriptEngine | |
thisObject | object | |
obj | object | |
return | bool |
public static bool IsPrototypeOf(ScriptEngine engine, object thisObject, object obj)
{
if ((obj is ObjectInstance) == false)
return false;
TypeUtilities.VerifyThisObject(engine, thisObject, "isPrototypeOf");
var obj2 = obj as ObjectInstance;
while (true)
{
obj2 = obj2.Prototype;
if (obj2 == null)
return false;
if (obj2 == thisObject)
return true;
}
}