All the leaks.

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3919 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
2022-06-26 18:25:31 +00:00
parent 66ea0dadd0
commit ff2a0f0c3f
9 changed files with 50 additions and 24 deletions

View File

@ -199,13 +199,6 @@ static bool _serialize_storeInternal(tf_task_t* task, tf_taskstub_t* to, buffer_
if (JS_IsError(context, exception))
{
JSValue m = JS_GetPropertyStr(context, exception, "message");
if (!JS_IsUndefined(m) && !JS_IsException(m))
{
const char* ms = JS_ToCString(context, m);
JS_FreeCString(context, ms);
}
JSValue stack = JS_GetPropertyStr(context, exception, "stack");
if (!JS_IsUndefined(stack) && !JS_IsException(stack))
{
@ -253,13 +246,16 @@ static bool _serialize_storeInternal(tf_task_t* task, tf_taskstub_t* to, buffer_
_serialize_writeInt32(buffer, length);
for (int i = 0; i < length; ++i)
{
_serialize_storeInternal(task, to, buffer, JS_GetPropertyUint32(tf_task_get_context(task), value, i), depth + 1);
JSValue element = JS_GetPropertyUint32(tf_task_get_context(task), value, i);
_serialize_storeInternal(task, to, buffer, element, depth + 1);
JS_FreeValue(context, element);
}
}
else
{
_serialize_writeInt32(buffer, 0);
}
JS_FreeValue(tf_task_get_context(task), length_val);
}
else if (JS_IsFunction(tf_task_get_context(task), value))
{