This particular site looks like it is executing its code on the client side. This way you cannot damage your servers.
Other sites take an approach to running code in virtual machines. You can simply throttle the resources that the virtual machine can take, and they limit the potential damage that can be done.
btilly
source share