Sorry about that. I wrote the web code quite sloppily, and it was my first time. I just wanted to port my native C++/OpenGL code to the web.
Not your fault. If it crashes the whole phone, that's a bug in Firefox and/or Android. A Web app should never be able to crash the browser, and the browser shouldn't be able to crash the phone.