about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/js/javascript.nim4
-rw-r--r--src/js/tojs.nim3
-rw-r--r--src/local/client.nim2
3 files changed, 4 insertions, 5 deletions
diff --git a/src/js/javascript.nim b/src/js/javascript.nim
index e99dd481..90694e93 100644
--- a/src/js/javascript.nim
+++ b/src/js/javascript.nim
@@ -1642,8 +1642,8 @@ macro registerType*(ctx: typed; t: typed; parent: JSClassID = 0;
   let staticfuns = info.tabStatic
   endstmts.add(quote do:
     `ctx`.newJSClass(`classDef`, `tname`, getTypePtr(`t`), `sctr`, `tabList`,
-      `parent`, `asglobal`, `nointerface`, `finName`, `namespace`, `errid`,
-      `unforgeable`, `staticfuns`, `ishtmldda`)
+      `parent`, bool(`asglobal`), `nointerface`, `finName`, `namespace`,
+      `errid`, `unforgeable`, `staticfuns`, `ishtmldda`)
   )
   stmts.add(newBlockStmt(endstmts))
   return stmts
diff --git a/src/js/tojs.nim b/src/js/tojs.nim
index f625ab98..4090757d 100644
--- a/src/js/tojs.nim
+++ b/src/js/tojs.nim
@@ -324,8 +324,7 @@ proc toJS(ctx: JSContext; promise: EmptyPromise): JSValue =
   if JS_IsException(jsPromise):
     return JS_EXCEPTION
   promise.then(proc() =
-    let res = JS_Call(ctx, resolving_funcs[0], JS_UNDEFINED, 1,
-      JS_UNDEFINED.toJSValueArray())
+    let res = JS_Call(ctx, resolving_funcs[0], JS_UNDEFINED, 0, nil)
     JS_FreeValue(ctx, res)
     JS_FreeValue(ctx, resolving_funcs[0])
     JS_FreeValue(ctx, resolving_funcs[1]))
diff --git a/src/local/client.nim b/src/local/client.nim
index 9038488a..237ee284 100644
--- a/src/local/client.nim
+++ b/src/local/client.nim
@@ -179,7 +179,7 @@ proc jsQuit(client: Client; code: uint32 = 0): JSValue {.jsfunc: "quit".} =
   client.exitCode = int(code)
   let ctx = client.jsctx
   let ctor = ctx.getOpaque().errCtorRefs[jeInternalError]
-  let err = JS_CallConstructor(ctx, ctor, 1, JS_UNDEFINED.toJSValueArray())
+  let err = JS_CallConstructor(ctx, ctor, 0, nil)
   JS_SetUncatchableError(ctx, err, true);
   return JS_Throw(ctx, err)