search for: swfdec_action_call_function

Displaying 20 results from an estimated 24 matches for "swfdec_action_call_function".

2007 Dec 19
6
[Bug 13739] New: rutube.ru player is not working
http://bugs.freedesktop.org/show_bug.cgi?id=13739 Summary: rutube.ru player is not working Product: swfdec Version: git Platform: x86-64 (AMD64) URL: http://rutube.ru/tracks/38127.html?v=12e2ab9a6d7379339ae bfb6bff03be7a OS/Version: Linux (All) Status: NEW Severity: normal
2007 Jan 31
0
Branch 'interpreter' - 3 commits - libswfdec/js libswfdec/swfdec_script.c
...ction_define_local, swfdec_action_define_local, swfdec_action_define_local } }, + [0x3c] = { "DefineLocal", NULL, 2, 0, { NULL, NULL, swfdec_action_define_local, swfdec_action_define_local, swfdec_action_define_local } }, [0x3d] = { "CallFunction", NULL, -1, 1, { NULL, NULL, swfdec_action_call_function, swfdec_action_call_function, swfdec_action_call_function } }, - [0x3e] = { "Return", NULL }, + [0x3e] = { "Return", NULL, 1, 0, { NULL, NULL, swfdec_action_return, swfdec_action_return, swfdec_action_return } }, [0x3f] = { "Modulo", NULL }, [0x40] = { "Ne...
2007 Feb 16
0
11 commits - libswfdec/swfdec_font.c libswfdec/swfdec_font.h libswfdec/swfdec_js_movie.c libswfdec/swfdec_script.c libswfdec/swfdec_script.h test/.gitignore test/trace
...static char * @@ -2020,7 +2058,7 @@ static const SwfdecActionSpec actions[25 [0x3c] = { "DefineLocal", NULL, 2, 0, { NULL, NULL, swfdec_action_define_local, swfdec_action_define_local, swfdec_action_define_local } }, [0x3d] = { "CallFunction", NULL, -1, 1, { NULL, NULL, swfdec_action_call_function, swfdec_action_call_function, swfdec_action_call_function } }, [0x3e] = { "Return", NULL, 1, 0, { NULL, NULL, swfdec_action_return, swfdec_action_return, swfdec_action_return } }, - [0x3f] = { "Modulo", NULL }, + [0x3f] = { "Modulo", NULL, 2, 1, { NULL, NULL, swfd...
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
..., swfdec_action_delete2 } }, [SWFDEC_AS_ACTION_DEFINE_LOCAL] = { "DefineLocal", NULL, 2, 0, { NULL, NULL, swfdec_action_define_local, swfdec_action_define_local, swfdec_action_define_local } }, [SWFDEC_AS_ACTION_CALL_FUNCTION] = { "CallFunction", NULL, -1, 1, { NULL, NULL, swfdec_action_call_function, swfdec_action_call_function, swfdec_action_call_function } }, [SWFDEC_AS_ACTION_RETURN] = { "Return", NULL, 1, 0, { NULL, NULL, swfdec_action_return, swfdec_action_return, swfdec_action_return } }, diff-tree 91a151966efb877bc00d769a59700857e8534353 (from e43ad1b2e784b00f6ba8b9955a32ee...
2007 Mar 05
0
11 commits - configure.ac libswfdec/swfdec_js_movie.c libswfdec/swfdec_root_movie.c libswfdec/swfdec_root_movie.h libswfdec/swfdec_script.c libswfdec/swfdec_sprite.c libswfdec/swfdec_sprite.h libswfdec/swfdec_sprite_movie.c libswfdec/swfdec_swf_decoder.c
...NULL, swfdec_action_delete2, swfdec_action_delete2, swfdec_action_delete2 } }, [0x3c] = { "DefineLocal", NULL, 2, 0, { NULL, NULL, swfdec_action_define_local, swfdec_action_define_local, swfdec_action_define_local } }, [0x3d] = { "CallFunction", NULL, -1, 1, { NULL, NULL, swfdec_action_call_function, swfdec_action_call_function, swfdec_action_call_function } }, [0x3e] = { "Return", NULL, 1, 0, { NULL, NULL, swfdec_action_return, swfdec_action_return, swfdec_action_return } }, @@ -2470,7 +2490,10 @@ swfdec_script_interpret (SwfdecScript *s if (script->flags & SWFDEC_SCR...
2007 Feb 01
0
Branch 'interpreter' - 9 commits - libswfdec/js libswfdec/swfdec_script.c libswfdec/swfdec_script.h player/swfdec_debug_stack.c test/trace
...t.c @@ -161,7 +161,7 @@ swfdec_action_to_number (JSContext *cx, static JSBool swfdec_value_to_number_7 (JSContext *cx, jsval val, double *d) { - if (JSVAL_IS_NULL (val)) { + if (JSVAL_IS_OBJECT (val)) { *d = *cx->runtime->jsNaN; return JS_TRUE; } else { @@ -550,8 +550,10 @@ swfdec_action_call_function (JSContext * JSStackFrame *fp = cx->fp; const char *s; guint32 n_args; - JSObject *obj; + JSObject *obj, *pobj; + JSProperty *prop; jsval fun; + JSAtom *atom; s = swfdec_js_to_string (cx, fp->sp[-1]); if (s == NULL) @@ -561,7 +563,9 @@ swfdec_action_call_function (JS...
2008 Jan 21
1
70 commits
Hey, In case someone filters commit mails or doesn't read 1MB blobs, I've just merged the result of me getting annoyed at various stuff. Unfortunately, this grew a bit out of hand and ended up being very huge. I expect this merge to have broken lots of things, so if you find stuff that used to work and now doesn't work (or even crashes), please poke me about it. What does this patch
2007 Nov 07
0
14 commits - libswfdec/swfdec_as_context.c libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_interpret.h libswfdec/swfdec_net_stream.c libswfdec/swfdec_script.c libswfdec/swfdec_sprite_movie.c libswfdec/swfdec_tag.c libswfdec/swfdec_text_field_movie.c
..., swfdec_action_delete2 } }, - [SWFDEC_AS_ACTION_DEFINE_LOCAL] = { "DefineLocal", NULL, 2, 0, { NULL, NULL, swfdec_action_define_local, swfdec_action_define_local, swfdec_action_define_local } }, - [SWFDEC_AS_ACTION_CALL_FUNCTION] = { "CallFunction", NULL, -1, 1, { NULL, NULL, swfdec_action_call_function, swfdec_action_call_function, swfdec_action_call_function } }, - [SWFDEC_AS_ACTION_RETURN] = { "Return", NULL, 1, 0, { NULL, NULL, swfdec_action_return, swfdec_action_return, swfdec_action_return } }, - [SWFDEC_AS_ACTION_MODULO] = { "Modulo", NULL, 2, 1, { NULL, NULL, swfdec_a...
2007 Sep 10
0
3 commits - libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_object.h
...Date: Sun Sep 9 21:58:48 2007 +0200 don't ERROR about missing functions, just WARN diff --git a/libswfdec/swfdec_as_interpret.c b/libswfdec/swfdec_as_interpret.c index 71a5663..564c35a 100644 --- a/libswfdec/swfdec_as_interpret.c +++ b/libswfdec/swfdec_as_interpret.c @@ -801,7 +801,7 @@ swfdec_action_call_function (SwfdecAsCon SWFDEC_AS_VALUE_SET_UNDEFINED (fun); } if (!swfdec_action_call (cx, n_args)) { - SWFDEC_ERROR ("no function named %s", name); + SWFDEC_WARNING ("no function named %s", name); } } @@ -855,7 +855,7 @@ swfdec_action_call_method (SwfdecAsConte...
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
...8 @@ const SwfdecActionSpec swfdec_as_actions [0x3c] = { "DefineLocal", NULL, 2, 0, { NULL, NULL, swfdec_action_define_local, swfdec_action_define_local, swfdec_action_define_local } }, #endif [SWFDEC_AS_ACTION_CALL_FUNCTION] = { "CallFunction", NULL, -1, 1, { NULL, NULL, swfdec_action_call_function, swfdec_action_call_function, swfdec_action_call_function } }, -#if 0 [0x3e] = { "Return", NULL, 1, 0, { NULL, NULL, swfdec_action_return, swfdec_action_return, swfdec_action_return } }, +#if 0 [0x3f] = { "Modulo", NULL, 2, 1, { NULL, NULL, swfdec_action_modulo_5, swfdec_a...
2007 Jan 31
0
Branch 'interpreter' - 20 commits - autogen.sh configure.ac libswfdec/js libswfdec/swfdec_debug.h libswfdec/swfdec_js.c libswfdec/swfdec_js_color.c libswfdec/swfdec_js_movie.c libswfdec/swfdec_movie.c libswfdec/swfdec_movie.h libswfdec/swfdec_script.c
...fdec/swfdec_script.c index c398e62..b172ec6 100644 --- a/libswfdec/swfdec_script.c +++ b/libswfdec/swfdec_script.c @@ -387,6 +387,33 @@ swfdec_action_call (JSContext *cx, guint return js_Invoke (cx, n_args, flags); } +/* FIXME: lots of overlap with swfdec_action_call_method */ +static JSBool +swfdec_action_call_function (JSContext *cx, guint action, const guint8 *data, guint len) +{ + JSStackFrame *fp = cx->fp; + const char *s; + guint32 n_args; + JSObject *obj; + jsval fun; + + s = swfdec_js_to_string (cx, fp->sp[-1]); + if (s == NULL) + return JS_FALSE; + if (!JS_ValueToECMAUint32 (cx, fp->...
2007 Apr 04
0
Branch 'as' - 4 commits - libswfdec/Makefile.am libswfdec/swfdec_as_context.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_interpret.h libswfdec/swfdec_as_object.c libswfdec/swfdec_as_types.c libswfdec/swfdec_as_types.h
...FALSE; + } + + j = -1; + i = - (n_args + 2); + while (i < j) { + tmp = fp->sp[j]; + fp->sp[j] = fp->sp[i]; + fp->sp[i] = tmp; + j--; + i++; + } + return js_Invoke (cx, n_args, flags); +} + +/* FIXME: lots of overlap with swfdec_action_call_method */ +static void +swfdec_action_call_function (SwfdecAsContext *cx, guint action, const guint8 *data, guint len) +{ + JSStackFrame *fp = cx->fp; + const char *s; + guint32 n_args; + JSObject *obj, *pobj; + JSProperty *prop; + jsval fun; + JSAtom *atom; + + if (!swfdec_script_ensure_stack (cx, 2)) + return JS_FALSE; + s = swfde...
2007 Jul 12
0
Branch 'as' - 7 commits - libswfdec/swfdec_as_array.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_object.h libswfdec/swfdec_as_with.c libswfdec/swfdec_sprite_movie.c test/trace
...ject.</note> * * Returns: the object that contains @variable or %NULL if none. **/ diff --git a/libswfdec/swfdec_as_interpret.c b/libswfdec/swfdec_as_interpret.c index 3f88deb..0c65e72 100644 --- a/libswfdec/swfdec_as_interpret.c +++ b/libswfdec/swfdec_as_interpret.c @@ -611,8 +611,9 @@ swfdec_action_call_function (SwfdecAsCon fun = swfdec_as_stack_peek (cx, 1); obj = swfdec_as_frame_find_variable (frame, name); if (obj) { - SWFDEC_AS_VALUE_SET_OBJECT (thisp, obj); swfdec_as_object_get_variable (obj, name, fun); + obj = swfdec_as_object_resolve (obj); + SWFDEC_AS_VALUE_SET_OBJECT (this...
2007 Mar 11
0
10 commits - libswfdec/js libswfdec/swfdec_js_color.c libswfdec/swfdec_js_connection.c libswfdec/swfdec_js_movie.c libswfdec/swfdec_js_net_stream.c libswfdec/swfdec_js_video.c libswfdec/swfdec_js_xml.c libswfdec/swfdec_script.c player/.gitignore
...gs + 2 > stacksize) { + SWFDEC_WARNING ("broken script. Want %u arguments, only got %u", n_args, stacksize - 2); + n_args = stacksize - 2; + if (!swfdec_script_ensure_stack (cx, n_args + 2)) + return JS_FALSE; + } j = -1; i = - (n_args + 2); @@ -677,13 +685,13 @@ swfdec_action_call_function (JSContext * jsval fun; JSAtom *atom; + if (!swfdec_script_ensure_stack (cx, 2)) + return JS_FALSE; s = swfdec_js_to_string (cx, fp->sp[-1]); if (s == NULL) return JS_FALSE; if (!JS_ValueToECMAUint32 (cx, fp->sp[-2], &n_args)) return JS_FALSE; - if (!swfd...
2007 Mar 07
0
13 commits - libswfdec/Makefile.am libswfdec/swfdec_js_global.c libswfdec/swfdec_js_movie.c libswfdec/swfdec_root_movie.c libswfdec/swfdec_root_movie.h libswfdec/swfdec_script.c libswfdec/swfdec_sprite.h libswfdec/swfdec_sprite_movie.c
...d Mar 7 19:29:41 2007 +0100 omit object name for missing functions instead of always printing "global" diff --git a/libswfdec/swfdec_script.c b/libswfdec/swfdec_script.c index 7d93740..927aa67 100644 --- a/libswfdec/swfdec_script.c +++ b/libswfdec/swfdec_script.c @@ -653,8 +653,8 @@ swfdec_action_call_function (JSContext * if (!JS_GetProperty (cx, obj, s, &fun)) return JS_FALSE; if (!JSVAL_IS_OBJECT (fun)) { - SWFDEC_WARNING ("%s:%s is not a function", - JS_GetClass (obj)->name, s); + /* FIXME: figure out what class we operate on */ + SWFDEC_WARNING ("%s is not a...
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
...eturn TRUE; + return frame; error: n_args += 2; @@ -834,7 +838,7 @@ error: n_args = swfdec_as_stack_get_size (cx); swfdec_as_stack_pop_n (cx, n_args); SWFDEC_AS_VALUE_SET_UNDEFINED (swfdec_as_stack_push (cx)); - return FALSE; + return NULL; } static void @@ -858,7 +862,10 @@ swfdec_action_call_function (SwfdecAsContext *cx, guint action, const guint8 *da SWFDEC_AS_VALUE_SET_NULL (thisp); SWFDEC_AS_VALUE_SET_UNDEFINED (fun); } - if (!swfdec_action_call (cx, n_args)) { + frame = swfdec_action_call (cx, n_args); + if (frame) { + swfdec_as_frame_preload (frame); + } else { SW...
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
...t;frame->super)->object = SWFDEC_AS_SUPER (frame->super)->object->prototype; - } + 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_E...
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
...else { + SWFDEC_AS_VALUE_SET_OBJECT (val, object); + } } else { - SWFDEC_AS_VALUE_SET_OBJECT (val, object); + swfdec_as_frame_get_variable (cx->frame, swfdec_as_context_get_string (cx, s), val); } } else { SWFDEC_AS_VALUE_SET_UNDEFINED (val); @@ -791,9 +789,8 @@ swfdec_action_call_function (SwfdecAsCon name = swfdec_as_value_to_string (cx, swfdec_as_stack_peek (cx, 1)); thisp = swfdec_as_stack_peek (cx, 2); fun = swfdec_as_stack_peek (cx, 1); - obj = swfdec_as_frame_find_variable (frame, name); + obj = swfdec_as_frame_get_variable (frame, name, fun); if (obj) { - swf...
2007 Feb 06
0
109 commits - configure.ac libswfdec/js libswfdec/Makefile.am libswfdec/swfdec_bits.c libswfdec/swfdec_bits.h libswfdec/swfdec_buffer.c libswfdec/swfdec_button_movie.c libswfdec/swfdec_codec_screen.c libswfdec/swfdec_color.c libswfdec/swfdec_color.h
...t.c @@ -161,7 +161,7 @@ swfdec_action_to_number (JSContext *cx, static JSBool swfdec_value_to_number_7 (JSContext *cx, jsval val, double *d) { - if (JSVAL_IS_NULL (val)) { + if (JSVAL_IS_OBJECT (val)) { *d = *cx->runtime->jsNaN; return JS_TRUE; } else { @@ -550,8 +550,10 @@ swfdec_action_call_function (JSContext * JSStackFrame *fp = cx->fp; const char *s; guint32 n_args; - JSObject *obj; + JSObject *obj, *pobj; + JSProperty *prop; jsval fun; + JSAtom *atom; s = swfdec_js_to_string (cx, fp->sp[-1]); if (s == NULL) @@ -561,7 +563,9 @@ swfdec_action_call_function (JS...
2007 Nov 15
0
4 commits - libswfdec/swfdec_asbroadcaster.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame_internal.h libswfdec/swfdec_as_function.c libswfdec/swfdec_as_interpret.c test/trace
...swfdec_as_function_call (fun, thisp, length, argv_pass, ret); swfdec_as_context_run (cx); diff --git a/libswfdec/swfdec_as_interpret.c b/libswfdec/swfdec_as_interpret.c index ab6b41c..7d6686f 100644 --- a/libswfdec/swfdec_as_interpret.c +++ b/libswfdec/swfdec_as_interpret.c @@ -865,7 +865,6 @@ swfdec_action_call_function (SwfdecAsContext *cx, guint action, const guint8 *da frame = swfdec_action_call (cx, n_args); if (frame) { swfdec_as_frame_preload (frame); - frame->update_caller = TRUE; } else { SWFDEC_WARNING ("no function named %s", name); } diff --git a/libswfdec/swfdec_as...