[gjs] function: Add BeginRequest/EndRequest for JS_ValueRoot
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs] function: Add BeginRequest/EndRequest for JS_ValueRoot
- Date: Fri, 4 Jan 2013 22:08:09 +0000 (UTC)
commit bac272f72a600fcf99f6f8296f9d1dd212aa44a2
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Wed Jan 2 17:52:26 2013 -0500
function: Add BeginRequest/EndRequest for JS_ValueRoot
https://bugzilla.gnome.org/show_bug.cgi?id=691038
gi/function.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/gi/function.c b/gi/function.c
index 38599d6..1a2c190 100644
--- a/gi/function.c
+++ b/gi/function.c
@@ -82,8 +82,12 @@ gjs_callback_trampoline_unref(GjsCallbackTrampoline *trampoline)
context = gjs_runtime_get_current_context(trampoline->runtime);
- if (!trampoline->is_vfunc)
+ if (!trampoline->is_vfunc) {
+ JS_BeginRequest(context);
JS_RemoveValueRoot(context, &trampoline->js_function);
+ JS_EndRequest(context);
+ }
+
g_callable_info_free_closure(trampoline->info, trampoline->closure);
g_base_info_unref( (GIBaseInfo*) trampoline->info);
g_free (trampoline->param_types);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]