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); |