about summary refs log tree commit diff stats
path: root/src/html/dom.nim
diff options
context:
space:
mode:
Diffstat (limited to 'src/html/dom.nim')
-rw-r--r--src/html/dom.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/html/dom.nim b/src/html/dom.nim
index 7e2d967b..5c9693ca 100644
--- a/src/html/dom.nim
+++ b/src/html/dom.nim
@@ -3014,7 +3014,7 @@ proc toBlob(ctx: JSContext, this: HTMLCanvasElement, callback: JSValue,
     s = "image/png", quality: float64 = 1): JSValue {.jsfunc.} =
   var outlen: int
   let buf = this.bitmap.toPNG(outlen)
-  let blob = newBlob(buf, outlen, "image/png", dealloc)
+  let blob = newBlob(buf, outlen, "image/png", proc() = dealloc(buf))
   var jsBlob = toJS(ctx, blob)
   let res = JS_Call(ctx, callback, JS_UNDEFINED, 1, addr jsBlob)
   # Hack. TODO: implement JSValue to callback