In Firebug's console
var a = [];
a[0] = a;
crashed Firefox!
Why?
edit:
edit 2: It crashes in Firebug console and works in native Firefox web console
Most unpredictable crashes in Javascript are caused by memory leaks - objects that are still stored in memory and not being picked up by the garbage collector.
On the web browser menu click on the "Edit" and select "Preferences". In the "Preferences" window select the "Security" tab. In the "Security" tab section "Web content" mark the "Enable JavaScript" checkbox. Click on the "Reload the current page" button of the web browser to refresh the page.
In Firefox, the shortcut to open them is CTRL+SHIFT+K. Then go to the Console tab, and you can type JavaScript.
These days, most cross-browser JavaScript problems are seen: When poor-quality browser-sniffing code, feature-detection code, and vendor prefix usage block browsers from running code they could otherwise use just fine. When developers make use of new/nascent JavaScript features, modern Web APIs, etc.)
I think this is a firebug bug.
It works fine in the built-in firefox console (ctrl+shift+k), the chrome console, and the opera console.
I'd file a bug report with firebug.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With