Don't rely on being idle to do anything. Fixes JS job starvation on slow machines more.
Some checks are pending
Build Tilde Friends / Build-All (push) Waiting to run
Some checks are pending
Build Tilde Friends / Build-All (push) Waiting to run
This commit is contained in:
@ -211,6 +211,7 @@ static JSValue _util_print(JSContext* context, JSValueConst this_val, int argc,
|
||||
bool tf_util_report_error(JSContext* context, JSValue value)
|
||||
{
|
||||
bool is_error = false;
|
||||
tf_task_t* task = tf_task_get(context);
|
||||
if (JS_IsError(context, value))
|
||||
{
|
||||
const char* string = JS_ToCString(context, value);
|
||||
@ -226,13 +227,11 @@ bool tf_util_report_error(JSContext* context, JSValue value)
|
||||
}
|
||||
JS_FreeValue(context, stack);
|
||||
|
||||
tf_task_t* task = tf_task_get(context);
|
||||
tf_task_send_error_to_parent(task, value);
|
||||
is_error = true;
|
||||
}
|
||||
else if (JS_IsException(value))
|
||||
{
|
||||
tf_task_t* task = tf_task_get(context);
|
||||
if (!tf_task_send_error_to_parent(task, value))
|
||||
{
|
||||
JSValue exception = JS_GetException(context);
|
||||
@ -241,6 +240,7 @@ bool tf_util_report_error(JSContext* context, JSValue value)
|
||||
}
|
||||
is_error = true;
|
||||
}
|
||||
tf_task_check_jobs(task);
|
||||
return is_error;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user