Displaying 6 results from an estimated 6 matches for "swfdecaswatch".
2007 Sep 10
0
3 commits - libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_object.h
.../
- gint8 watch_recurse; /* times the watch function has been called without returning */
};
+typedef struct {
+ SwfdecAsFunction * watch; /* watcher or %NULL */
+ SwfdecAsValue watch_data; /* user data to watcher */
+ guint refcount; /* refcount - misused for recursion detection */
+} SwfdecAsWatch;
+
G_DEFINE_TYPE (SwfdecAsObject, swfdec_as_object, G_TYPE_OBJECT)
static void
@@ -141,22 +144,28 @@ swfdec_as_object_mark_property (gpointer
if (var->set)
swfdec_as_object_mark (SWFDEC_AS_OBJECT (var->set));
} else {
- if (var->watch) {
- swfdec_as_object_mark (...
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
...ototype;
}
-static void
-swfdec_as_object_do_set (SwfdecAsObject *object, const char *variable,
- const SwfdecAsValue *val, guint flags)
+static SwfdecAsVariable *
+swfdec_as_object_hash_lookup_with_prototype (SwfdecAsObject *object,
+ const char *variable)
{
SwfdecAsVariable *var;
- SwfdecAsWatch *watch;
- if (!swfdec_as_variable_name_is_valid (variable))
- return;
+ g_return_val_if_fail (swfdec_as_variable_name_is_valid (variable), NULL);
var = swfdec_as_object_hash_lookup (object, variable);
if (var == NULL && variable != SWFDEC_AS_STR___proto__) {
@@ -380,9 +378,27...
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
...ec/swfdec_as_object.c
index 5719eaf..d6831f2 100644
--- a/libswfdec/swfdec_as_object.c
+++ b/libswfdec/swfdec_as_object.c
@@ -333,39 +333,36 @@ swfdec_as_object_do_set (SwfdecAsObject
SWFDEC_AS_VARIABLE_VERSION_8_UP);
}
}
+ if (object->watches) {
+ SwfdecAsValue ret = *val;
+ SwfdecAsWatch *watch = g_hash_table_lookup (object->watches, variable);
+ /* FIXME: figure out if this limit here is correct. Add a watch in Flash 7
+ * and set a variable using Flash 6 */
+ if (watch && swfdec_as_watch_can_recurse (watch)) {
+ SwfdecAsValue args[4];
+ SWFDEC_AS_V...
2007 Sep 12
0
9 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 libswfdec/swfdec_player_as.c test/trace
...a/libswfdec/swfdec_as_object.c b/libswfdec/swfdec_as_object.c
index e7086e6..db4119a 100644
--- a/libswfdec/swfdec_as_object.c
+++ b/libswfdec/swfdec_as_object.c
@@ -293,6 +293,7 @@ swfdec_as_object_do_set (SwfdecAsObject
const SwfdecAsValue *val, guint flags)
{
SwfdecAsVariable *var;
+ SwfdecAsWatch *watch;
if (!swfdec_as_variable_name_is_valid (variable))
return;
@@ -335,7 +336,7 @@ swfdec_as_object_do_set (SwfdecAsObject
}
if (object->watches) {
SwfdecAsValue ret = *val;
- SwfdecAsWatch *watch = g_hash_table_lookup (object->watches, variable);
+ watch = g_ha...
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
...ntext_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 deleted if vers...
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
...bort (object->context, "Prototype recursion limit exceeded");
return NULL;
}
}
+ if (proto != NULL)
+ *proto = proto_;
+
return var;
}
@@ -390,14 +409,28 @@ swfdec_as_object_do_set (SwfdecAsObject *object, const char *variable,
{
SwfdecAsVariable *var;
SwfdecAsWatch *watch;
+ SwfdecAsObject *proto;
if (!swfdec_as_variable_name_is_valid (variable))
return;
- var = swfdec_as_object_hash_lookup_with_prototype (object, variable);
+ var = swfdec_as_object_hash_lookup_with_prototype (object, variable, &proto);
if (swfdec_as_context_is_aborted (...