optimize fire event in V8 when there are no context listeners

This commit is contained in:
Vladimir Agafonkin 2013-12-04 18:01:52 +02:00
parent 57a0866bcf
commit 5b77ec33de

View File

@ -143,6 +143,8 @@ L.Mixin.Events = {
// fire event for the context-indexed listeners as well
typeIndex = events[type + '_idx'];
if (!typeIndex) { return this; }
for (contextId in typeIndex) {
listeners = typeIndex[contextId].slice();