From 470aeef2d72614cb8f904d8ef19583312410d981 Mon Sep 17 00:00:00 2001 From: bptato Date: Sun, 21 Apr 2024 19:17:10 +0200 Subject: js: fix some incorrect defineProperty usage It consumes a value, so we must dup those that we pass. --- src/js/tojs.nim | 1 + 1 file changed, 1 insertion(+) (limited to 'src/js/tojs.nim') diff --git a/src/js/tojs.nim b/src/js/tojs.nim index 4cbd2045..2ee8fd47 100644 --- a/src/js/tojs.nim +++ b/src/js/tojs.nim @@ -106,6 +106,7 @@ makeToJSP(Result) makeToJSP(JSValue) makeToJSP(JSDict) +# Note: this consumes `prop'. proc defineProperty(ctx: JSContext; this: JSValue; name: JSAtom; prop: JSValue; flags = cint(0)) = if JS_DefinePropertyValue(ctx, this, name, prop, flags) <= 0: -- cgit 1.4.1-2-gfad0 Unnamed repository; edit this file 'description' to name the repository.
about summary refs log blame commit diff stats
path: root/config.mk
blob: 1431e22251623615bc14ddd7a04e102d1c140f1b (plain) (tree)
1
2
3
4
5
6
7