summaryrefslogtreecommitdiff
path: root/test/message
diff options
context:
space:
mode:
authorAnatoli Papirovski <apapirovski@mac.com>2018-09-13 07:35:15 -0700
committerRich Trott <rtrott@gmail.com>2018-10-17 20:38:07 -0700
commite7af9830e98fcda7e7a11e0b13b667163cc8c940 (patch)
treebf90f7e9823fe29f90ea9b890ec39370a3e97526 /test/message
parent4e9e0d339efa46316d90d6f2618afd0c0fc6cd34 (diff)
downloadandroid-node-v8-e7af9830e98fcda7e7a11e0b13b667163cc8c940.tar.gz
android-node-v8-e7af9830e98fcda7e7a11e0b13b667163cc8c940.tar.bz2
android-node-v8-e7af9830e98fcda7e7a11e0b13b667163cc8c940.zip
timers: run nextTicks after each immediate and timer
In order to better match the browser behaviour, run nextTicks (and subsequently the microtask queue) after each individual Timer and Immediate, rather than after the whole list is processed. The current behaviour is somewhat of a performance micro-optimization and also partly dictated by how timer handles were implemented. PR-URL: https://github.com/nodejs/node/pull/22842 Fixes: https://github.com/nodejs/node/issues/22257 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Diffstat (limited to 'test/message')
-rw-r--r--test/message/events_unhandled_error_nexttick.out1
-rw-r--r--test/message/nexttick_throw.out1
-rw-r--r--test/message/stdin_messages.out8
-rw-r--r--test/message/timeout_throw.out2
-rw-r--r--test/message/unhandled_promise_trace_warnings.out4
5 files changed, 8 insertions, 8 deletions
diff --git a/test/message/events_unhandled_error_nexttick.out b/test/message/events_unhandled_error_nexttick.out
index e00580ce93..4d0eba3a85 100644
--- a/test/message/events_unhandled_error_nexttick.out
+++ b/test/message/events_unhandled_error_nexttick.out
@@ -14,6 +14,7 @@ Error
at bootstrapNodeJSCore (internal/bootstrap/node.js:*:*)
Emitted 'error' event at:
at process.nextTick (*events_unhandled_error_nexttick.js:*:*)
+ at internalTickCallback (internal/process/next_tick.js:*:*)
at process._tickCallback (internal/process/next_tick.js:*:*)
at Function.Module.runMain (internal/modules/cjs/loader.js:*:*)
at startup (internal/bootstrap/node.js:*:*)
diff --git a/test/message/nexttick_throw.out b/test/message/nexttick_throw.out
index 16e41f6343..09b00de80f 100644
--- a/test/message/nexttick_throw.out
+++ b/test/message/nexttick_throw.out
@@ -4,6 +4,7 @@
^
ReferenceError: undefined_reference_error_maker is not defined
at *test*message*nexttick_throw.js:*:*
+ at internalTickCallback (internal/process/next_tick.js:*:*)
at process._tickCallback (internal/process/next_tick.js:*:*)
at Function.Module.runMain (internal/modules/cjs/loader.js:*:*)
at startup (internal/bootstrap/node.js:*:*)
diff --git a/test/message/stdin_messages.out b/test/message/stdin_messages.out
index d4498b452a..bbf996bb56 100644
--- a/test/message/stdin_messages.out
+++ b/test/message/stdin_messages.out
@@ -12,7 +12,7 @@ SyntaxError: Strict mode code may not include a with statement
at Socket.<anonymous> (internal/bootstrap/node.js:*:*)
at Socket.emit (events.js:*:*)
at endReadableNT (_stream_readable.js:*:*)
- at process._tickCallback (internal/process/next_tick.js:*:*)
+ at process.internalTickCallback (internal/process/next_tick.js:*:*)
42
42
[stdin]:1
@@ -29,7 +29,7 @@ Error: hello
at Socket.<anonymous> (internal/bootstrap/node.js:*:*)
at Socket.emit (events.js:*:*)
at endReadableNT (_stream_readable.js:*:*)
- at process._tickCallback (internal/process/next_tick.js:*:*)
+ at process.internalTickCallback (internal/process/next_tick.js:*:*)
[stdin]:1
throw new Error("hello")
^
@@ -44,7 +44,7 @@ Error: hello
at Socket.<anonymous> (internal/bootstrap/node.js:*:*)
at Socket.emit (events.js:*:*)
at endReadableNT (_stream_readable.js:*:*)
- at process._tickCallback (internal/process/next_tick.js:*:*)
+ at process.internalTickCallback (internal/process/next_tick.js:*:*)
100
[stdin]:1
var x = 100; y = x;
@@ -60,7 +60,7 @@ ReferenceError: y is not defined
at Socket.<anonymous> (internal/bootstrap/node.js:*:*)
at Socket.emit (events.js:*:*)
at endReadableNT (_stream_readable.js:*:*)
- at process._tickCallback (internal/process/next_tick.js:*:*)
+ at process.internalTickCallback (internal/process/next_tick.js:*:*)
[stdin]:1
var ______________________________________________; throw 10
diff --git a/test/message/timeout_throw.out b/test/message/timeout_throw.out
index 210f2661e2..d97f8b1887 100644
--- a/test/message/timeout_throw.out
+++ b/test/message/timeout_throw.out
@@ -3,7 +3,5 @@
^
ReferenceError: undefined_reference_error_maker is not defined
at Timeout._onTimeout (*test*message*timeout_throw.js:*:*)
- at ontimeout (timers.js:*:*)
- at tryOnTimeout (timers.js:*:*)
at listOnTimeout (timers.js:*:*)
at processTimers (timers.js:*:*)
diff --git a/test/message/unhandled_promise_trace_warnings.out b/test/message/unhandled_promise_trace_warnings.out
index d610bb05eb..cf12c647ac 100644
--- a/test/message/unhandled_promise_trace_warnings.out
+++ b/test/message/unhandled_promise_trace_warnings.out
@@ -14,6 +14,7 @@
at *
at *
at *
+ at *
(node:*) Error: This was rejected
at * (*test*message*unhandled_promise_trace_warnings.js:*)
at *
@@ -32,6 +33,7 @@
at *
at *
at *
+ at *
(node:*) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 1)
at handledRejection (internal/process/promises.js:*)
at handler (internal/process/promises.js:*)
@@ -39,5 +41,3 @@
at Promise.catch *
at Immediate.setImmediate (*test*message*unhandled_promise_trace_warnings.js:*)
at *
- at *
- at *