private Rhino.ImporterTopLevel RealThis(Scriptable thisObj, IdFunctionObject f)
{
if (topScopeFlag)
{
// when used as top scope importPackage and importClass are global
// function that ignore thisObj
return this;
}
if (!(thisObj is Rhino.ImporterTopLevel))
{
throw IncompatibleCallError(f);
}
return (Rhino.ImporterTopLevel)thisObj;
}