Time / memory limit on execution?

3 views
Skip to first unread message

Scott Davies

unread,
Dec 2, 2009, 11:08:56 AM12/2/09
to Johnson
Hi --

I've been looking for a way to let users write simple bits of
Javascript code for my app and execute them server-side. From what
I've seen so far, Johnson might be a great way to do this, except I
don't see a mechanism by which to limit the number of execution steps
and/or amount of real time spent, nor a way to limit memory
consumption, which pretty much kills the possibility of using Johnson
in this context. It looks like SpiderMonkey might make these possible
via JS_SetOperationCallback, but I'm not detecting (via an admittedly
cursory grep through the source) any mentions of it in Johnson's
code.

Did I miss an existing resource-limiting mechanism in Johnson, or does
none really exist yet? If not, are there any plans to add such
mechanisms in the nearish future, or is that just not in the authors'
set of itches needing to be scratched? :)

Thanks!

Aaron Patterson

unread,
Dec 2, 2009, 11:52:11 AM12/2/09
to johnso...@googlegroups.com
No, we currently don't have any resource-limiting mechanisms built in.
If SpiderMonkey has that kind of functionality built in, I don't see
why we couldn't add it though.

--
Aaron Patterson
http://tenderlovemaking.com/
Reply all
Reply to author
Forward
0 new messages