How do you force Chrome pages/tabs to crash using JavaScript?

Trying to set window.location or using window.navigate() to make the browser go to about:crash or chrome://crash doesn't work. Is there a way to do it?


Solution 1:

FUN FUN LOOP:

txt = "a";
while(1){
    txt = txt += "a";    //add as much as the browser can handle
}
//[evil laugh] BOOM! All memory used up, and it is now CRASHED!

http://jsfiddle.net/DerekL/M45Cn/1/

enter image description here

Sorry for the Chinese characters...


Extra

Fun Fun Loop also works on Firefox! enter image description here

And I have to give an applause to Safari, because it automatically reload the page when it is about to crash! Good job Webkit developers!

Oh yeah...

WARNING: Don't try it in Internet Explorer... Because it crashed not my browser, instead, it crashed my Windows 7... enter image description here Yes. I have to restart the computer after that thing.

Solution 2:

I realize this question is over a year old, but apparently you can use chrome://inducebrowsercrashforrealz.

Here is a list of additional debug chrome:// URLs, taken from chrome://about:

chrome://crash
chrome://kill
chrome://hang
chrome://shorthang
chrome://gpuclean
chrome://gpucrash
chrome://gpuhang
chrome://ppapiflashcrash
chrome://ppapiflashhang
chrome://restart