private Rhino.BaseFunction RealFunction(Scriptable thisObj, IdFunctionObject f)
{
object x = thisObj.GetDefaultValue(ScriptRuntime.FunctionClass);
if (x is Delegator)
{
x = ((Delegator)x).GetDelegee();
}
if (x is Rhino.BaseFunction)
{
return (Rhino.BaseFunction)x;
}
throw ScriptRuntime.TypeError1("msg.incompat.call", f.GetFunctionName());
}