Nope. JS_EVAL_FLAG_STRIP loses line numbers and other debug information. Need those.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4843 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
parent
ed741d53d7
commit
8d82e80639
@ -414,7 +414,7 @@ int tf_task_execute(tf_task_t* task, const char* fileName)
|
|||||||
}
|
}
|
||||||
if (source)
|
if (source)
|
||||||
{
|
{
|
||||||
JSValue result = JS_Eval(task->_context, source, strlen(source), fileName, JS_EVAL_TYPE_MODULE | JS_EVAL_FLAG_STRIP | JS_EVAL_FLAG_ASYNC);
|
JSValue result = JS_Eval(task->_context, source, strlen(source), fileName, JS_EVAL_TYPE_MODULE | JS_EVAL_FLAG_ASYNC);
|
||||||
if (tf_util_report_error(task->_context, result))
|
if (tf_util_report_error(task->_context, result))
|
||||||
{
|
{
|
||||||
tf_printf("Reported an error.\n");
|
tf_printf("Reported an error.\n");
|
||||||
@ -1183,7 +1183,7 @@ void tf_task_on_receive_packet(int packetType, const char* begin, size_t length,
|
|||||||
static JSValue _tf_task_executeSource(tf_task_t* task, const char* source, const char* name)
|
static JSValue _tf_task_executeSource(tf_task_t* task, const char* source, const char* name)
|
||||||
{
|
{
|
||||||
tf_trace_begin(task->_trace, "_tf_task_executeSource");
|
tf_trace_begin(task->_trace, "_tf_task_executeSource");
|
||||||
JSValue result = JS_Eval(task->_context, source, strlen(source), name, JS_EVAL_TYPE_MODULE | JS_EVAL_FLAG_STRIP | JS_EVAL_FLAG_ASYNC);
|
JSValue result = JS_Eval(task->_context, source, strlen(source), name, JS_EVAL_TYPE_MODULE | JS_EVAL_FLAG_ASYNC);
|
||||||
if (!*task->_scriptName)
|
if (!*task->_scriptName)
|
||||||
{
|
{
|
||||||
snprintf(task->_scriptName, sizeof(task->_scriptName), "%s", name);
|
snprintf(task->_scriptName, sizeof(task->_scriptName), "%s", name);
|
||||||
@ -1565,7 +1565,7 @@ static JSModuleDef* _tf_task_module_loader(JSContext* context, const char* modul
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
JSValue result = JS_Eval(context, source, length, module_name, JS_EVAL_TYPE_MODULE | JS_EVAL_FLAG_COMPILE_ONLY | JS_EVAL_FLAG_STRIP | JS_EVAL_FLAG_ASYNC);
|
JSValue result = JS_Eval(context, source, length, module_name, JS_EVAL_TYPE_MODULE | JS_EVAL_FLAG_COMPILE_ONLY | JS_EVAL_FLAG_ASYNC);
|
||||||
tf_free(source);
|
tf_free(source);
|
||||||
if (tf_util_report_error(task->_context, result))
|
if (tf_util_report_error(task->_context, result))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user