Displaying 20 results from an estimated 20 matches for "jsid".
Did you mean:
asid
2007 Feb 22
0
3 commits - libswfdec/swfdec_js.c libswfdec/swfdec_js_movie.c libswfdec/swfdec_script.c
...return JS_FALSE;
if (obj == NULL) {
- if (cx->fp == NULL || cx->fp->scopeChain == NULL)
+ JSObject *pobj;
+ JSProperty *prop;
+ if (cx->fp == NULL || cx->fp->varobj == NULL)
return JS_FALSE;
- obj = cx->fp->thisp;
+ if (!js_FindProperty (cx, (jsid) atom, &obj, &pobj, &prop))
+ return JS_FALSE;
+ if (pobj)
+ obj = pobj;
+ else
+ obj = cx->fp->varobj;
}
return OBJ_SET_PROPERTY (cx, obj, (jsid) atom, ret);
}
diff --git a/libswfdec/swfdec_script.c b/libswfdec/swfdec_script.c
index 83dde3a..d688693 10...
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
...ec/swfdec_js.c
index 84a1113..68e89ff 100644
--- a/libswfdec/swfdec_js.c
+++ b/libswfdec/swfdec_js.c
@@ -318,8 +318,6 @@ swfdec_js_eval_get_property (JSContext *
return JS_FALSE;
if (!prop)
return JS_FALSE;
- if (pobj)
- obj = pobj;
return OBJ_GET_PROPERTY (cx, obj, (jsid) prop->id, ret);
}
}
@@ -345,7 +343,7 @@ static gboolean
swfdec_js_eval_internal (JSContext *cx, JSObject *obj, const char *str,
jsval *val, gboolean set)
{
- jsval cur;
+ jsval cur = JSVAL_NULL;
char *work = NULL;
SWFDEC_LOG ("eval called with \"%s\" on %...
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
...goto out;
- }
-
- if (bytes == NULL)
- return JS_FALSE;
- if (*bytes == '\0') {
- JSObject *pobj;
- JSProperty *prop;
- JSAtom *atom = js_Atomize (cx, properties[id], strlen (properties[id]), 0);
- if (atom == NULL)
- return JS_FALSE;
- if (!js_FindProperty (cx, (jsid) atom, &jsobj, &pobj, &prop))
- return JS_FALSE;
- if (!prop)
- return JS_FALSE;
- if (!OBJ_GET_PROPERTY (cx, jsobj, (jsid) prop->id, &val))
- return JS_FALSE;
- } else {
- movie = swfdec_scriptable_from_jsval (cx, val, SWFDEC_TYPE_MOVIE);
- if (movie...
2007 Sep 28
1
SwfDec in Windows
...obj),
clasp->call || clasp == &js_FunctionClass)
: ops->call != NULL)) {
type = JSTYPE_FUNCTION;
} else {
#ifdef NARCISSUS
/* XXX suppress errors/exceptions */
OBJ_GET_PROPERTY(cx, obj,
(jsid)cx->runtime->atomState.callAtom,
&v);
if (JSVAL_IS_FUNCTION(cx, v))
type = JSTYPE_FUNCTION;
else
#endif
type = JSTYPE_OBJECT;
}
} else if (JSVAL_IS_NUMBER(v)) {
type = JSTYPE_NUMBER;
}...
2007 Jan 24
0
Branch 'interpreter' - 8 commits - libswfdec/swfdec_bits.c libswfdec/swfdec_bits.h libswfdec/swfdec_js.c libswfdec/swfdec_js.h libswfdec/swfdec_script.c test/swfdec_out.c test/swfdec_out.h test/swfedit_tag.c test/swfedit_token.c test/swfedit_token.h
...t char *name, gboolean initial, gboolean ignore_case, jsval *ret)
+{
+ JSAtom *atom;
+ JSObject *pobj;
+ JSProperty *prop;
+
+ atom = js_Atomize (cx, name, strlen(name), ignore_case ? ATOM_NOCASE : 0);
+ if (!atom)
+ return JS_FALSE;
+ if (initial) {
+ return OBJ_SET_PROPERTY (cx, obj, (jsid) atom, ret);
+ } else {
+ if (!js_FindProperty (cx, (jsid) atom, &obj, &pobj, &prop))
+ return JS_FALSE;
+ if (!prop)
+ return JS_FALSE;
+ if (pobj)
+ obj = pobj;
+ return OBJ_SET_PROPERTY (cx, obj, (jsid) prop->id, ret);
+ }
+}
+
+static gboolean
+swfdec...
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
...e_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 (!(atom = js_Atomize (cx, s, strlen (s), 0)) ||
+ !js_FindProperty (cx, (jsid) atom, &obj, &pobj, &prop))
+ return JS_FALSE;
+ if (!JS_GetProperty (cx, obj, s, &fun))
+ return JS_FALSE;
+ if (!JSVAL_IS_OBJECT (fun)) {
+ /* FIXME: figure out what class we operate on */
+ SWFDEC_WARNING ("%s is not a function", s);
+ }
+ fp->sp[-1]...
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
...(script->flags & SWFDEC_SCRIPT_PRELOAD_ROOT) {
+ JSAtom *atom;
+ JSObject *obj, *pobj;
+ JSProperty *prop;
+ SWFDEC_LOG ("preloading root into register %u", preload_reg);
+ if (!(atom = js_Atomize (cx, "_root", 5, 0)) ||
+ !js_FindProperty (cx, (jsid) atom, &obj, &pobj, &prop) ||
+ !js_GetProperty (cx, obj, (jsid) atom, &fp->vars[preload_reg++])) {
+ ok = JS_FALSE;
+ goto out;
+ }
+ }
+ if (script->flags & SWFDEC_SCRIPT_PRELOAD_PARENT) {
+ JSAtom *atom;
+ JSObject *obj, *pobj;
+ JSPro...
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
..._eval_get_property (JSContext *cx, JSObject *obj,
- const char *name, guint name_len, jsval *ret)
-{
- JSAtom *atom;
- JSObject *pobj;
- JSProperty *prop;
-
- atom = js_Atomize (cx, name, name_len, 0);
- if (!atom)
- return JS_FALSE;
- if (obj) {
- return OBJ_GET_PROPERTY (cx, obj, (jsid) atom, ret);
- } else {
- if (cx->fp == NULL || cx->fp->scopeChain == NULL)
- return JS_FALSE;
- if (!js_FindProperty (cx, (jsid) atom, &obj, &pobj, &prop))
- return JS_FALSE;
- if (!prop)
- return JS_FALSE;
- return OBJ_GET_PROPERTY (cx, obj, (jsid)...
2007 Feb 19
0
22 commits - libswfdec/js libswfdec/swfdec_debugger.c libswfdec/swfdec_js.c libswfdec/swfdec_js_global.c libswfdec/swfdec_js_movie.c libswfdec/swfdec_movie.c libswfdec/swfdec_player.c libswfdec/swfdec_player_internal.h libswfdec/swfdec_script.c
...-338,7 +338,7 @@ swfdec_js_eval_set_property (JSContext *
if (obj == NULL) {
if (cx->fp == NULL || cx->fp->scopeChain == NULL)
return JS_FALSE;
- obj = JS_GetParent (cx, cx->fp->scopeChain);
+ obj = cx->fp->thisp;
}
return OBJ_SET_PROPERTY (cx, obj, (jsid) atom, ret);
}
diff --git a/libswfdec/swfdec_script.c b/libswfdec/swfdec_script.c
index d46687f..824861b 100644
--- a/libswfdec/swfdec_script.c
+++ b/libswfdec/swfdec_script.c
@@ -1643,11 +1643,11 @@ swfdec_action_define_local (JSContext *c
{
const char *name;
- g_assert (cx->fp->call...
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
...t *obj, *pobj;
- JSProperty *prop;
- JSAtom *atom;
+ SwfdecAsObject *object;
- cx->fp->sp -= 1;
- name = swfdec_js_to_string (cx, cx->fp->sp[1]);
- if (name == NULL)
- return JS_FALSE;
- if (!(atom = js_Atomize (cx, name, strlen (name), 0)) ||
- !js_FindProperty (cx, (jsid) atom, &obj, &pobj, &prop))
- return JS_FALSE;
- if (!pobj)
- return JS_TRUE;
- return JS_DeleteProperty (cx, pobj, name);
+ name = swfdec_as_value_to_string (cx, swfdec_as_stack_pop (cx->frame->stack));
+ object = swfdec_as_frame_find_variable (cx->frame, name);
+ i...
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
...JS_FALSE;
- if (!JSVAL_IS_VOID (*ret))
- return JS_TRUE;
- if (!initial)
- return JS_FALSE;
-
- atom = js_Atomize(cx, name, strlen(name), 0);
+ atom = js_Atomize (cx, name, strlen(name), ignore_case ? ATOM_NOCASE : 0);
if (!atom)
return JS_FALSE;
- if (!js_FindProperty (cx, (jsid) atom, &obj, &pobj, &prop))
- return JS_FALSE;
- if (!prop)
- return JS_FALSE;
- if (pobj)
- obj = pobj;
- return OBJ_GET_PROPERTY (cx, obj, (jsid) prop->id, ret);
+ if (initial) {
+ return OBJ_GET_PROPERTY (cx, obj, (jsid) atom, ret);
+ } else {
+ if (!js_FindPro...
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
...(s == NULL)
@@ -561,7 +563,9 @@ swfdec_action_call_function (JSContext *
if (n_args + 2 > (guint) (fp->sp - fp->spbase))
return JS_FALSE;
- obj = OBJ_THIS_OBJECT (cx, cx->fp->scopeChain);
+ if (!(atom = js_Atomize (cx, s, strlen (s), 0)) ||
+ !js_FindProperty (cx, (jsid) atom, &obj, &pobj, &prop))
+ return JS_FALSE;
if (!JS_GetProperty (cx, obj, s, &fun))
return JS_FALSE;
fp->sp[-1] = fun;
@@ -589,6 +593,8 @@ swfdec_action_call_method (JSContext *cx
if (!JS_ValueToObject (cx, fp->sp[-2], &obj))
return JS_FALSE;
+...
2007 Jun 01
0
Branch 'as' - 2 commits - libswfdec/Makefile.am libswfdec/swfdec_as_strings.c libswfdec/swfdec_as_types.c libswfdec/swfdec_interval.c libswfdec/swfdec_interval.h libswfdec/swfdec_player_as.c libswfdec/swfdec_player.c
...ut);
- g_assert (JSVAL_IS_OBJECT (interval->vals[1]));
- if (JSVAL_IS_STRING (interval->vals[0])) {
- JSAtom *atom = js_AtomizeString (cx, JSVAL_TO_STRING (interval->vals[0]), 0);
- if (!atom)
- return;
- if (!js_GetProperty (cx, JSVAL_TO_OBJECT (interval->vals[1]),
- (jsid) atom, &fun))
- return;
- } else {
- fun = interval->vals[0];
- }
- js_InternalCall (cx, JSVAL_TO_OBJECT (interval->vals[1]), fun,
- interval->n_args, &interval->vals[2], &rval);
-}
-
-static SwfdecAsInterval *
-swfdec_js_interval_new (guint n_args)
-{
- Swf...
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
...(s == NULL)
@@ -561,7 +563,9 @@ swfdec_action_call_function (JSContext *
if (n_args + 2 > (guint) (fp->sp - fp->spbase))
return JS_FALSE;
- obj = OBJ_THIS_OBJECT (cx, cx->fp->scopeChain);
+ if (!(atom = js_Atomize (cx, s, strlen (s), 0)) ||
+ !js_FindProperty (cx, (jsid) atom, &obj, &pobj, &prop))
+ return JS_FALSE;
if (!JS_GetProperty (cx, obj, s, &fun))
return JS_FALSE;
fp->sp[-1] = fun;
@@ -589,6 +593,8 @@ swfdec_action_call_method (JSContext *cx
if (!JS_ValueToObject (cx, fp->sp[-2], &obj))
return JS_FALSE;
+...
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
...gt;sp[-1]);
if (s == 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))
- return JS_FALSE;
if (!(atom = js_Atomize (cx, s, strlen (s), 0)) ||
!js_FindProperty (cx, (jsid) atom, &obj, &pobj, &prop))
@@ -709,13 +717,13 @@ swfdec_action_call_method (JSContext *cx
JSObject *obj;
jsval fun;
+ if (!swfdec_script_ensure_stack (cx, 3))
+ return JS_FALSE;
s = swfdec_js_to_string (cx, fp->sp[-1]);
if (s == NULL)
return JS_FALSE;
if...
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
...onst char *name;
+ JSObject *obj, *pobj;
+ JSProperty *prop;
+ JSAtom *atom;
+
+ cx->fp->sp -= 2;
+ name = swfdec_js_to_string (cx, cx->fp->sp[1]);
+ if (name == NULL)
+ return JS_FALSE;
+ if (!(atom = js_Atomize (cx, name, strlen (name), 0)) ||
+ !js_FindProperty (cx, (jsid) atom, &obj, &pobj, &prop))
+ return JS_FALSE;
+ if (!pobj)
+ return JS_TRUE;
+ return JS_DeleteProperty (cx, pobj, name);
+}
+
+static JSBool
swfdec_action_store_register (JSContext *cx, guint action, const guint8 *data, guint len)
{
if (len != 1) {
@@ -2169,7 +2189,7 @@ s...
2007 Mar 12
0
11 commits - libswfdec/js libswfdec/swfdec_loader.c libswfdec/swfdec_root_sprite.c libswfdec/swfdec_script.c player/swfdebug.c player/swfdec_player_manager.c test/trace
...+ while (*url == G_DIR_SEPARATOR)
+ url++;
}
/* FIXME: need to rework seperators on windows? */
diff-tree e69a7f78da02f87b10450ac20995412909d916fc (from 05fe373cc29797c23c99d67ae5d61e7b50c7c4f3)
Author: Benjamin Otte <otte@gnome.org>
Date: Mon Mar 12 22:06:50 2007 +0100
JSIDArrays have an unsigned length now
diff --git a/player/swfdec_player_manager.c b/player/swfdec_player_manager.c
index 1f6831c..1307c32 100644
--- a/player/swfdec_player_manager.c
+++ b/player/swfdec_player_manager.c
@@ -591,7 +591,7 @@ command_enumerate (SwfdecPlayerManager *
JSObject *obj;
J...
2007 Apr 04
0
Branch 'as' - 17 commits - configure.ac doc/Makefile.am doc/swfdec-docs.sgml doc/swfdec-sections.txt doc/swfdec.types libswfdec-gtk/Makefile.am libswfdec-gtk/swfdec-gtk.h libswfdec-gtk/swfdec_gtk_loader.c libswfdec-gtk/swfdec_gtk_loader.h
...*cx,
+ SwfdecAsObject *obj, const char *name, SwfdecAsValue *ret)
+{
+ if (obj) {
+ swfdec_as_object_get (obj, name, ret);
+ } else {
+ g_assert_not_reached ();
+#if 0
+ if (cx->fp == NULL || cx->fp->scopeChain == NULL)
+ return JS_FALSE;
+ if (!js_FindProperty (cx, (jsid) atom, &obj, &pobj, &prop))
+ return JS_FALSE;
+ if (!prop)
+ return JS_FALSE;
+ return OBJ_GET_PROPERTY (cx, obj, (jsid) prop->id, ret);
+#endif
+ }
+}
+
+static void
+swfdec_as_context_eval_set_property (SwfdecAsContext *cx,
+ SwfdecAsObject *obj, const char *n...
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
...SWFDEC_ERROR ("empty argument name not allowed");
+ return JS_FALSE;
+ }
+ /* FIXME: check duplicate arguments */
+ atom = js_Atomize (cx, arg_name, strlen (arg_name), 0);
+ if (atom == NULL)
+ return JS_FALSE;
+ if (!js_AddNativeProperty (cx, fun->object, (jsid) atom,
+ js_GetArgument, js_SetArgument, SPROP_INVALID_SLOT,
+ JSPROP_ENUMERATE | JSPROP_PERMANENT | JSPROP_SHARED,
+ SPROP_HAS_SHORTID, i)) {
+ return JS_FALSE;
+ }
+ }
+ size = swfdec_bits_get_u16 (&bits);
+ /* check the script can be created */
+ script = cx->fp->swf;
+ if...
2007 Jan 16
0
9 commits - libswfdec/js libswfdec/Makefile.am libswfdec/swfdec_audio_stream.c libswfdec/swfdec_audio_stream.h libswfdec/swfdec_cache.c libswfdec/swfdec_cached.c libswfdec/swfdec_cached.h libswfdec/swfdec_edittext_movie.c libswfdec/swfdec_image.c
..., JSObject *parent)
{
CHECK_REQUEST(cx);
if (!clasp)
diff --git a/libswfdec/js/jsapi.h b/libswfdec/js/jsapi.h
index 441bf74..1718acc 100644
--- a/libswfdec/js/jsapi.h
+++ b/libswfdec/js/jsapi.h
@@ -930,7 +930,7 @@ extern JS_PUBLIC_API(JSBool)
JS_GetObjectId(JSContext *cx, JSObject *obj, jsid *idp);
extern JS_PUBLIC_API(JSObject *)
-JS_NewObject(JSContext *cx, JSClass *clasp, JSObject *proto, JSObject *parent);
+JS_NewObject(JSContext *cx, const JSClass *clasp, JSObject *proto, JSObject *parent);
extern JS_PUBLIC_API(JSBool)
JS_SealObject(JSContext *cx, JSObject *obj, JSBool deep...