search for: jsscript

Displaying 12 results from an estimated 12 matches for "jsscript".

Did you mean: jscript
2006 Feb 17
4
RE: Ajax.Updater and loading new javascriptfunctions.
...RE: [Rails-spinoffs] Ajax.Updater and loading new javascriptfunctions. Somewhere in your process (not sure where in your specific case)... try doing the following to inject a script element into the dom, where url is your .js path... This makes that script file get executed immediately. var jsScript = document.createElement("script"); jsScript.setAttribute("type", "text/javascript"); jsScript.setAttribute("src", url); var node = document.body.firstChild; node = (node.nodeType == 3) ? node.nextSibling : node; document.body.insertBefore(jsScript, node...
2007 Jan 12
1
compiling vs interpreting
So I thought I'd write this down, in case anyone has useful input to it or wants to read up on the decisions later. Currnetly swfdec compiles actions from a flash file into JSScript objects and executes them using the standard Spidermonkey API. While this allows all the niceties that are available with SpiderMonkey (most important: a whole debugging framework with stack inspection etc - see player/swfdebug to get an idea about this), I don't like this approach. I'm pr...
2006 Feb 17
6
Ajax.Updater and loading new javascript functions.
I working on rebuilding my CMS software using AJAX, and have run into a couple problems I cant seem to find the solution to. I am loading up a new component of my system using the Ajax.Updater, and it loads up the HTML fine but as the component I am loading up is fairly complicated I want to load up its relevant javascript functions as well at the same time. I am using the
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
...er arrayp) +{ + SwfdecDebuggerCommand command; + + command.code = bytecode; + command.breakpoint = 0; + command.description = swfdec_script_print_action (action, data, len); + g_array_append_val (arrayp, command); + return TRUE; +} + static SwfdecDebuggerScript * -swfdec_debugger_script_new (JSScript *script, const char *name, - SwfdecDebuggerCommand *commands, guint n_commands) +swfdec_debugger_script_new (SwfdecScript *script) { + GArray *array; SwfdecDebuggerScript *ret; ret = g_new0 (SwfdecDebuggerScript, 1); ret->script = script; - ret->name = g_strdup (name); - re...
2007 Jan 18
0
Branch 'interpreter' - 2 commits - libswfdec/js libswfdec/swfdec_js_movie.c libswfdec/swfdec_script.c
...rp.h +++ b/libswfdec/js/jsinterp.h @@ -54,7 +54,8 @@ struct JSStackFrame { JSObject *callobj; /* lazily created Call object */ JSObject *argsobj; /* lazily created arguments object */ JSObject *varobj; /* variables object, where vars go */ - JSScript *script; /* script being interpreted */ + JSScript *script; /* script being interpreted or NULL */ + void *swf; /* SwfdecScript being executed if script is NULL */ JSFunction *fun; /* function being called or null */ JSObject...
2007 Mar 20
0
9 commits - configure.ac libswfdec/swfdec_bits.c libswfdec/swfdec_debug.c libswfdec/swfdec_js.c libswfdec/swfdec_script.c libswfdec/swfdec_sound.c
...swfdec/swfdec_js.c index 3e96503..5ec2303 100644 --- a/libswfdec/swfdec_js.c +++ b/libswfdec/swfdec_js.c @@ -68,16 +68,6 @@ static JSClass global_class = { JS_EnumerateStub,JS_ResolveStub,JS_ConvertStub,JS_FinalizeStub }; -static JSTrapStatus G_GNUC_UNUSED -swfdec_js_debug_one (JSContext *cx, JSScript *script, jsbytecode *pc, - jsval *rval, void *closure) -{ - if (g_getenv ("SWFDEC_JS") && g_str_equal (g_getenv ("SWFDEC_JS"), "trace")) - js_Disassemble1 (cx, script, pc, pc - script->code, - JS_TRUE, stderr); - return JSTRAP_CONTINUE; -} - /**...
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
...compiler.c +++ /dev/null @@ -1,1504 +0,0 @@ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include <stdlib.h> -#include <string.h> - -#include <js/jsapi.h> -#include <js/jsarena.h> -#include <js/jsatom.h> -#include <js/jsemit.h> -#include <js/jsscript.h> -#include <js/jsopcode.h> - -#include "swfdec_bits.h" -#include "swfdec_compiler.h" -#include "swfdec_debug.h" -#include "swfdec_debugger.h" -#include "swfdec_player_internal.h" -#include "swfdec_sprite.h" - -/*** NOTE TO HACKE...
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
...ot; -#endif -#include <string.h> -#include <js/jsapi.h> -#include <js/jscntxt.h> /* for setting tracefp when debugging */ -#include <libswfdec/js/jsfun.h> -#include <js/jsdbgapi.h> /* for debugging */ -#include <js/jsopcode.h> /* for debugging */ -#include <js/jsscript.h> /* for debugging */ -#include "swfdec_types.h" -#include "swfdec_player_internal.h" -#include "swfdec_debug.h" -#include "swfdec_js.h" -#include "swfdec_listener.h" -#include "swfdec_root_movie.h" -#include "swfdec_swf_decoder.h...
2007 Jan 18
0
Branch 'interpreter' - 4 commits - libswfdec/js libswfdec/swfdec_bits.c libswfdec/swfdec_bits.h libswfdec/swfdec_codec_screen.c libswfdec/swfdec_image.c libswfdec/swfdec_script.c libswfdec/swfdec_swf_decoder.c libswfdec/swfdec_tag.c
...t pool to the stack frame diff --git a/libswfdec/js/jsinterp.h b/libswfdec/js/jsinterp.h index b22166d..88bab68 100644 --- a/libswfdec/js/jsinterp.h +++ b/libswfdec/js/jsinterp.h @@ -56,6 +56,7 @@ struct JSStackFrame { JSObject *varobj; /* variables object, where vars go */ JSScript *script; /* script being interpreted or NULL */ void *swf; /* SwfdecScript being executed if script is NULL */ + void *constant_pool; /* constant pool used by SwfdecScript */ JSFunction *fun; /* function being called or null */ JSObject...
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
...,6 +23,7 @@ #include <string.h> #include <js/jsapi.h> #include <js/jscntxt.h> /* for setting tracefp when debugging */ +#include <libswfdec/js/jsfun.h> #include <js/jsdbgapi.h> /* for debugging */ #include <js/jsopcode.h> /* for debugging */ #include <js/jsscript.h> /* for debugging */ @@ -450,3 +451,49 @@ swfdec_js_eval_set (JSContext *cx, JSObj swfdec_js_eval_internal (cx, obj, str, &val, TRUE); } + +/** + * swfdec_js_construct_object: + * @cx: the #JSContext + * @clasp: class to use for constructing the object + * @constructor: a jsval possi...
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
...te (SwfdecMovie *movie, JSBool state) -{ - SwfdecPlayer *player = SWFDEC_ROOT_MOVIE (movie->root)->player; - JS_SetContextCaseSensitive (player->jscx, state); -} - /** * swfdec_js_execute_script: * @s: a @SwfdecPlayer @@ -171,7 +148,8 @@ swfdec_js_execute_script (SwfdecPlayer * JSScript *script, jsval *rval) { jsval returnval = JSVAL_VOID; - JSBool ret, old_state; + JSObject *jsobj; + JSBool ret; g_return_val_if_fail (s != NULL, FALSE); g_return_val_if_fail (SWFDEC_IS_MOVIE (movie), FALSE); @@ -183,20 +161,13 @@ swfdec_js_execute_script (SwfdecPlayer * } if (r...
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
...line; } Breakpoint; +#if 0 static void swfdec_debugger_do_breakpoint (SwfdecDebugger *debugger, guint id) { @@ -345,22 +343,7 @@ swfdec_debugger_do_breakpoint (SwfdecDeb g_object_freeze_notify (G_OBJECT (debugger)); } - -static JSTrapStatus -swfdec_debugger_interrupt_cb (JSContext *cx, JSScript *script, - jsbytecode *pc, jsval *rval, void *debugger) -{ - SwfdecDebuggerScript *dscript; - guint line; - if (!swfdec_debugger_get_current (debugger, &dscript, &line)) - return JSTRAP_CONTINUE; - if (dscript->commands[line].breakpoint) { - swfdec_debugger_do_breakpoin...