HomePhorge

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

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

Provenance
Joshua SpenceAuthored on Jun 15 2014, 12:20 PM
themackabuPushed on Mar 25 2025, 8:07 PM
Parents
rP397d67ff3d08: Support "Projects" field for pholio mocks in Herald
Branches
Unknown
Tags
Unknown

Event Timeline