« Return to Thread: Serverside non HTTP JS implementation

Re: Serverside non HTTP JS implementation

by gurkhali :: Rate this Message:

Reply to Author | View in Thread

Anthony, does that mean that the context that is provided on the
JS_CompileFile call (first argument) does not have anything to do with
the context that is used during execution? What is the compilation
context used for?

I ran into a posting comment from be saying that compiled objects are
immutable but the context parameter confused me.

Bhushan


On Oct 28, 10:22 am, Anthony Catel <a.ca...@...> wrote:

> Hi,
>
> You can execute a precompiled script with the context you want :
>
> See : JS_CompileFile(context) + JS_ExecuteScript(other_context);
>
> Data can be shared between context :https://developer.mozilla.org/@api/deki/files/291/=Over3.gif
>
> Anthony Catel
>
> gurkhali a écrit :
>
> > I am looking to add a serverside JS scripting for a non HTTP embedded
> > application. I have an environment where I know what scripts each of
> > the clients will use 'a priori'. In another words, I would like to
> > precompile these scripts and reuse them for multiple request. The
> > execution context on the other hand needs to be different for each of
> > the sessions (can consist of multiple requests). In this environment
> > each of the session have access to their private session data and
> > possibly (optionally) to a shared global data.
>
> > Is the context object in SM designed to be used this way?
>
> > Bhushan
> > _______________________________________________
> > dev-tech-js-engine mailing list
> > dev-tech-js-eng...@...
> >https://lists.mozilla.org/listinfo/dev-tech-js-engine

_______________________________________________
dev-tech-js-engine mailing list
dev-tech-js-engine@...
https://lists.mozilla.org/listinfo/dev-tech-js-engine

 « Return to Thread: Serverside non HTTP JS implementation