private static Callable GetPropFunctionAndThisHelper(object obj, string property, Context cx, Scriptable thisObj) { if (thisObj == null) { throw UndefCallError(obj, property); } object value = ScriptableObject.GetProperty(thisObj, property); if (!(value is Callable)) { object noSuchMethod = ScriptableObject.GetProperty(thisObj, "__noSuchMethod__"); if (noSuchMethod is Callable) { value = new ScriptRuntime.NoSuchMethodShim((Callable)noSuchMethod, property); } } if (!(value is Callable)) { throw NotFunctionError(thisObj, value, property); } StoreScriptable(cx, thisObj); return (Callable)value; }