[Swfdec] Branch 'interpreter' - libswfdec/swfdec_js.c
Benjamin Otte
company at kemper.freedesktop.org
Fri Jan 26 12:49:56 PST 2007
libswfdec/swfdec_js.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletion(-)
New commits:
diff-tree e06edd91cd480f68e8612517abac3aa7a287abab (from 6f0034ba32dd13577f1f2fb050734a7c55b4fdec)
Author: Benjamin Otte <otte at gnome.org>
Date: Fri Jan 26 21:50:33 2007 +0100
fix "this" in swfdec_js_eval
diff --git a/libswfdec/swfdec_js.c b/libswfdec/swfdec_js.c
index 68e89ff..62cf665 100644
--- a/libswfdec/swfdec_js.c
+++ b/libswfdec/swfdec_js.c
@@ -351,13 +351,14 @@ swfdec_js_eval_internal (JSContext *cx,
work = swfdec_js_slash_to_dot (str);
str = work;
}
- if (g_str_has_prefix (str, "this")) {
+ if (obj == NULL && g_str_has_prefix (str, "this")) {
str += 4;
if (*str == '.')
str++;
if (cx->fp == NULL)
goto out;
obj = cx->fp->thisp;
+ cur = OBJECT_TO_JSVAL (obj);
}
while (str != NULL && *str != '\0') {
char *dot = strchr (str, '.');
More information about the Swfdec
mailing list