public override object CallLateBound(object thisObject, params object[] arguments)
{
if (this.Engine.CompatibilityMode == CompatibilityMode.ECMAScript3)
{
// Convert null or undefined to the global object.
if (TypeUtilities.IsUndefined(thisObject) == true || thisObject == Null.Value)
thisObject = this.Engine.Global;
else
thisObject = TypeConverter.ToObject(this.Engine, thisObject);
}
try
{
return this.callBinder.Call(this.Engine, thisBinding != null ? thisBinding : thisObject, arguments);
}
catch (JavaScriptException ex)
{
if (ex.FunctionName == null && ex.SourcePath == null && ex.LineNumber == 0)
{
ex.FunctionName = this.DisplayName;
ex.SourcePath = "native";
ex.PopulateStackTrace();
}
throw;
}
}