FB prepends a "for(;;);" which is 1 char shorter than "while(1);", has been the case since 2012/13. Firebug v2 and ChromeTools know how to parse such JSON and ignore that first part. (IE11 and Firefox newer DevTools can't "handle" it aka show just a plain text string)
Why does it have to be a loop, couldn't you make a reliable syntax error in less than 8 characters?
But getting hit with this, they would be actively hurt, and I don't think that interpreter session would be able to recover.