MCPcopy Create free account
hub / github.com/Snapchat/Valdi / tsn_call_constructor_vargs

Function tsn_call_constructor_vargs

tsn/src/tsn/tsn.cpp:1717–1729  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1715}
1716
1717tsn_value tsn_call_constructor_vargs(tsn_vm* ctx,
1718 tsn_value_const ctor,
1719 tsn_value_const new_target,
1720 tsn_value_const args) {
1721 uint32_t len;
1722 auto* argumentsList = JS_BuildArgumentsList_tsn(ctx, args, &len);
1723 if (argumentsList == nullptr) {
1724 return tsn_exception(ctx);
1725 }
1726 auto result = tsn_call_constructor(ctx, ctor, new_target, static_cast<size_t>(len), argumentsList);
1727 JS_FreeArgumentsList_tsn(ctx, argumentsList, len);
1728 return result;
1729}
1730
1731tsn_module* tsn_new_module(tsn_vm* ctx, size_t atoms_length, size_t constants_length, size_t prop_cache_slots) {
1732 auto jsModule = JS_NewObjectClass(ctx, getTSNModuleClassID());

Callers

nothing calls this directly

Calls 2

tsn_exceptionFunction · 0.85
tsn_call_constructorFunction · 0.85

Tested by

no test coverage detected