projects
/
platform
/
upstream
/
nodejs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
feea133
)
Optimize emit for two arguments
author
Ryan Dahl
<ry@tinyclouds.org>
Wed, 15 Sep 2010 22:20:04 +0000
(15:20 -0700)
committer
Ryan Dahl
<ry@tinyclouds.org>
Wed, 15 Sep 2010 22:20:04 +0000
(15:20 -0700)
lib/events.js
patch
|
blob
|
history
diff --git
a/lib/events.js
b/lib/events.js
index
6b422d1
..
69cfc4f
100644
(file)
--- a/
lib/events.js
+++ b/
lib/events.js
@@
-21,7
+21,7
@@
process.EventEmitter.prototype.emit = function (type) {
if (!this._events[type]) return false;
if (typeof this._events[type] == 'function') {
- if (arguments.length < 3) {
+ if (arguments.length <
=
3) {
// fast case
this._events[type].call( this
, arguments[1]