Drop non-standard Error properties

This commit is contained in:
Saúl Ibarra Corretgé 2023-12-16 00:43:47 +01:00
parent 5cbf8727a6
commit 8934101a67
2 changed files with 0 additions and 9 deletions

View file

@ -79,9 +79,6 @@ DEF(await, "await")
DEF(empty_string, "")
/* identifiers */
DEF(length, "length")
DEF(fileName, "fileName")
DEF(lineNumber, "lineNumber")
DEF(columnNumber, "columnNumber")
DEF(message, "message")
DEF(cause, "cause")
DEF(errors, "errors")

View file

@ -6375,12 +6375,6 @@ static void build_backtrace(JSContext *ctx, JSValue error_obj,
if (line_num != -1)
dbuf_printf(&dbuf, ":%d:%d", line_num, col_num);
dbuf_putc(&dbuf, '\n');
str = JS_NewString(ctx, filename);
JS_DefinePropertyValue(ctx, error_obj, JS_ATOM_fileName, str, flags);
JS_DefinePropertyValue(ctx, error_obj, JS_ATOM_lineNumber,
js_int32(line_num), flags);
JS_DefinePropertyValue(ctx, error_obj, JS_ATOM_columnNumber,
js_int32(col_num), flags);
if (backtrace_flags & JS_BACKTRACE_FLAG_SINGLE_LEVEL)
goto done;
}