gree/lwf — pull request #44 by yonekawa (2013-12-05 09:28:55+00:00)
Title: Fix eventHandlers length was wrong

LWF's eventHandlers length become wrong when use this pattern.

lwf.addEventHandler('fooEvent', ->
lwf.removeEventHandler('fooEvent', arguments.callee)
doSomeThing()
)

The handler execute logic gets loop count from eventHandlers.length at before execute loop.
But handler function removes handler from eventHandlers in loop.
https://github.com/gree/lwf/blob/master/coffee/js_debug/lwf.js#L6749