events: check if _events is an own property
authorVladimir Kurchatkin <vladimir.kurchatkin@gmail.com>
Thu, 3 Apr 2014 22:11:56 +0000 (02:11 +0400)
committerTrevor Norris <trev.norris@gmail.com>
Tue, 15 Apr 2014 20:00:31 +0000 (13:00 -0700)
commit2c6b424829caf0a4c07839c4daac3a438c0f0c9a
tree9e069808647e62e41b872666710f07b652607a11
parentc7f424e44b7e61b89f91cd344599c3d1cdfb88fe
events: check if _events is an own property

Without this check it is possible to have the _events object shared
amongst instances.

Fixes #7157

Signed-off-by: Trevor Norris <trev.norris@gmail.com>
lib/events.js
test/simple/test-event-emitter-subclass.js