MCPcopy Create free account
hub / github.com/AutoHotkey/AutoHotkey / New

Method New

source/script_object.cpp:1492–1507  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1490//
1491
1492ResultType Object::New(ResultToken &aResultToken, ExprTokenType *aParam[], int aParamCount)
1493{
1494 Object *base = dynamic_cast<Object *>(ParamIndexToObject(0));
1495 Object *proto = base ? dynamic_cast<Object *>(base->GetOwnPropObj(_T("Prototype"))) : nullptr;
1496 if (!proto)
1497 {
1498 Release();
1499 _o_throw_param(0);
1500 }
1501 if (!SetBase(proto, aResultToken))
1502 {
1503 Release();
1504 return FAIL;
1505 }
1506 return Construct(aResultToken, aParam + 1, aParamCount - 1);
1507}
1508
1509ResultType Object::Construct(ResultToken &aResultToken, ExprTokenType *aParam[], int aParamCount)
1510{

Callers 1

BIF_DECLFunction · 0.45

Calls 1

GetOwnPropObjMethod · 0.80

Tested by

no test coverage detected