How do I prevent malicious javascript in V8 (with Python)
===

I'm using PyV8 to run untrusted javascript. How can I detect and kill javascript that has inifinite, or long running loops in it? I'd like to tell v8 to run javascript and fail with a timeout if it's not finished in 0.1 of a second. 
