Firefox supports an argument.callee.name property that returns the name of the current function.
Created attachment 22324 [details] Test case
Created attachment 22350 [details] patch
Comment on attachment 22350 [details] patch r=me
Committed revision 35228.