summaryrefslogtreecommitdiff
path: root/gi/object.h
diff options
context:
space:
mode:
authorMarco Trevisan (TreviƱo) <mail@3v1n0.net>2021-05-12 19:20:24 +0200
committerPhilip Chimento <philip.chimento@gmail.com>2021-05-18 22:06:37 -0700
commit708af7dce9950e2381f3d11afffef48b2d4408f6 (patch)
tree1d61386a187811a5642b7997fa52df8f66446992 /gi/object.h
parent6daf41c4796a57584e5755a522971a6374eb2b67 (diff)
downloadgjs-708af7dce9950e2381f3d11afffef48b2d4408f6.tar.gz
object: Make ensure_toggle_reference to follow the JS API so we can throw
Diffstat (limited to 'gi/object.h')
-rw-r--r--gi/object.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/gi/object.h b/gi/object.h
index 18f02d5e..980aff4a 100644
--- a/gi/object.h
+++ b/gi/object.h
@@ -378,7 +378,7 @@ class ObjectInstance : public GIWrapperInstance<ObjectBase, ObjectPrototype,
static void closure_invalidated_notify(void* data, GClosure* closure);
public:
- void associate_closure(JSContext* cx, GClosure* closure);
+ GJS_JSAPI_RETURN_CONVENTION bool associate_closure(JSContext*, GClosure*);
/* Helper methods */
@@ -388,7 +388,7 @@ class ObjectInstance : public GIWrapperInstance<ObjectBase, ObjectPrototype,
void track_gobject_finalization();
void ignore_gobject_finalization();
void check_js_object_finalized(void);
- bool ensure_uses_toggle_ref(JSContext* cx);
+ GJS_JSAPI_RETURN_CONVENTION bool ensure_uses_toggle_ref(JSContext* cx);
[[nodiscard]] bool check_gobject_disposed_or_finalized(
const char* for_what) const;
[[nodiscard]] bool check_gobject_finalized(const char* for_what) const;