Haha, both of those cases are killing both the iframe and the UI. I have to get around to using totally different domain on the iframe to really take advantage of the Chrome process isolation. Previously I was using a really nice JS interpreter written in JS[0] before to solve that problem, but it ran 200 times slower than the browser interpreter(!)
[0] https://github.com/NeilFraser/JS-Interpreter