summaryrefslogtreecommitdiff
path: root/test/message
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2014-05-05 16:48:51 +0200
committerTrevor Norris <trev.norris@gmail.com>2014-05-07 12:11:57 -0700
commit17fbdc18b8cec0b6b2827d9e3c6360b694e6e9c3 (patch)
tree2a865ae866b1fe35d294e2ccf16861c4ee74814e /test/message
parent120f7cf55fb977a145dca0ed840ea5a07730da05 (diff)
downloadnode-new-17fbdc18b8cec0b6b2827d9e3c6360b694e6e9c3.tar.gz
lib: name EventEmitter prototype methods
Before this commit the EventEmitter methods were anonymous functions. V8 tries to infer names for anonymous functions based on the execution context but it frequently gets it wrong and when that happens, the stack trace is usually confusing and unhelpful. This commit names all methods so V8 can fall back to the method.name property. The above gotcha applies to all anonymous functions but is exacerbated for EventEmitter methods because those are invoked with a plenitude of different receivers. Signed-off-by: Trevor Norris <trev.norris@gmail.com>
Diffstat (limited to 'test/message')
-rw-r--r--test/message/stdin_messages.out8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/message/stdin_messages.out b/test/message/stdin_messages.out
index cd7c12a7b9..2dc4574bf6 100644
--- a/test/message/stdin_messages.out
+++ b/test/message/stdin_messages.out
@@ -8,7 +8,7 @@ SyntaxError: Strict mode code may not include a with statement
at Module._compile (module.js:*:*)
at evalScript (node.js:*:*)
at Socket.<anonymous> (node.js:*:*)
- at Socket.EventEmitter.emit (events.js:*:*)
+ at Socket.emit (events.js:*:*)
at _stream_readable.js:*:*
at process._tickCallback (node.js:*:*)
42
@@ -23,7 +23,7 @@ Error: hello
at Module._compile (module.js:*:*)
at evalScript (node.js:*:*)
at Socket.<anonymous> (node.js:*:*)
- at Socket.EventEmitter.emit (events.js:*:*)
+ at Socket.emit (events.js:*:*)
at _stream_readable.js:*:*
at process._tickCallback (node.js:*:*)
@@ -36,7 +36,7 @@ Error: hello
at Module._compile (module.js:*:*)
at evalScript (node.js:*:*)
at Socket.<anonymous> (node.js:*:*)
- at Socket.EventEmitter.emit (events.js:*:*)
+ at Socket.emit (events.js:*:*)
at _stream_readable.js:*:*
at process._tickCallback (node.js:*:*)
100
@@ -50,7 +50,7 @@ ReferenceError: y is not defined
at Module._compile (module.js:*:*)
at evalScript (node.js:*:*)
at Socket.<anonymous> (node.js:*:*)
- at Socket.EventEmitter.emit (events.js:*:*)
+ at Socket.emit (events.js:*:*)
at _stream_readable.js:*:*
at process._tickCallback (node.js:*:*)