Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(407)

Unified Diff: test/mjsunit/stack-traces.js

Issue 20692002: Lazy call to custom stack trace formatting using Error.prepareStackTrace. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: adapting one test Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/messages.js ('k') | test/mjsunit/stack-traces-custom-lazy.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/stack-traces.js
diff --git a/test/mjsunit/stack-traces.js b/test/mjsunit/stack-traces.js
index 4a37ee6fa4f9ead6629c351af03cc72111a173b7..46a16eb87a2db857a00f8d7de060af09ffc2fa00 100644
--- a/test/mjsunit/stack-traces.js
+++ b/test/mjsunit/stack-traces.js
@@ -315,7 +315,11 @@ assertTrue(fired);
Error.prepareStackTrace = function() { throw new Error("abc"); };
var message;
try {
- throw new Error();
+ try {
+ throw new Error();
+ } catch (e) {
+ e.stack;
+ }
} catch (e) {
message = e.message;
}
@@ -324,6 +328,6 @@ assertEquals("abc", message);
// Test that modifying Error.prepareStackTrace by itself works.
Error.prepareStackTrace = function() { Error.prepareStackTrace = "custom"; };
-new Error();
+new Error().stack;
assertEquals("custom", Error.prepareStackTrace);
« no previous file with comments | « src/messages.js ('k') | test/mjsunit/stack-traces-custom-lazy.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698