preillyme/v8js — pull request #9 by beest (2013-05-09 22:14:06+00:00)
Title: Time limit, memory limit and CommonJS modules

Firstly, this adds time limit and memory limit checking. This is a feature which is regularly asked for, and it gives the possibility to use V8Js to run untrusted code.

Secondly, this adds a CommonJS modules implementation. See http://wiki.commonjs.org/wiki/Modules/1.1 for more details. The function V8Js::setModuleLoader is used to provide a callback function in PHP that is responsible for loading the module code. This was designed for maximum security, and no file access is done from the V8Js extension itself.

Tests have been added for both of the above.

If you would like me to separate these into multiple pull requests then let me know. I intended to do this but didn't have time to do so yet.