seed r606 - trunk/libseed
- From: racarr svn gnome org
- To: svn-commits-list gnome org
- Subject: seed r606 - trunk/libseed
- Date: Wed, 31 Dec 2008 06:27:52 +0000 (UTC)
Author: racarr
Date: Wed Dec 31 06:27:51 2008
New Revision: 606
URL: http://svn.gnome.org/viewvc/seed?rev=606&view=rev
Log:
Change some of the closure handling semantics. Connecting user_data
shouldnt take a reference (e.g. protect) the JavaScript value.
Modified:
trunk/libseed/seed-signals.c
Modified: trunk/libseed/seed-signals.c
==============================================================================
--- trunk/libseed/seed-signals.c (original)
+++ trunk/libseed/seed-signals.c Wed Dec 31 06:27:51 2008
@@ -88,10 +88,14 @@
SeedClosure * closure = (SeedClosure *) c;
SEED_NOTE(FINALIZATION, "Finalizing closure.");
-
- JSValueUnprotect(ctx, closure->user_data);
- JSValueUnprotect(ctx, closure->this);
- JSValueUnprotect(ctx, closure->function);
+/*
+ WebKit bug?
+ if (!JSValueIsUndefined(ctx, closure->user_data))
+ JSValueUnprotect(ctx, closure->user_data);
+ if (!JSValueIsUndefined(ctx, closure->this))
+ JSValueUnprotect(ctx, closure->this);*/
+ if (!JSValueIsUndefined(ctx, closure->function))
+ JSValueUnprotect(ctx, closure->function);
JSGlobalContextRelease((JSGlobalContextRef)ctx);
}
@@ -121,7 +125,7 @@
if (this_obj && !JSValueIsNull(ctx, this_obj))
{
JSValueProtect(ctx, this_obj);
- ((SeedClosure *) closure)->this = this_obj;
+// ((SeedClosure *) closure)->this = this_obj;
}
else
{
@@ -131,7 +135,7 @@
if (user_data && !JSValueIsNull(ctx, user_data))
{
((SeedClosure *) closure)->user_data = user_data;
- JSValueProtect(ctx, user_data);
+ // JSValueProtect(ctx, user_data);
}
JSValueProtect(ctx, (JSObjectRef) func);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]