3 Commits

Author SHA1 Message Date
Tom Ashworth
b35d186cda Use 100ms timeout on infinite loop protection, and don't mess with HTML or CSS. 2013-07-15 15:40:43 +01:00
Remy Sharp
cad1f7c5b8 break runner up in to modules so they can be tested, and fixed loop detect to reset on beginning of loop 2013-07-14 12:00:32 +01:00
Remy Sharp
b4e3db625e Prevent infinite loops in jsbin editor.
This is done by rewriting loop code with a test to see how many times the test has been called.

In general, JS is going to run pretty quick, so an infinite loop can rack up 100,000 iterations pretty quickly. If we hit that limit, we break out of the loop and console.error (note: I'd like to echo this back to the user in the UI somehow - probably the linter notice).

This way the code continues, it's a little slow, but it *doesn't* crash the browser.
2013-07-13 23:44:32 +01:00