Index: test/mjsunit/stack-traces-display-name.js |
diff --git a/test/mjsunit/stack-traces-display-name.js b/test/mjsunit/stack-traces-display-name.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..0b7c0fceb083c8524776bf7cafa1a93c8343a7fe |
--- /dev/null |
+++ b/test/mjsunit/stack-traces-display-name.js |
@@ -0,0 +1,15 @@ |
+// Copyright 2016 the V8 project authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+var o = { f: function() { throw new Error(); } }; |
+o.g1 = function() { o.f() } |
+o.g2 = o.g1; |
+o.h = function() { o.g1() } |
+o.f.displayName = "MySpecialFunction"; |
+ |
+try { |
+ o.h(); |
+} catch (e) { |
+ assertTrue(e.stack.indexOf("MySpecialFunction") != -1); |
+} |