kripken/emscripten — pull request #844 by tobiasweibel (2013-02-11 11:07:14+00:00)
Title: Implement Firefox workaround for "TypeError: anonymous method called on incompatible string"

My theory: It seems that Firefox optimizes sometimes too hard and therefore 'value' in 'ccallFunc/toC' is some kind of unassigned. Then calling 'value.length' in the 'toC' throws an exception. When an empty string is concatenated to 'value' check we can workaround that problem, probably because Firefox JavaScript compiler needs to load a pointer into a register or something like that.