Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Issue 29729594: Noissue - Use Map to store EventEmitter listeners (Closed)

Created:
March 21, 2018, 1:49 p.m. by kzar
Modified:
April 4, 2018, 5:53 p.m.
Visibility:
Public.

Description

Noissue - Use Map to store EventEmitter listeners

Patch Set 1 #

Total comments: 6

Patch Set 2 : Avoid calling .get directly after .has #

Unified diffs Side-by-side diffs Delta from patch set Stats (+8 lines, -7 lines) Patch
M lib/events.js View 1 4 chunks +7 lines, -6 lines 0 comments Download
M lib/filterNotifier.js View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 6
kzar
Patch Set 1 I need this for #6402, but it seems to me a sensible ...
March 21, 2018, 1:52 p.m. (2018-03-21 13:52:45 UTC) #1
Manish Jethani
https://codereview.adblockplus.org/29729594/diff/29729595/lib/events.js File lib/events.js (right): https://codereview.adblockplus.org/29729594/diff/29729595/lib/events.js#newcode39 lib/events.js:39: if (this._listeners.has(name)) It's usually not worth calling Map.has if ...
April 1, 2018, 8:44 a.m. (2018-04-01 08:44:16 UTC) #2
kzar
Patch Set 2 : Avoid calling .get directly after .has https://codereview.adblockplus.org/29729594/diff/29729595/lib/events.js File lib/events.js (right): https://codereview.adblockplus.org/29729594/diff/29729595/lib/events.js#newcode39 ...
April 3, 2018, 5:27 p.m. (2018-04-03 17:27:55 UTC) #3
Sebastian Noack
https://codereview.adblockplus.org/29729594/diff/29729595/lib/events.js File lib/events.js (right): https://codereview.adblockplus.org/29729594/diff/29729595/lib/events.js#newcode53 lib/events.js:53: let listeners = this._listeners.get(name); On 2018/04/03 17:27:55, kzar wrote: ...
April 3, 2018, 8:42 p.m. (2018-04-03 20:42:35 UTC) #4
Manish Jethani
https://codereview.adblockplus.org/29729594/diff/29729595/lib/events.js File lib/events.js (right): https://codereview.adblockplus.org/29729594/diff/29729595/lib/events.js#newcode53 lib/events.js:53: let listeners = this._listeners.get(name); On 2018/04/03 20:42:34, Sebastian Noack ...
April 4, 2018, 6:54 a.m. (2018-04-04 06:54:49 UTC) #5
Manish Jethani
April 4, 2018, 6:57 a.m. (2018-04-04 06:57:43 UTC) #6
LGTM

Powered by Google App Engine
This is Rietveld