Iirc the way to reboot an x86 machine is to triple-fault, i.e. execute an interrupt in an interrupt in an interrupt. Could be done by e.g. marking the pagefault handler's stack space as "not available" in the pagetables.
Now if the virtual cpu does not implement that reboot behaviour, the likely result is just an endless recursion of fault handlers. So the script runs an endless loop, hanging Firefox until it notices this and stops it.