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

Function __tsn_module_finalize

tsn/src/tsn/tsn.cpp:1437–1452  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1435}
1436
1437static void __tsn_module_finalize(JSRuntime* rt, JSValue value) {
1438 auto* module = tsn_get_module_from_value(value);
1439
1440 auto atoms_length = module->atoms_length;
1441 for (size_t i = 0; i < atoms_length; i++) {
1442 if (module->atoms[i] != 0) {
1443 JS_FreeAtomRT(rt, module->atoms[i]);
1444 }
1445 }
1446 auto constants_length = module->constants_length;
1447 for (size_t i = 0; i < constants_length; i++) {
1448 JS_FreeValueRT(rt, module->constants[i]);
1449 }
1450
1451 js_free_rt(rt, module);
1452}
1453
1454static void __tsn_module_mark(JSRuntime* rt, JSValueConst val, JS_MarkFunc* mark_func) {
1455 auto* module = tsn_get_module_from_value(val);

Callers

nothing calls this directly

Calls 2

JS_FreeValueRTFunction · 0.85

Tested by

no test coverage detected