Displaying 20 results from an estimated 50 matches for "swfdec_as_value_set_undefin".
Did you mean:
swfdec_as_value_set_undefined
2007 Sep 26
1
Youtube broken by 89d295a94
...ovie_by_path (cx, s, &object, &s)) {
if (object) {
if (s) {
@@ -589,7 +590,7 @@ swfdec_action_get_variable (SwfdecAsContext *cx, guint action, const guint8 *dat
swfdec_as_frame_get_variable (cx->frame, swfdec_as_context_get_string (cx, s), val);
}
} else {
- SWFDEC_AS_VALUE_SET_UNDEFINED (val);
+// SWFDEC_AS_VALUE_SET_UNDEFINED (val);
#ifdef SWFDEC_WARN_MISSING_PROPERTIES
SWFDEC_WARNING ("no variable named %s", s);
#endif
--
Regards,
Pavel Roskin
2007 Sep 10
0
3 commits - libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_object.h
...ec_as_watch_new (SwfdecAsFunction *function)
+{
+ SwfdecAsWatch *watch;
+
+ if (!swfdec_as_context_use_mem (SWFDEC_AS_OBJECT (function)->context,
+ sizeof (SwfdecAsWatch)))
+ return NULL;
+
+ watch = g_slice_new (SwfdecAsWatch);
+ watch->refcount = 1;
+ watch->watch = function;
+ SWFDEC_AS_VALUE_SET_UNDEFINED (&watch->watch_data);
+ return watch;
+}
+
+static inline gboolean
+swfdec_as_watch_can_recurse (SwfdecAsWatch *watch)
+{
+ guint version;
+
+ version = SWFDEC_AS_OBJECT (watch->watch)->context->version;
+ if (version <= 6) {
+ return watch->refcount <= 1;
+ } els...
2007 Jul 30
0
10 commits - libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_super.c libswfdec/swfdec_video_movie_as.c test/trace
...AS_VALUE_SET_OBJECT (&val, args);
+ swfdec_as_object_set_variable (object, SWFDEC_AS_STR_arguments, &val);
+ }
+ if (!(script->flags & SWFDEC_SCRIPT_SUPPRESS_SUPER)) {
+ if (frame->super) {
+ SWFDEC_AS_VALUE_SET_OBJECT (&val, frame->super);
+ } else {
+ SWFDEC_AS_VALUE_SET_UNDEFINED (&val);
+ }
+ swfdec_as_object_set_variable (object, SWFDEC_AS_STR_super, &val);
+ }
- if (!args)
- return;
- for (cur = swfdec_as_stack_iterator_init_arguments (&iter, frame); cur != NULL;
- cur = swfdec_as_stack_iterator_next (&iter)) {
- swfdec_as_array...
2007 Oct 26
0
8 commits - doc/swfdec-sections.txt libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_interpret.c test/trace
...alue)
{
g_return_val_if_fail (SWFDEC_IS_AS_CONTEXT (context), FALSE);
- if (!context->throwing)
+ if (!context->exception)
return FALSE;
if (value != NULL)
- *value = context->throw_value;
+ *value = context->exception_value;
- context->throwing = FALSE;
- SWFDEC_AS_VALUE_SET_UNDEFINED (&context->throw_value);
+ context->exception = FALSE;
+ SWFDEC_AS_VALUE_SET_UNDEFINED (&context->exception_value);
return TRUE;
}
@@ -858,14 +858,14 @@ start:
while (context->state < SWFDEC_AS_CONTEXT_ABORTED) {
// in case of an exception, skip blocks until...
2007 Nov 14
0
7 commits - libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_function.c libswfdec/swfdec_as_internal.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_super.c libswfdec/swfdec_as_super.h
...(cur);
}
- if (!swfdec_as_object_get_variable_and_flags (super->object->prototype, variable, val, NULL, NULL))
- return FALSE;
+ if (i > SWFDEC_AS_OBJECT_PROTOTYPE_RECURSION_LIMIT)
+ swfdec_as_context_abort (object->context, "Prototype recursion limit exceeded");
+ SWFDEC_AS_VALUE_SET_UNDEFINED (val);
*flags = 0;
- return TRUE;
+ return FALSE;
}
static void
@@ -166,13 +178,11 @@ swfdec_as_super_new (SwfdecAsFrame *frame, SwfdecAsObject *ref, gboolean callabl
* swfdec_as_super_new_chain:
* @frame: the frame that is called
* @super: the super object to chain from
- * @funct...
2007 Oct 26
0
3 commits - libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_interpret.c
...ile in catch block:
+ // create new block for finally, passing the exception
+ // clear exception from the context
+
error = g_malloc (sizeof (SwfdecAsValue));
*error = cx->throw_value;
@@ -2611,7 +2634,7 @@ swfdec_action_try_end_catch (SwfdecAsFrame *frame, gpointer data)
SWFDEC_AS_VALUE_SET_UNDEFINED (&cx->throw_value);
}
- swfdec_action_try_free_data (try_data);
+ swfdec_action_try_data_unref (try_data);
}
static void
@@ -2623,6 +2646,8 @@ swfdec_action_try_end_try (SwfdecAsFrame *frame, gpointer data)
g_return_if_fail (SWFDEC_IS_AS_FRAME (frame));
g_return_if_fail (t...
2007 Oct 15
0
8 commits - libswfdec/swfdec_as_interpret.c libswfdec/swfdec_sound.c libswfdec/swfdec_sound.h test/trace
...*val)
-{
- if (SWFDEC_AS_VALUE_IS_STRING (val)) {
- const char *s = SWFDEC_AS_VALUE_GET_STRING (val);
- if (s != SWFDEC_AS_STR_EMPTY) {
- swfdec_as_context_eval (cx, obj, s, val);
- return s;
- }
- }
- if (obj != NULL)
- SWFDEC_AS_VALUE_SET_OBJECT (val, obj);
- else
- SWFDEC_AS_VALUE_SET_UNDEFINED (val);
- return SWFDEC_AS_STR_EMPTY;
-}
-
/* FIXME: this sucks */
extern struct {
gboolean needs_movie;
@@ -1647,16 +1629,15 @@ swfdec_action_new_object (SwfdecAsContext *cx, guint action, const guint8 *data,
SwfdecAsValue *constructor;
SwfdecAsFunction *fun;
guint n_args;
- const...
2007 Jun 28
0
Branch 'as' - 2 commits - doc/swfdec-sections.txt libswfdec/swfdec_as_types.c libswfdec/swfdec_as_types.h
...document the macros
diff --git a/doc/swfdec-sections.txt b/doc/swfdec-sections.txt
index 30ac93b..4d93f11 100644
--- a/doc/swfdec-sections.txt
+++ b/doc/swfdec-sections.txt
@@ -184,10 +184,31 @@ SWFDEC_TYPE_GTK_LOADER
<TITLE>SwfdecAsValue</TITLE>
SwfdecAsValueType
SwfdecAsValue
+SWFDEC_AS_VALUE_SET_UNDEFINED
+SWFDEC_AS_VALUE_GET_BOOLEAN
swfdec_as_value_to_boolean
-swfdec_as_value_to_integer
+SWFDEC_AS_VALUE_SET_BOOLEAN
+SWFDEC_AS_VALUE_GET_NUMBER
swfdec_as_value_to_number
+swfdec_as_value_to_integer
+SWFDEC_AS_VALUE_SET_INT
+SWFDEC_AS_VALUE_SET_NUMBER
+SWFDEC_AS_VALUE_GET_STRING
+swfdec_as_value_to...
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
...*val)
+{
+ if (SWFDEC_AS_VALUE_IS_STRING (val)) {
+ const char *s = SWFDEC_AS_VALUE_GET_STRING (val);
+ if (s != SWFDEC_AS_STR_EMPTY) {
+ swfdec_as_context_eval (cx, obj, s, val);
+ return s;
+ }
+ }
+ if (obj != NULL)
+ SWFDEC_AS_VALUE_SET_OBJECT (val, obj);
+ else
+ SWFDEC_AS_VALUE_SET_UNDEFINED (val);
+ return SWFDEC_AS_STR_EMPTY;
+}
+
+#define CONSTANT_INDEX 39
+static void
+swfdec_action_get_property (SwfdecAsContext *cx, guint action, const guint8 *data, guint len)
+{
+ SwfdecAsValue *val;
+ SwfdecAsObject *obj;
+ guint id;
+
+ id = swfdec_as_value_to_integer (cx, swfdec_as_stac...
2007 Apr 04
0
Branch 'as' - 9 commits - 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_stack.c libswfdec/swfdec_as_stack.h
..._VALUE_SET_NUMBER (swfdec_as_stack_push (stack),
+ swfdec_bits_get_float (&bits));
+ break;
case 2: /* null */
- *cx->fp->sp++ = JSVAL_NULL;
+ SWFDEC_AS_VALUE_SET_NULL (swfdec_as_stack_push (stack));
break;
case 3: /* undefined */
- *cx->fp->sp++ = JSVAL_VOID;
+ SWFDEC_AS_VALUE_SET_UNDEFINED (swfdec_as_stack_push (stack));
break;
case 4: /* register */
{
guint regnum = swfdec_bits_get_u8 (&bits);
if (!swfdec_action_has_register (cx, regnum)) {
SWFDEC_ERROR ("cannot Push register %u: not enough registers", regnum);
- return JS_FALSE;
+ re...
2007 May 22
0
Branch 'as' - 9 commits - libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_function.c libswfdec/swfdec_as_function.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_native_function.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_script_function.c
...me;
- context->frame = frame;
return frame;
}
diff --git a/libswfdec/swfdec_as_function.c b/libswfdec/swfdec_as_function.c
index ceae2d4..8a27b9f 100644
--- a/libswfdec/swfdec_as_function.c
+++ b/libswfdec/swfdec_as_function.c
@@ -83,8 +83,10 @@ swfdec_as_function_call (SwfdecAsFunctio
SWFDEC_AS_VALUE_SET_UNDEFINED (return_value);
klass = SWFDEC_AS_FUNCTION_GET_CLASS (function);
g_assert (klass->call);
- klass->call (function);
- frame = context->frame;
+ frame = klass->call (function);
+ /* FIXME: figure out what to do in these situations */
+ if (frame == NULL)
+ return;
if (t...
2007 Apr 12
0
Branch 'as' - 14 commits - libswfdec-gtk/swfdec_playback_alsa.c libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame.h libswfdec/swfdec_as_function.c libswfdec/swfdec_as_function.h
...varlist = g_strsplit (str, ".", -1);
}
- SWFDEC_AS_VALUE_SET_OBJECT (&cur, obj); /* FIXME: can be NULL here */
for (i = 0; varlist[i] != NULL; i++) {
const char *dot = swfdec_as_context_get_string (cx, varlist[i]);
- if (!SWFDEC_AS_VALUE_IS_OBJECT (&cur)) {
- SWFDEC_AS_VALUE_SET_UNDEFINED (&cur);
- break;
- }
- obj = SWFDEC_AS_VALUE_GET_OBJECT (&cur);
if (varlist[i+1] != NULL) {
swfdec_as_context_eval_get_property (cx, obj, dot, &cur);
+ if (!SWFDEC_AS_VALUE_IS_OBJECT (&cur)) {
+ SWFDEC_AS_VALUE_SET_UNDEFINED (&cur);
+ break;
+...
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
...org>
Date: Tue May 29 14:57:43 2007 +0200
reimplement NewMethod action
diff --git a/libswfdec/swfdec_as_interpret.c b/libswfdec/swfdec_as_interpret.c
index b9e19ad..42479d2 100644
--- a/libswfdec/swfdec_as_interpret.c
+++ b/libswfdec/swfdec_as_interpret.c
@@ -1327,54 +1327,44 @@ fail:
SWFDEC_AS_VALUE_SET_UNDEFINED (swfdec_as_stack_peek (cx->frame->stack, 1));
}
-#if 0
static void
swfdec_action_new_method (SwfdecAsContext *cx, guint action, const guint8 *data, guint len)
{
- JSStackFrame *fp = cx->fp;
- const char *s;
- guint32 n_args;
- JSObject *object;
- jsval constructor;
-
- if (...
2007 Apr 12
0
Branch 'as' - 15 commits - libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame.h libswfdec/swfdec_as_function.c libswfdec/swfdec_as_function.h libswfdec/swfdec_as_interpret.c
...t char *name, guint argc,
+ SwfdecAsValue *argv, SwfdecAsValue *return_value)
{
+ SwfdecAsValue tmp;
+ SwfdecAsFunction *fun;
+
g_return_if_fail (SWFDEC_IS_AS_OBJECT (object));
g_return_if_fail (name != NULL);
g_return_if_fail (argc == 0 || argv != NULL);
+
+ if (return_value)
+ SWFDEC_AS_VALUE_SET_UNDEFINED (return_value);
+ swfdec_as_object_get (object, name, &tmp);
+ if (!SWFDEC_AS_VALUE_IS_OBJECT (&tmp))
+ return;
+ fun = (SwfdecAsFunction *) SWFDEC_AS_VALUE_GET_OBJECT (&tmp);
+ if (!SWFDEC_IS_AS_FUNCTION (fun))
+ return;
+ swfdec_as_function_call (fun, object, argc, argv,...
2007 Jul 07
0
Branch 'as' - 7 commits - libswfdec/swfdec_as_context.c libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_object.h libswfdec/swfdec_as_super.c libswfdec/swfdec_as_super.h libswfdec/swfdec_as_with.c test/trace
...otype;
- }
+ if (SWFDEC_IS_AS_SUPER (fun)) {
+ SWFDEC_LOG ("replacing super object on frame");
+ swfdec_as_super_replace (SWFDEC_AS_SUPER (fun), NULL);
}
return TRUE;
@@ -631,8 +629,7 @@ swfdec_action_call_function (SwfdecAsCon
SWFDEC_AS_VALUE_SET_NULL (thisp);
SWFDEC_AS_VALUE_SET_UNDEFINED (fun);
}
- if (!swfdec_action_call (cx, n_args, SWFDEC_AS_VALUE_IS_OBJECT (fun) &&
- SWFDEC_IS_AS_SUPER (SWFDEC_AS_VALUE_GET_OBJECT (fun)))) {
+ if (!swfdec_action_call (cx, n_args)) {
SWFDEC_ERROR ("no function named %s", name);
}
}
@@ -645,7 +642,6 @@ swfdec_act...
2007 Oct 23
0
6 commits - libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_internal.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_interpret.h libswfdec/swfdec_as_object.c libswfdec/swfdec_as_script_function.c libswfdec/swfdec_flash_security.c
...gnored */
+ SwfdecAsFunction *fun;
+
+ g_return_if_fail (SWFDEC_IS_AS_OBJECT (object));
+ g_return_if_fail (SWFDEC_IS_SECURITY (sec));
+ g_return_if_fail (name != NULL);
+ g_return_if_fail (argc == 0 || argv != NULL);
+ g_return_if_fail (argc == 0 || argv != NULL);
+
+ if (return_value)
+ SWFDEC_AS_VALUE_SET_UNDEFINED (return_value);
+ swfdec_as_object_get_variable (object, name, &tmp);
+ if (!SWFDEC_AS_VALUE_IS_OBJECT (&tmp))
+ return;
+ fun = (SwfdecAsFunction *) SWFDEC_AS_VALUE_GET_OBJECT (&tmp);
+ if (!SWFDEC_IS_AS_FUNCTION (fun))
+ return;
+ swfdec_as_function_call (fun, object, arg...
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
...if (obj) {
- swfdec_as_object_get_variable (obj, name, ret);
- return;
- }
+ swfdec_as_frame_get_variable (cx->frame, name, ret);
} else {
SWFDEC_WARNING ("eval called without a frame");
swfdec_as_object_get_variable (cx->global, name, ret);
}
- SWFDEC_AS_VALUE_SET_UNDEFINED (ret);
}
}
@@ -985,11 +980,10 @@ swfdec_as_context_eval_set_property (Swf
SWFDEC_ERROR ("no frame in eval_set?");
return;
}
- obj = swfdec_as_frame_find_variable (cx->frame, name);
- if (obj == NULL || obj == cx->global)
- obj = cx->frame->...
2007 Aug 18
0
8 commits - libswfdec/Makefile.am libswfdec/swfdec_as_strings.c libswfdec/swfdec_load_object_as.c libswfdec/swfdec_load_object_as.h libswfdec/swfdec_load_object.c libswfdec/swfdec_load_object.h libswfdec/swfdec_player.c libswfdec/swfdec_player_internal.h
...if (load_object->text) {
SWFDEC_AS_VALUE_SET_STRING (&val,
- swfdec_as_context_get_string (SWFDEC_AS_OBJECT (load_object->target)->context, load_object->text));
+ swfdec_as_context_get_string (load_object->target->context,
+ load_object->text));
} else {
SWFDEC_AS_VALUE_SET_UNDEFINED (&val);
}
- swfdec_as_object_call (load_object->target, SWFDEC_AS_STR_onData, 1, &val, NULL);
+ swfdec_as_object_call (load_object->target, SWFDEC_AS_STR_onData, 1, &val,
+ NULL);
}
static void
-swfdec_load_object_loader_target_error (SwfdecLoaderTarget *target, Sw...
2007 Jun 17
2
Branch 'as' - libswfdec/swfdec_as_interpret.c
...ff --git a/libswfdec/swfdec_as_interpret.c b/libswfdec/swfdec_as_interpret.c
index 99ceb2b..9c98b45 100644
--- a/libswfdec/swfdec_as_interpret.c
+++ b/libswfdec/swfdec_as_interpret.c
@@ -780,7 +780,8 @@ swfdec_action_new_comparison_7 (SwfdecAs
swfdec_as_stack_pop (cx->frame->stack);
SWFDEC_AS_VALUE_SET_UNDEFINED (swfdec_as_stack_peek (cx->frame->stack, 1));
} else if (SWFDEC_AS_VALUE_IS_STRING (rval) || SWFDEC_AS_VALUE_IS_STRING (lval)) {
- int comp = strcmp (SWFDEC_AS_VALUE_GET_STRING (rval), SWFDEC_AS_VALUE_GET_STRING (lval));
+ int comp = strcmp (swfdec_as_value_to_string (cx, rval),
+...
2007 May 29
0
Branch 'as' - 8 commits - libswfdec/Makefile.am libswfdec/swfdec_as_array.c libswfdec/swfdec_as_context.c libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_math.c libswfdec/swfdec_as_math.h libswfdec/swfdec_as_strings.c libswfdec/swfdec_as_types.c
...od (SwfdecAsConte
swfdec_as_object_get_variable (obj, name, swfdec_as_stack_peek (frame->stack, 2));
}
} else {
+ if (SWFDEC_AS_VALUE_IS_STRING (val))
+ name = SWFDEC_AS_VALUE_GET_STRING (val);
SWFDEC_AS_VALUE_SET_NULL (swfdec_as_stack_peek (frame->stack, 3));
SWFDEC_AS_VALUE_SET_UNDEFINED (swfdec_as_stack_peek (frame->stack, 2));
}
diff-tree b5cddf5ee7be4ec7c966a61692b4f3fe37e35b75 (from 228f4e1eba33dcdd45634a44c3c5736e3963c982)
Author: Benjamin Otte <otte at gnome.org>
Date: Sun May 27 18:32:06 2007 +0200
implement parseInt
diff --git a/libswfdec/swfdec_as_con...