Skip to content

lib: bind functions on EventEmitter

Rodrigo Muino Tomonari requested to merge github/fork/himself65/fix2 into master

Further modifications from #27325

bind some functions on EventEmitter so that we no need to change two functions at the same time.

for example:

before

Socket.prototype.on = function(){};
Socket.prototype.addListener = Socket.prototype.on;

now only need to code one line

Socket.prototype.on = function(){};
// or
Socket.prototype.addListener = function(){};
Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines

Merge request reports

Loading