[seed] Revert "Fixes : bug#657228 - Make callbacks work with WebkFrame's Js Context"
- From: Alan Knowles <alank src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [seed] Revert "Fixes : bug#657228 - Make callbacks work with WebkFrame's Js Context"
- Date: Wed, 31 Aug 2011 02:00:34 +0000 (UTC)
commit 142625d27d522dcc9a4c2b52948cef48fa56c59c
Author: Alan Knowles <alan akbkhome com>
Date: Wed Aug 31 09:57:45 2011 +0800
Revert "Fixes : bug#657228 - Make callbacks work with WebkFrame's Js Context"
The patched caused serious segfaults. on fetching context JSContextGetGroup(privates->ctx)
I did try protecting ctx before putting it in the struct, but that did not appear to help.
This reverts commit b41c16b814f1c08228be08ecfa2dec0917d1696b.
libseed/seed-closure.c | 6 ++----
libseed/seed-closure.h | 1 -
2 files changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/libseed/seed-closure.c b/libseed/seed-closure.c
index 9feb85e..1e6f1c4 100644
--- a/libseed/seed-closure.c
+++ b/libseed/seed-closure.c
@@ -42,7 +42,7 @@ seed_closure_finalize (JSObjectRef object)
}
static void
-seed_handle_closure (ffi_cif * cif, void *result, void **args, gpointer userdata)
+seed_handle_closure (ffi_cif * cif, void *result, void **args, void *userdata)
{
SeedNativeClosure *privates = userdata;
gint num_args, i;
@@ -54,8 +54,7 @@ seed_handle_closure (ffi_cif * cif, void *result, void **args, gpointer userdata
GITypeInfo *arg_type;
GITypeTag tag;
GArgument rarg, return_arg;
- JSContextRef ctx = JSGlobalContextCreateInGroup (
- JSContextGetGroup(privates->ctx), 0);
+ JSContextRef ctx = JSGlobalContextCreateInGroup (context_group, 0);
GArgument *arg = &rarg;
gchar *mes;
@@ -320,7 +319,6 @@ seed_make_native_closure (JSContextRef ctx,
cif = g_new0 (ffi_cif, 1);
privates = g_new0 (SeedNativeClosure, 1);
- privates->ctx = ctx;
privates->info = (GICallableInfo *) g_base_info_ref ((GIBaseInfo *) info);
privates->function = function;
privates->cif = cif;
diff --git a/libseed/seed-closure.h b/libseed/seed-closure.h
index 46a4563..d316aa5 100644
--- a/libseed/seed-closure.h
+++ b/libseed/seed-closure.h
@@ -35,7 +35,6 @@ typedef struct _SeedClosure
typedef struct _SeedNativeClosure
{
- JSContextRef ctx;
GICallableInfo *info;
JSValueRef function;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]