summaryrefslogtreecommitdiff
path: root/quickjs-libc.c
diff options
context:
space:
mode:
authorFabrice Bellard <fabrice@bellard.org>2025-04-12 12:14:37 +0200
committerFabrice Bellard <fabrice@bellard.org>2025-04-12 12:14:37 +0200
commit67b48ae4e6fadb812334b5836aa4a6e6e46d459b (patch)
tree9f612b2fff9b5009323364c9e20384b9eab86982 /quickjs-libc.c
parentc50de13b1573735c57e918f2739428b82dd2481f (diff)
downloadquickjs-67b48ae4e6fadb812334b5836aa4a6e6e46d459b.tar.gz
quickjs-67b48ae4e6fadb812334b5836aa4a6e6e46d459b.zip
- removed the 'use strip' extension
- removed the JS_EVAL_FLAG_STRIP eval flag and replaced it with JS_SetStripInfo() which has simpler semantics. - qjs: added the '-s' and '--strip-source' options - qjsc: added the '-s' and '--keep-source' options
Diffstat (limited to 'quickjs-libc.c')
-rw-r--r--quickjs-libc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/quickjs-libc.c b/quickjs-libc.c
index 2c71132..a9fff6a 100644
--- a/quickjs-libc.c
+++ b/quickjs-libc.c
@@ -3220,6 +3220,7 @@ typedef struct {
char *filename; /* module filename */
char *basename; /* module base name */
JSWorkerMessagePipe *recv_pipe, *send_pipe;
+ int strip_flags;
} WorkerFuncArgs;
typedef struct {
@@ -3367,6 +3368,7 @@ static void *worker_func(void *opaque)
fprintf(stderr, "JS_NewRuntime failure");
exit(1);
}
+ JS_SetStripInfo(rt, args->strip_flags);
js_std_init_handlers(rt);
JS_SetModuleLoaderFunc(rt, NULL, js_module_loader, NULL);
@@ -3484,6 +3486,8 @@ static JSValue js_worker_ctor(JSContext *ctx, JSValueConst new_target,
if (!args->send_pipe)
goto oom_fail;
+ args->strip_flags = JS_GetStripInfo(rt);
+
obj = js_worker_ctor_internal(ctx, new_target,
args->send_pipe, args->recv_pipe);
if (JS_IsException(obj))