aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bun.js/ffi.exports.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bun.js/ffi.exports.js b/src/bun.js/ffi.exports.js
index 41e93f8ff..67ad97287 100644
--- a/src/bun.js/ffi.exports.js
+++ b/src/bun.js/ffi.exports.js
@@ -28,7 +28,7 @@ export class JSCallback {
#threadsafe;
get threadsafe() {
- return true;
+ return this.#threadsafe;
}
[Symbol.toPrimitive]() {
@@ -245,7 +245,7 @@ ffiWrappers[FFIType.function] = function functionType(val) {
var ptr = val && val.ptr;
if (!ptr) {
- throw new Error("Expected function to be a JSCallback or a number");
+ throw new TypeError("Expected function to be a JSCallback or a number");
}
return ptr;