Homec4science

Don't explicitly keep track of `_activeListenerCount` in the Aphlict server.

Authored by Joshua Spence <josh@joshuaspence.com> on Jun 15 2014, 21:20.

Description

Don't explicitly keep track of _activeListenerCount in the Aphlict server.

Summary: The _activeListenerCount variable is overkill, we should be able to achieve the same result using Object.keys(this._listeners).length.

Test Plan:
Mucked around in a NodeJS shell.

> Object.keys({}).length
0
> Object.keys({foo: 'bar'}).length
1
> Object.keys({1: 'foo', 2: 'bar'}).length
2

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9554

Details

Committed
Joshua Spence <josh@joshuaspence.com>Jun 15 2014, 21:20
Pushed
aubortJan 31 2017, 17:16
Parents
rPH397d67ff3d08: Support "Projects" field for pholio mocks in Herald
Branches
Unknown
Tags
Unknown

Event Timeline

Joshua Spence <josh@joshuaspence.com> committed rPH279a0e53717e: Don't explicitly keep track of `_activeListenerCount` in the Aphlict server. (authored by Joshua Spence <josh@joshuaspence.com>).Jun 15 2014, 21:20