Jurassic.Library.ClrFunction.CallLateBound C# (CSharp) Method

CallLateBound() public method

Calls this function, passing in the given "this" value and zero or more arguments.
public CallLateBound ( object thisObject ) : object
thisObject object The value of the "this" keyword within the function.
return object
        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;
            }
        }