aboutsummaryrefslogtreecommitdiff
path: root/test/message
diff options
context:
space:
mode:
authorFelix Geisendörfer <felix@debuggable.com>2012-05-08 16:07:14 +0200
committerisaacs <i@izs.me>2012-05-09 11:54:43 -0700
commit814033365b146afb095fad6c2c05d0da0237615f (patch)
treec223a6da3f1992d392b4310b8dc3586c116ed149 /test/message
parentee437c0557c9f3a6a1960d3a8d64e09166d7048d (diff)
downloadandroid-node-v8-814033365b146afb095fad6c2c05d0da0237615f.tar.gz
android-node-v8-814033365b146afb095fad6c2c05d0da0237615f.tar.bz2
android-node-v8-814033365b146afb095fad6c2c05d0da0237615f.zip
Fix process.nextTick throw call sites
This patch now reports the proper throw call site for exceptions triggered within process.nextTick. So instead of this: node.js:201 throw e; // process.nextTick error, or 'error' event on first tick ^ You will now see: mydir/myscript.js:15 throw new Error('My Error'); ^ From my testing this patch causes no performance regressions, but does greatly simplify processing the nextTickQueue.
Diffstat (limited to 'test/message')
-rw-r--r--test/message/stack_overflow.out6
-rw-r--r--test/message/throw_custom_error.out6
-rw-r--r--test/message/throw_non_error.out6
-rw-r--r--test/message/undefined_reference_in_new_context.out6
4 files changed, 12 insertions, 12 deletions
diff --git a/test/message/stack_overflow.out b/test/message/stack_overflow.out
index f09f10bb5a..1b6971da32 100644
--- a/test/message/stack_overflow.out
+++ b/test/message/stack_overflow.out
@@ -1,6 +1,6 @@
before
-node.js:*
- throw e; // process.nextTick error, or 'error' event on first tick
- ^
+module.js:311
+ throw err;
+ ^
RangeError: Maximum call stack size exceeded
diff --git a/test/message/throw_custom_error.out b/test/message/throw_custom_error.out
index 357afdb76b..b5fd92b425 100644
--- a/test/message/throw_custom_error.out
+++ b/test/message/throw_custom_error.out
@@ -1,6 +1,6 @@
before
-node.js:*
- throw e; // process.nextTick error, or 'error' event on first tick
- ^
+module.js:311
+ throw err;
+ ^
MyCustomError: This is a custom message
diff --git a/test/message/throw_non_error.out b/test/message/throw_non_error.out
index 477b13cd8a..255e5e4d54 100644
--- a/test/message/throw_non_error.out
+++ b/test/message/throw_non_error.out
@@ -1,6 +1,6 @@
before
-node.js:*
- throw e; // process.nextTick error, or 'error' event on first tick
- ^
+module.js:311
+ throw err;
+ ^
[object Object]
diff --git a/test/message/undefined_reference_in_new_context.out b/test/message/undefined_reference_in_new_context.out
index d0e6e2f692..1e6a2d31d1 100644
--- a/test/message/undefined_reference_in_new_context.out
+++ b/test/message/undefined_reference_in_new_context.out
@@ -1,8 +1,8 @@
before
-node.js:*
- throw e; // process.nextTick error, or 'error' event on first tick
- ^
+module.js:311
+ throw err;
+ ^
ReferenceError: foo is not defined
at evalmachine.<anonymous>:*
at Object.<anonymous> (*test*message*undefined_reference_in_new_context.js:*)