| 10 | using namespace icinga; |
| 11 | |
| 12 | static Value FunctionCall(const std::vector<Value>& args) |
| 13 | { |
| 14 | if (args.size() < 1) |
| 15 | BOOST_THROW_EXCEPTION(std::invalid_argument("Too few arguments for call()")); |
| 16 | |
| 17 | ScriptFrame *vframe = ScriptFrame::GetCurrentFrame(); |
| 18 | Function::Ptr self = static_cast<Function::Ptr>(vframe->Self); |
| 19 | REQUIRE_NOT_NULL(self); |
| 20 | |
| 21 | std::vector<Value> uargs(args.begin() + 1, args.end()); |
| 22 | return self->InvokeThis(args[0], uargs); |
| 23 | } |
| 24 | |
| 25 | static Value FunctionCallV(const Value& thisArg, const Array::Ptr& args) |
| 26 | { |
no test coverage detected