Displaying 11 results from an estimated 11 matches for "swfdec_eval_jsv".
Did you mean:
swfdec_eval_jsval
2007 Feb 22
0
3 commits - libswfdec/swfdec_js.c libswfdec/swfdec_js_movie.c libswfdec/swfdec_script.c
..."_target", "_framesloaded", "_name", "_droptarget",
- "_url", "_highquality", "_focusrect", "_soundbuftime", "_quality",
- "_xmouse", "_ymouse"
-};
-
-static JSBool
+static const char *
swfdec_eval_jsval (JSContext *cx, JSObject *obj, jsval *val)
{
if (JSVAL_IS_STRING (*val)) {
const char *bytes = swfdec_js_to_string (cx, *val);
if (bytes == NULL)
- return JS_FALSE;
+ return NULL;
*val = swfdec_js_eval (cx, obj, bytes);
+ return bytes;
} else {
- if (obj == N...
2007 Jan 26
0
Branch 'interpreter' - 9 commits - libswfdec/js libswfdec/Makefile.am libswfdec/swfdec_debugger.c libswfdec/swfdec_debugger.h libswfdec/swfdec_edittext_movie.c libswfdec/swfdec_event.c libswfdec/swfdec_js.c libswfdec/swfdec_js_global.c
...FALSE;
- swfdec_js_eval_set (cx, cx->fp->scopeChain, s, cx->fp->sp[-1],
- ((SwfdecScript *) cx->fp->swf)->version < 7);
+ swfdec_js_eval_set (cx, cx->fp->scopeChain, s, cx->fp->sp[-1]);
cx->fp->sp -= 2;
return JS_TRUE;
}
@@ -441,8 +439,7 @@ swfdec_eval_jsval (JSContext *cx, JSObje
const char *bytes = swfdec_js_to_string (cx, *val);
if (bytes == NULL)
return JS_FALSE;
- *val = swfdec_js_eval (cx, obj, bytes,
- ((SwfdecScript *) cx->fp->swf)->version < 7);
+ *val = swfdec_js_eval (cx, obj, bytes);
} else {
*va...
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
...tion, const guint8 *data, guint len)
@@ -674,128 +780,15 @@ fail:
fp->sp[-1] = JSVAL_VOID;
return JS_TRUE;
}
+#endif
static void
swfdec_action_pop (SwfdecAsContext *cx, guint action, const guint8 *data, guint len)
{
- cx->fp->sp--;
- return JS_TRUE;
-}
-
-static const char *
-swfdec_eval_jsval (SwfdecAsContext *cx, JSObject *obj, jsval *val)
-{
- if (JSVAL_IS_STRING (*val)) {
- const char *bytes = swfdec_js_to_string (cx, *val);
- if (bytes == NULL)
- return NULL;
- *val = swfdec_js_eval (cx, obj, bytes);
- return bytes;
- } else {
- if (obj == NULL) {
- obj...
2007 Jan 25
0
Branch 'interpreter' - 28 commits - configure.ac libswfdec/js libswfdec/swfdec_buffer.c libswfdec/swfdec_edittext_movie.c libswfdec/swfdec_js.c libswfdec/swfdec_js_global.c libswfdec/swfdec_js.h libswfdec/swfdec_js_movie.c libswfdec/swfdec_player.c
...return JS_FALSE;
+
+ if (strpbrk (s, "./:")) {
+ SWFDEC_WARNING ("FIXME: implement paths");
+ }
+ if (!JS_SetProperty (cx, cx->fp->scopeChain, s, &cx->fp->sp[-1]))
+ return JS_FALSE;
+ cx->fp->sp -= 2;
return JS_TRUE;
}
@@ -425,7 +444,8 @@ swfdec_eval_jsval (JSContext *cx, JSObje
const char *bytes = swfdec_js_to_string (cx, *val);
if (bytes == NULL)
return JS_FALSE;
- *val = swfdec_js_eval (cx, obj, bytes);
+ *val = swfdec_js_eval (cx, obj, bytes,
+ ((SwfdecScript *) cx->fp->swf)->version < 7);
} else {
*va...
2007 Jan 29
0
Branch 'interpreter' - 18 commits - libswfdec/swfdec_image.c libswfdec/swfdec_image.h libswfdec/swfdec_js.c libswfdec/swfdec_js_color.c libswfdec/swfdec_js_sound.c libswfdec/swfdec_pattern.c libswfdec/swfdec_scriptable.c libswfdec/swfdec_script.c
...ontext *cx
return JS_TRUE;
}
+static JSBool
+swfdec_action_new_object (JSContext *cx, guint action, const guint8 *data, guint len)
+{
+ JSStackFrame *fp = cx->fp;
+ jsval constructor;
+ JSObject *object;
+ const JSClass *clasp;
+ guint n_args;
+
+ constructor = fp->sp[-1];
+ if (!swfdec_eval_jsval (cx, NULL, &constructor))
+ return JS_FALSE;
+ if (!JS_ValueToECMAUint32 (cx, fp->sp[-2], &n_args))
+ return JS_FALSE;
+ if ((guint) (fp->sp - fp->spbase) < n_args + 2) {
+ SWFDEC_ERROR ("not enough stack space");
+ return JS_FALSE;
+ }
+ fp->sp[-1...
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
...(cx, n_args, 0);
+ return JS_TRUE;
+
+fail:
+ fp->sp -= 2 + n_args;
+ fp->sp[-1] = JSVAL_VOID;
+ return JS_TRUE;
+}
+
+static void
+swfdec_action_pop (SwfdecAsContext *cx, guint action, const guint8 *data, guint len)
+{
+ cx->fp->sp--;
+ return JS_TRUE;
+}
+
+static const char *
+swfdec_eval_jsval (SwfdecAsContext *cx, JSObject *obj, jsval *val)
+{
+ if (JSVAL_IS_STRING (*val)) {
+ const char *bytes = swfdec_js_to_string (cx, *val);
+ if (bytes == NULL)
+ return NULL;
+ *val = swfdec_js_eval (cx, obj, bytes);
+ return bytes;
+ } else {
+ if (obj == NULL) {
+ obj...
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
...LSE;
if (!JS_ValueToObject (cx, fp->sp[-2], &obj))
return JS_FALSE;
@@ -1439,16 +1447,14 @@ swfdec_action_new_object (JSContext *cx,
guint n_args;
const char *name;
+ if (!swfdec_script_ensure_stack (cx, 2))
+ return JS_FALSE;
constructor = fp->sp[-1];
name = swfdec_eval_jsval (cx, NULL, &constructor);
if (name == NULL)
return JS_FALSE;
if (!JS_ValueToECMAUint32 (cx, fp->sp[-2], &n_args))
return JS_FALSE;
- if (!swfdec_script_ensure_stack (cx, n_args + 2)) {
- SWFDEC_ERROR ("not enough stack space");
- return JS_FALSE;
- }...
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
...ontext *cx
return JS_TRUE;
}
+static JSBool
+swfdec_action_new_object (JSContext *cx, guint action, const guint8 *data, guint len)
+{
+ JSStackFrame *fp = cx->fp;
+ jsval constructor;
+ JSObject *object;
+ const JSClass *clasp;
+ guint n_args;
+
+ constructor = fp->sp[-1];
+ if (!swfdec_eval_jsval (cx, NULL, &constructor))
+ return JS_FALSE;
+ if (!JS_ValueToECMAUint32 (cx, fp->sp[-2], &n_args))
+ return JS_FALSE;
+ if ((guint) (fp->sp - fp->spbase) < n_args + 2) {
+ SWFDEC_ERROR ("not enough stack space");
+ return JS_FALSE;
+ }
+ fp->sp[-1...
2007 Mar 01
0
11 commits - libswfdec/Makefile.am libswfdec/swfdec_connection.c libswfdec/swfdec_connection.h libswfdec/swfdec_flv_decoder.c libswfdec/swfdec_js.c libswfdec/swfdec_js_connection.c libswfdec/swfdec_js.h libswfdec/swfdec_js_net_stream.c
...swfdec_script.c
index d688693..6e75785 100644
--- a/libswfdec/swfdec_script.c
+++ b/libswfdec/swfdec_script.c
@@ -1391,9 +1391,11 @@ swfdec_action_new_object (JSContext *cx,
JSObject *object;
const JSClass *clasp;
guint n_args;
+ const char *name;
constructor = fp->sp[-1];
- if (!swfdec_eval_jsval (cx, NULL, &constructor))
+ name = swfdec_eval_jsval (cx, NULL, &constructor);
+ if (name == NULL)
return JS_FALSE;
if (!JS_ValueToECMAUint32 (cx, fp->sp[-2], &n_args))
return JS_FALSE;
@@ -1401,6 +1403,9 @@ swfdec_action_new_object (JSContext *cx,
SWFDEC_ERROR...
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
...o_number (cx, lval);
- r = swfdec_action_to_number (cx, rval);
+ l = swfdec_value_to_number (cx, lval);
+ r = swfdec_value_to_number (cx, rval);
switch (action) {
case 0x0e:
cond = l == r;
@@ -1340,7 +1340,7 @@ swfdec_action_start_drag (JSContext *cx,
return JS_FALSE;
if (!swfdec_eval_jsval (cx, NULL, &fp->sp[-1]))
return JS_FALSE;
- if (swfdec_action_to_number (cx, fp->sp[-3])) {
+ if (swfdec_value_to_number (cx, fp->sp[-3])) {
jsval tmp;
if (stack_size < 7)
return JS_FALSE;
@@ -1683,7 +1683,7 @@ swfdec_action_shift (JSContext *cx, guin
stat...
2007 Mar 09
0
17 commits - libswfdec/js libswfdec/swfdec_js.c libswfdec/swfdec_js_global.c libswfdec/swfdec_js.h libswfdec/swfdec_js_movie.c libswfdec/swfdec_movie.c libswfdec/swfdec_player.c libswfdec/swfdec_player_internal.h libswfdec/swfdec_root_movie.c
...Bool
swfdec_action_start_drag (JSContext *cx, guint action, const guint8 *data, guint len)
{
JSStackFrame *fp = cx->fp;
- guint stack_size = fp->sp - fp->spbase;
guint n_args = 1;
- if (stack_size < 3)
+ if (!swfdec_script_ensure_stack (cx, 3))
return JS_FALSE;
if (!swfdec_eval_jsval (cx, NULL, &fp->sp[-1]))
return JS_FALSE;
if (swfdec_value_to_number (cx, fp->sp[-3])) {
jsval tmp;
- if (stack_size < 7)
+ if (!swfdec_script_ensure_stack (cx, 7))
return JS_FALSE;
n_args = 5;
/* yay for order */
@@ -1408,7 +1444,7 @@ swfdec_actio...