diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2015-05-25 16:37:49 +0200 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2015-05-26 17:16:48 +0200 |
commit | 93a44d5228b2e1a885f6279f06c4175c174246be (patch) | |
tree | d2acd192f32bba94d354686742e8d2052cfeef66 /test/message | |
parent | eb1856dfd14a2767993a72698b253051cc0b7d3b (diff) | |
download | node-new-93a44d5228b2e1a885f6279f06c4175c174246be.tar.gz |
src: fix deferred events not working with -e
Defer evaluation of the script for a tick. This is a workaround for
events not firing when evaluating scripts on the command line with -e.
Fixes: https://github.com/nodejs/io.js/issues/1600
PR-URL: https://github.com/nodejs/io.js/pull/1793
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Diffstat (limited to 'test/message')
-rw-r--r-- | test/message/eval_messages.out | 16 | ||||
-rw-r--r-- | test/message/stdin_messages.out | 35 |
2 files changed, 19 insertions, 32 deletions
diff --git a/test/message/eval_messages.out b/test/message/eval_messages.out index 809e788f7a..be2120ce79 100644 --- a/test/message/eval_messages.out +++ b/test/message/eval_messages.out @@ -6,9 +6,9 @@ SyntaxError: Strict mode code may not include a with statement at Object.exports.runInThisContext (vm.js:*) at Object.<anonymous> ([eval]-wrapper:*:*) at Module._compile (module.js:*:*) - at evalScript (node.js:*:*) - at startup (node.js:*:*) at node.js:*:* + at doNTCallback0 (node.js:*:*) + at process._tickCallback (node.js:*:*) 42 42 [eval]:1 @@ -19,9 +19,9 @@ Error: hello at Object.exports.runInThisContext (vm.js:*) at Object.<anonymous> ([eval]-wrapper:*:*) at Module._compile (module.js:*:*) - at evalScript (node.js:*:*) - at startup (node.js:*:*) at node.js:*:* + at doNTCallback0 (node.js:*:*) + at process._tickCallback (node.js:*:*) [eval]:1 throw new Error("hello") ^ @@ -30,9 +30,9 @@ Error: hello at Object.exports.runInThisContext (vm.js:*) at Object.<anonymous> ([eval]-wrapper:*:*) at Module._compile (module.js:*:*) - at evalScript (node.js:*:*) - at startup (node.js:*:*) at node.js:*:* + at doNTCallback0 (node.js:*:*) + at process._tickCallback (node.js:*:*) 100 [eval]:1 var x = 100; y = x; @@ -42,9 +42,9 @@ ReferenceError: y is not defined at Object.exports.runInThisContext (vm.js:*) at Object.<anonymous> ([eval]-wrapper:*:*) at Module._compile (module.js:*:*) - at evalScript (node.js:*:*) - at startup (node.js:*:*) at node.js:*:* + at doNTCallback0 (node.js:*:*) + at process._tickCallback (node.js:*:*) [eval]:1 var ______________________________________________; throw 10 ^ diff --git a/test/message/stdin_messages.out b/test/message/stdin_messages.out index 92d09a0a14..9dc6451d1c 100644 --- a/test/message/stdin_messages.out +++ b/test/message/stdin_messages.out @@ -7,12 +7,8 @@ SyntaxError: Strict mode code may not include a with statement at Object.exports.runInThisContext (vm.js:*) at Object.<anonymous> ([stdin]-wrapper:*:*) at Module._compile (module.js:*:*) - at evalScript (node.js:*:*) - at Socket.<anonymous> (node.js:*:*) - at emitNone (events.js:*:*) - at Socket.emit (events.js:*:*) - at endReadableNT (_stream_readable.js:*:*) - at doNTCallback2 (node.js:*:*) + at node.js:*:* + at doNTCallback0 (node.js:*:*) at process._tickCallback (node.js:*:*) 42 42 @@ -25,12 +21,9 @@ Error: hello at Object.exports.runInThisContext (vm.js:*) at Object.<anonymous> ([stdin]-wrapper:*:*) at Module._compile (module.js:*:*) - at evalScript (node.js:*:*) - at Socket.<anonymous> (node.js:*:*) - at emitNone (events.js:*:*) - at Socket.emit (events.js:*:*) - at endReadableNT (_stream_readable.js:*:*) - at doNTCallback2 (node.js:*:*) + at node.js:*:* + at doNTCallback0 (node.js:*:*) + at process._tickCallback (node.js:*:*) [stdin]:1 throw new Error("hello") @@ -40,12 +33,9 @@ Error: hello at Object.exports.runInThisContext (vm.js:*) at Object.<anonymous> ([stdin]-wrapper:*:*) at Module._compile (module.js:*:*) - at evalScript (node.js:*:*) - at Socket.<anonymous> (node.js:*:*) - at emitNone (events.js:*:*) - at Socket.emit (events.js:*:*) - at endReadableNT (_stream_readable.js:*:*) - at doNTCallback2 (node.js:*:*) + at node.js:*:* + at doNTCallback0 (node.js:*:*) + at process._tickCallback (node.js:*:*) 100 [stdin]:1 @@ -56,12 +46,9 @@ ReferenceError: y is not defined at Object.exports.runInThisContext (vm.js:*) at Object.<anonymous> ([stdin]-wrapper:*:*) at Module._compile (module.js:*:*) - at evalScript (node.js:*:*) - at Socket.<anonymous> (node.js:*:*) - at emitNone (events.js:*:*) - at Socket.emit (events.js:*:*) - at endReadableNT (_stream_readable.js:*:*) - at doNTCallback2 (node.js:*:*) + at node.js:*:* + at doNTCallback0 (node.js:*:*) + at process._tickCallback (node.js:*:*) [stdin]:1 var ______________________________________________; throw 10 |