Crash JavaScript and more
boards.4chan.org
boards.4chan.org
How is this a bug? What's the expected behavior?
Perhaps a dialog asking if we want to let the page use more, like the long running script dialog in most browsers.
The sandbox is suppose to protect us from malicious pranks, like browsers these days protect us from an endless loop of alert boxes by asking us if we want to see more, and endless loops in general with the long running terminate dialog.
When I was a teen I rudely tricked a friend to load an infinite alert() page, forcing them to kill their browser and lose some state. These days browsers don't let alerts block switching tabs or closing the offending tab, and with too frequent alerts you can check a box to block any more. It's better.
IE11 just gives an OOM error in the console.
<!DOCTYPE html><html><head><meta charset="utf-8"></head><body><script>
const a=[];
while(true) { a.push(42); }
</script></body></html>