Displaying 20 results from an estimated 35 matches for "swfdec_as_object_delete_variable".
2007 Aug 20
0
15 commits - libswfdec/swfdec_as_context.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame_internal.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_object.h libswfdec/swfdec_as_super.c libswfdec/swfdec_as_with.c
...le (SwfdecAsFrame *frame, const char *variable)
{
SwfdecAsScope *cur;
guint i;
+ SwfdecAsDeleteReturn ret;
g_return_val_if_fail (SWFDEC_IS_AS_FRAME (frame), FALSE);
g_return_val_if_fail (variable != NULL, FALSE);
cur = frame->scope;
for (i = 0; i < 256; i++) {
- if (swfdec_as_object_delete_variable (SWFDEC_AS_OBJECT (cur), variable))
- return TRUE;
+ ret = swfdec_as_object_delete_variable (SWFDEC_AS_OBJECT (cur), variable);
+ if (ret)
+ return ret;
if (cur->next == NULL)
break;
cur = cur->next;
@@ -528,8 +529,9 @@ swfdec_as_frame_delete_variable (SwfdecA...
2007 Sep 02
0
3 commits - libswfdec/swfdec_as_number.c libswfdec/swfdec_internal.h libswfdec/swfdec_player_as.c libswfdec/swfdec_player.c test/trace
...c_as_object_get_variable (context->global, SWFDEC_AS_STR_ASnative, &val);
- g_assert (SWFDEC_AS_VALUE_IS_OBJECT (&val));
- object = SWFDEC_AS_VALUE_GET_OBJECT (&val);
- swfdec_as_object_unset_variable_flags (object, SWFDEC_AS_STR___proto__,
- SWFDEC_AS_VARIABLE_PERMANENT);
- swfdec_as_object_delete_variable (object, SWFDEC_AS_STR___proto__);
- swfdec_as_object_unset_variable_flags (object, SWFDEC_AS_STR_constructor,
- SWFDEC_AS_VARIABLE_PERMANENT);
- swfdec_as_object_delete_variable (object, SWFDEC_AS_STR_constructor);
-
- swfdec_as_object_get_variable (context->global, SWFDEC_AS_STR_AScons...
2007 Aug 31
0
4 commits - libswfdec/swfdec_as_number.c libswfdec/swfdec_as_strings.c libswfdec/swfdec_player_as.c test/trace
...c_as_object_get_variable (context->global, SWFDEC_AS_STR_ASnative, &val);
+ g_assert (SWFDEC_AS_VALUE_IS_OBJECT (&val));
+ object = SWFDEC_AS_VALUE_GET_OBJECT (&val);
+ swfdec_as_object_unset_variable_flags (object, SWFDEC_AS_STR___proto__,
+ SWFDEC_AS_VARIABLE_PERMANENT);
+ swfdec_as_object_delete_variable (object, SWFDEC_AS_STR___proto__);
+ swfdec_as_object_unset_variable_flags (object, SWFDEC_AS_STR_constructor,
+ SWFDEC_AS_VARIABLE_PERMANENT);
+ swfdec_as_object_delete_variable (object, SWFDEC_AS_STR_constructor);
+
+ swfdec_as_object_get_variable (context->global, SWFDEC_AS_STR_AScons...
2007 Oct 28
1
9 commits - libswfdec/swfdec_as_context.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame_internal.h libswfdec/swfdec_as_object.c libswfdec/swfdec_codec_gst.c test/trace
...--- a/libswfdec/swfdec_as_object.c
+++ b/libswfdec/swfdec_as_object.c
@@ -67,7 +67,7 @@
* SwfdecAsVariableFlag:
* @SWFDEC_AS_VARIABLE_HIDDEN: Do not include variable in enumerations and
* swfdec_as_object_foreach().
- * @SWFDEC_AS_VARIABLE_PERMANENT: Do not all swfdec_as_object_delete_variable()
+ * @SWFDEC_AS_VARIABLE_PERMANENT: Do not alloe swfdec_as_object_delete_variable()
* to delete this variable.
* @SWFDEC_AS_VARIABLE_CONSTANT: Do not allow changing the value with
* swfdec_as_object_set_variable().
commit de08174d0...
2007 Jun 06
0
Branch 'as' - 13 commits - libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_object.h
...swfdec_as_frame_delete_variable (SwfdecAsFrame *frame, const char *variable)
+{
+ SwfdecAsScope *cur;
+ guint i;
+
+ g_return_val_if_fail (SWFDEC_IS_AS_FRAME (frame), FALSE);
+ g_return_val_if_fail (variable != NULL, FALSE);
+
+ cur = frame->scope;
+ for (i = 0; i < 256; i++) {
+ if (swfdec_as_object_delete_variable (SWFDEC_AS_OBJECT (cur), variable))
+ return TRUE;
+ if (cur->next == NULL)
+ break;
+ cur = cur->next;
+ }
+ if (i == 256) {
+ swfdec_as_context_abort (SWFDEC_AS_OBJECT (frame)->context, "Scope recursion limit exceeded");
+ return FALSE;
+ }
+ g_assert...
2007 Oct 28
0
2 commits - libswfdec/swfdec_as_object.c libswfdec/swfdec_player.c
...-- a/libswfdec/swfdec_as_object.c
+++ b/libswfdec/swfdec_as_object.c
@@ -67,7 +67,7 @@
* SwfdecAsVariableFlag:
* @SWFDEC_AS_VARIABLE_HIDDEN: Do not include variable in enumerations and
* swfdec_as_object_foreach().
- * @SWFDEC_AS_VARIABLE_PERMANENT: Do not alloe swfdec_as_object_delete_variable()
+ * @SWFDEC_AS_VARIABLE_PERMANENT: Do not allow swfdec_as_object_delete_variable()
* to delete this variable.
* @SWFDEC_AS_VARIABLE_CONSTANT: Do not allow changing the value with
* swfdec_as_object_set_variable().
2007 Jul 13
0
12 commits - AUTHORS doc/Makefile.am doc/swfdec-docs.sgml doc/swfdec-sections.txt libswfdec/Makefile.am libswfdec/swfdec_as_array.c libswfdec/swfdec_as_array.h libswfdec/swfdec_as_context.c libswfdec/swfdec_as_function.c libswfdec/swfdec_as_function.h
...b/doc/swfdec-sections.txt
@@ -250,26 +250,26 @@ SWFDEC_TYPE_AS_CONTEXT
<FILE>SwfdecAsObject</FILE>
<TITLE>SwfdecAsObject</TITLE>
SwfdecAsObject
-swfdec_as_object_add
-swfdec_as_object_add_function
-swfdec_as_object_call
-swfdec_as_object_collect
-swfdec_as_object_create
-swfdec_as_object_delete_variable
-swfdec_as_object_foreach
-swfdec_as_object_get_debug
-swfdec_as_object_get_variable
-swfdec_as_object_get_variable_and_flags
-swfdec_as_object_has_function
-swfdec_as_object_init_context
swfdec_as_object_new
swfdec_as_object_new_empty
-swfdec_as_object_resolve
-swfdec_as_object_run
+swfdec_as_ob...
2007 May 29
0
Branch 'as' - 6 commits - libswfdec/swfdec_as_interpret.c libswfdec/swfdec_js_xml.c libswfdec/swfdec_tag.c player/swfplay.c
...>sp[0]))
- return JS_TRUE;
- return JS_DeleteProperty (cx, JSVAL_TO_OBJECT (cx->fp->sp[0]), name);
+ name = swfdec_as_value_to_string (cx, swfdec_as_stack_pop (cx->frame->stack));
+ val = swfdec_as_stack_pop (cx->frame->stack);
+ if (SWFDEC_AS_VALUE_IS_OBJECT (val))
+ swfdec_as_object_delete_variable (SWFDEC_AS_VALUE_GET_OBJECT (val), name);
}
static void
swfdec_action_delete2 (SwfdecAsContext *cx, guint action, const guint8 *data, guint len)
{
const char *name;
- JSObject *obj, *pobj;
- JSProperty *prop;
- JSAtom *atom;
+ SwfdecAsObject *object;
- cx->fp->sp -= 1;
- na...
2007 May 24
0
Branch 'as' - 11 commits - libswfdec/swfdec_as_array.c libswfdec/swfdec_as_context.c libswfdec/swfdec_as_function.c libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_native_function.c libswfdec/swfdec_as_number.c libswfdec/swfdec_as_object.c
...add_function (context->global,
- SWFDEC_AS_STR_Function, 0, swfdec_as_function_construct, 0));
+ SWFDEC_AS_STR_Function, 0, NULL, 0));
if (!function)
return;
+ if (version < 6) {
+ /* deleting it later on is easier than duplicating swfdec_as_object_add_function() */
+ swfdec_as_object_delete_variable (context->global, SWFDEC_AS_STR_Function);
+ }
context->Function = function;
SWFDEC_AS_VALUE_SET_OBJECT (&val, function);
swfdec_as_object_set_variable (function, SWFDEC_AS_STR_constructor, &val);
diff-tree cb168347a7ab95b8918e3d4d737e37bd693fda10 (from 12a24b52a62b851c41bc2...
2007 Dec 17
0
2 commits - doc/Makefile.am doc/swfdec-sections.txt NEWS
...+swfdec_as_integer_to_string
swfdec_as_str_concat
<SUBSECTION Standard>
SWFDEC_IS_AS_VALUE
@@ -344,6 +348,7 @@ swfdec_as_object_set_variable_and_flags
swfdec_as_object_add_variable
swfdec_as_object_set_variable_flags
swfdec_as_object_unset_variable_flags
+swfdec_as_object_has_variable
swfdec_as_object_delete_variable
swfdec_as_object_delete_all_variables
SwfdecAsVariableForeach
2007 Aug 17
1
libswfdec/swfdec_as_object.c
...@@
/**
* SwfdecAsVariableFlag:
- * @SWFDEC_AS_VARIABLE_DONT_ENUM: Do not include variable in enumerations and
+ * @SWFDEC_AS_VARIABLE_HIDDEN: Do not include variable in enumerations and
* swfdec_as_object_foreach().
* @SWFDEC_AS_VARIABLE_PERMANENT: Do not all swfdec_as_object_delete_variable()
* to delete this variable.
- * @SWFDEC_AS_VARIABLE_READONLY: Do not allow changing the value with
+ * @SWFDEC_AS_VARIABLE_CONSTANT: Do not allow changing the value with
* swfdec_as_object_set_variable().
*
* These flags are used...
2007 Nov 09
0
10 commits - doc/swfdec-sections.txt libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_object.h libswfdec/swfdec_loader.c libswfdec/swfdec_movie.c libswfdec/swfdec_movie_clip_loader.c libswfdec/swfdec_movie.h
...ete_all_variables/
diff --git a/doc/swfdec-sections.txt b/doc/swfdec-sections.txt
index 0916f16..4a5e12a 100644
--- a/doc/swfdec-sections.txt
+++ b/doc/swfdec-sections.txt
@@ -345,6 +345,7 @@ swfdec_as_object_add_variable
swfdec_as_object_set_variable_flags
swfdec_as_object_unset_variable_flags
swfdec_as_object_delete_variable
+swfdec_as_object_delete_all_variables
SwfdecAsVariableForeach
swfdec_as_object_foreach
swfdec_as_object_has_function
diff --git a/libswfdec/swfdec_as_object.c b/libswfdec/swfdec_as_object.c
index 877f6e4..bb4adcc 100644
--- a/libswfdec/swfdec_as_object.c
+++ b/libswfdec/swfdec_as_object.c
@@ -9...
2007 Sep 13
0
5 commits - libswfdec/Makefile.am libswfdec/swfdec_as_context.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame_internal.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_scope.c libswfdec/swfdec_as_scope.h libswfdec/swfdec_as_script_function.c
...frame, const char *variable)
{
- SwfdecAsScope *cur;
- guint i;
+ GSList *walk;
SwfdecAsDeleteReturn ret;
g_return_val_if_fail (SWFDEC_IS_AS_FRAME (frame), FALSE);
g_return_val_if_fail (variable != NULL, FALSE);
- cur = frame->scope;
- for (i = 0; i < 256; i++) {
- ret = swfdec_as_object_delete_variable (SWFDEC_AS_OBJECT (cur), variable);
+ for (walk = frame->scope_chain; walk; walk = walk->next) {
+ ret = swfdec_as_object_delete_variable (walk->data, variable);
if (ret)
return ret;
- if (cur->next == NULL)
- break;
- cur = cur->next;
- }
- if (i == 256)...
2007 Aug 20
0
Branch 'vivi' - 60 commits - libswfdec-gtk/swfdec_gtk_loader.c libswfdec/Makefile.am libswfdec/swfdec_as_array.c libswfdec/swfdec_as_context.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame_internal.h libswfdec/swfdec_as_interpret.c
...le (SwfdecAsFrame *frame, const char *variable)
{
SwfdecAsScope *cur;
guint i;
+ SwfdecAsDeleteReturn ret;
g_return_val_if_fail (SWFDEC_IS_AS_FRAME (frame), FALSE);
g_return_val_if_fail (variable != NULL, FALSE);
cur = frame->scope;
for (i = 0; i < 256; i++) {
- if (swfdec_as_object_delete_variable (SWFDEC_AS_OBJECT (cur), variable))
- return TRUE;
+ ret = swfdec_as_object_delete_variable (SWFDEC_AS_OBJECT (cur), variable);
+ if (ret)
+ return ret;
if (cur->next == NULL)
break;
cur = cur->next;
@@ -528,8 +529,9 @@ swfdec_as_frame_delete_variable (SwfdecA...
2007 Mar 28
0
Branch 'as' - 3 commits - libswfdec/Makefile.am libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame.h libswfdec/swfdec_as_object.c libswfdec/swfdec_as_object.h libswfdec/swfdec_as_types.c
...OBJECT (object));
- g_return_if_fail (SWFDEC_AS_IS_VALUE (variable));
+ g_return_if_fail (SWFDEC_IS_AS_OBJECT (object));
+ g_return_if_fail (SWFDEC_IS_AS_VALUE (variable));
g_return_if_fail (value != NULL);
s = swfdec_as_value_to_string (object->context, variable);
@@ -206,8 +206,8 @@ swfdec_as_object_delete_variable (Swfdec
SwfdecAsObjectVariable *var;
guint i;
- g_return_if_fail (SWFDEC_AS_IS_OBJECT (object));
- g_return_if_fail (SWFDEC_AS_IS_VALUE (variable));
+ g_return_if_fail (SWFDEC_IS_AS_OBJECT (object));
+ g_return_if_fail (SWFDEC_IS_AS_VALUE (variable));
s = swfdec_as_value_to_string...
2008 Jan 07
0
3 commits - libswfdec-gtk/swfdec_gtk_loader.c libswfdec/swfdec_as_array.c libswfdec/swfdec_asbroadcaster.c libswfdec/swfdec_as_function.c libswfdec/swfdec_as_types.c libswfdec/swfdec_xml.c
...array.c
index 61a62e9..f28170c 100644
--- a/libswfdec/swfdec_as_array.c
+++ b/libswfdec/swfdec_as_array.c
@@ -182,7 +182,7 @@ swfdec_as_array_remove_range (SwfdecAsArray *array, gint32 start_index,
// to avoid foreach loop, use special case when removing just one variable
if (num == 1) {
swfdec_as_object_delete_variable (object,
- swfdec_as_double_to_string (object->context, start_index));
+ swfdec_as_integer_to_string (object->context, start_index));
} else {
ForeachRemoveRangeData fdata = { start_index, num };
swfdec_as_object_foreach_remove (object,
@@ -208,7 +208,7 @@ swfdec_as_array_foreach...
2007 Apr 05
0
Branch 'as' - 9 commits - configure.ac libswfdec/swfdec_as_context.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame.h libswfdec/swfdec_as_function.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_object.h
..._object_find_variable
Finds the object in the prototype chain that defines the variable or NULL
diff --git a/libswfdec/swfdec_as_object.c b/libswfdec/swfdec_as_object.c
index a8cb206..588094f 100644
--- a/libswfdec/swfdec_as_object.c
+++ b/libswfdec/swfdec_as_object.c
@@ -250,6 +250,29 @@ swfdec_as_object_delete_variable (Swfdec
}
}
+SwfdecAsObject *
+swfdec_as_object_find_variable (SwfdecAsObject *object,
+ const SwfdecAsValue *variable)
+{
+ const char *s;
+ guint i;
+
+ g_return_val_if_fail (SWFDEC_IS_AS_OBJECT (object), NULL);
+ g_return_val_if_fail (SWFDEC_IS_AS_VALUE (variable), NULL);
+
+ s = s...
2007 Jun 27
0
Branch 'as' - 16 commits - configure.ac libswfdec/Makefile.am libswfdec/swfdec_as_context.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame.h libswfdec/swfdec_as_function.c libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_script_function.c
..._OBJECT (frame)->context->global;
@@ -255,14 +249,8 @@ swfdec_as_frame_delete_variable (SwfdecA
g_assert (SWFDEC_IS_AS_FRAME (cur));
/* we've walked the scope chain down. Now look in the special objects. */
/* 1) the target set via SetTarget */
- if (frame->target) {
- if (swfdec_as_object_delete_variable (frame->target, variable))
- return TRUE;
- } else {
- /* The default target is the original object that called into us */
- if (swfdec_as_object_delete_variable (SWFDEC_AS_FRAME (cur)->thisp, variable))
- return TRUE;
- }
+ if (swfdec_as_object_delete_variable (frame->t...
2007 Aug 17
0
4 commits - libswfdec/swfdec_as_context.c libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_object.h test/trace
...BLE_READONLY is now SWFDEC_AS_VARIABLE_CONSTANT
diff --git a/libswfdec/swfdec_as_interpret.c b/libswfdec/swfdec_as_interpret.c
index 47e62d5..f9a2cc2 100644
--- a/libswfdec/swfdec_as_interpret.c
+++ b/libswfdec/swfdec_as_interpret.c
@@ -1870,6 +1870,8 @@ swfdec_action_extends (SwfdecAsContext *
swfdec_as_object_delete_variable (prototype, SWFDEC_AS_STR_constructor);
swfdec_as_object_set_variable (prototype, SWFDEC_AS_STR___constructor__,
superclass);
+ swfdec_as_object_set_variable_flags (prototype, SWFDEC_AS_STR___constructor__,
+ SWFDEC_AS_VARIABLE_HIDDEN);
SWFDEC_AS_VALUE_SET_OBJECT (&proto, pro...
2007 Aug 17
0
2 commits - libswfdec/swfdec_as_array.c test/trace
...-swfdec_as_array_remove_range (SwfdecAsArray *array, gint32 start_index, gint32 num)
+swfdec_as_array_remove_range (SwfdecAsArray *array, gint32 start_index,
+ gint32 num)
{
SwfdecAsObject *object = SWFDEC_AS_OBJECT (array);
@@ -140,7 +153,8 @@ swfdec_as_array_remove_range (SwfdecAsAr
swfdec_as_object_delete_variable (object, var);
} else {
ForeachRemoveRangeData fdata = { start_index, num };
- swfdec_as_object_foreach_remove (object, swfdec_as_array_foreach_remove_range, &fdata);
+ swfdec_as_object_foreach_remove (object,
+ swfdec_as_array_foreach_remove_range, &fdata);
}
}
@@ -151,...