v = JS_GetPropertyStr(cx, options, "mode");
if (!JS_IsUndefined(v) && !JS_IsException(v)) {
md = qjs_fs_mode(cx, v, 0777);
+ JS_FreeValue(cx, v);
if (md == (mode_t) -1) {
- JS_FreeValue(cx, v);
return JS_EXCEPTION;
}
}
v = JS_GetPropertyStr(cx, options, "recursive");
if (!JS_IsUndefined(v) && !JS_IsException(v)) {
recursive = JS_ToBool(cx, v);
+ JS_FreeValue(cx, v);
}
}
v = JS_GetPropertyStr(cx, options, "flag");
if (!JS_IsUndefined(v) && !JS_IsException(v)) {
flags = qjs_fs_flags(cx, v, O_RDONLY);
+ JS_FreeValue(cx, v);
if (flags == -1) {
- JS_FreeValue(cx, v);
return JS_EXCEPTION;
}
}
v = JS_GetPropertyStr(cx, options, "withFileTypes");
if (!JS_IsUndefined(v) && !JS_IsException(v)) {
types = JS_ToBool(cx, v);
+ JS_FreeValue(cx, v);
}
}
v = JS_GetPropertyStr(cx, options, "recursive");
if (!JS_IsUndefined(v) && !JS_IsException(v)) {
recursive = JS_ToBool(cx, v);
+ JS_FreeValue(cx, v);
}
}
value = JS_GetPropertyStr(cx, options, "bigint");
if (!JS_IsUndefined(value)) {
+ JS_FreeValue(cx, value);
JS_ThrowTypeError(cx, "\"bigint\" is not supported");
return JS_EXCEPTION;
}
value = JS_GetPropertyStr(cx, options, "throwIfNoEntry");
if (!JS_IsUndefined(value)) {
throw = JS_ToBool(cx, value);
+ JS_FreeValue(cx, value);
}
}
}
v = JS_GetPropertyStr(cx, options, "flag");
if (!JS_IsUndefined(v) && !JS_IsException(v)) {
flags = qjs_fs_flags(cx, v, O_CREAT | O_WRONLY);
+ JS_FreeValue(cx, v);
if (flags == -1) {
- JS_FreeValue(cx, v);
return JS_EXCEPTION;
}
}
v = JS_GetPropertyStr(cx, options, "mode");
if (!JS_IsUndefined(v) && !JS_IsException(v)) {
md = qjs_fs_mode(cx, v, 0666);
+ JS_FreeValue(cx, v);
if (md == (mode_t) -1) {
- JS_FreeValue(cx, v);
return JS_EXCEPTION;
}
}