Displaying 5 results from an estimated 5 matches for "swfdec_as_watch_unref".
2007 Sep 10
0
3 commits - libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_object.h
...BJECT (watch->watch)->context->version;
+ if (version <= 6) {
+ return watch->refcount <= 1;
+ } else {
+ return watch->refcount <= 64 + 1;
+ }
+}
+
+static inline void
+swfdec_as_watch_ref (SwfdecAsWatch *watch)
+{
+ watch->refcount++;
+}
+
+static inline void
+swfdec_as_watch_unref (SwfdecAsWatch *watch)
+{
+ watch->refcount--;
+ if (watch->refcount == 0) {
+ swfdec_as_context_unuse_mem (SWFDEC_AS_OBJECT (watch->watch)->context,
+ sizeof (SwfdecAsWatch));
+ g_slice_free (SwfdecAsWatch, watch);
+ }
+}
+
static void
swfdec_as_object_do_set (SwfdecAsObjec...
2007 Nov 02
0
5 commits - libswfdec/swfdec_as_array.c libswfdec/swfdec_as_array.h libswfdec/swfdec_as_date.c libswfdec/swfdec_as_date.h libswfdec/swfdec_as_initialize.as libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.c libswfdec/swfdec_filter.c
...c_as_object_hash_create (object, variable, flags);
if (var == NULL)
@@ -417,9 +433,13 @@ swfdec_as_object_do_set (SwfdecAsObject *object, const char *variable,
swfdec_as_function_call (watch->watch, object, 4, args, &ret);
swfdec_as_context_run (object->context);
swfdec_as_watch_unref (watch);
- var = swfdec_as_object_hash_lookup (object, variable);
- if (var == NULL)
+ var = swfdec_as_object_hash_lookup_with_prototype (object, variable);
+ if (swfdec_as_context_is_aborted (object->context))
+ return;
+ if (var == NULL) {
+ SWFDEC_INFO ("watch re...
2007 Sep 11
0
8 commits - libswfdec/swfdec_as_function.c libswfdec/swfdec_as_initialize.as libswfdec/swfdec_as_initialize.h libswfdec/swfdec_as_object.c libswfdec/swfdec_as_strings.c test/trace
...T_STRING (&args[0], variable);
+ args[1] = var->value;
+ args[2] = *val;
+ args[3] = watch->watch_data;
+ swfdec_as_watch_ref (watch);
+ swfdec_as_function_call (watch->watch, object, 4, args, &ret);
+ swfdec_as_context_run (object->context);
+ swfdec_as_watch_unref (watch);
+ var = swfdec_as_object_hash_lookup (object, variable);
+ if (var == NULL)
+ return;
+ }
+
+ var->value = ret;
+ }
if (var->get) {
if (var->set) {
SwfdecAsValue tmp;
swfdec_as_function_call (var->set, object, 1, val, &tmp);
swf...
2007 Oct 25
0
12 commits - libswfdec/swfdec_as_internal.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.c libswfdec/swfdec_text_field_movie_as.c libswfdec/swfdec_text_field_movie.c test/trace
...56) {
swfdec_as_context_abort (object->context, "Prototype recursion limit exceeded");
diff --git a/libswfdec/swfdec_as_object.c b/libswfdec/swfdec_as_object.c
index a7d45d7..6c4feb9 100644
--- a/libswfdec/swfdec_as_object.c
+++ b/libswfdec/swfdec_as_object.c
@@ -290,10 +290,20 @@ swfdec_as_watch_unref (SwfdecAsWatch *watch)
}
}
-SwfdecAsObject *
-swfdec_as_object_prototype_for_version (SwfdecAsObject *object, guint version,
- gboolean check7)
+/*
+ * Like swfdec_as_object_get_prototype, but doesn't check 8_UP flag when
+ * version is 7 and doesn't check if the property has been...
2007 Nov 26
0
14 commits - libswfdec/swfdec_as_object.c libswfdec/swfdec_file_reference.c libswfdec/swfdec_load_object.c libswfdec/swfdec_sprite_movie_as.c libswfdec/swfdec_system_security.c test/trace
...ec_as_object_hash_create (object, variable, flags);
if (var == NULL)
@@ -432,7 +465,8 @@ swfdec_as_object_do_set (SwfdecAsObject *object, const char *variable,
swfdec_as_function_call (watch->watch, object, 4, args, &ret);
swfdec_as_context_run (object->context);
swfdec_as_watch_unref (watch);
- var = swfdec_as_object_hash_lookup_with_prototype (object, variable);
+ var = swfdec_as_object_hash_lookup_with_prototype (object, variable,
+ NULL);
if (swfdec_as_context_is_aborted (object->context))
return;
if (var == NULL) {
commit 6b9923e561f46d04e1ce7...