summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/v8/test/mjsunit/stack-traces.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/v8/test/mjsunit/stack-traces.js')
-rw-r--r--src/3rdparty/v8/test/mjsunit/stack-traces.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/3rdparty/v8/test/mjsunit/stack-traces.js b/src/3rdparty/v8/test/mjsunit/stack-traces.js
index 536e71b..438eec9 100644
--- a/src/3rdparty/v8/test/mjsunit/stack-traces.js
+++ b/src/3rdparty/v8/test/mjsunit/stack-traces.js
@@ -111,6 +111,18 @@ function testStrippedCustomError() {
throw new CustomError("hep-hey", CustomError);
}
+MyObj = function() { FAIL; }
+
+MyObjCreator = function() {}
+
+MyObjCreator.prototype.Create = function() {
+ return new MyObj();
+}
+
+function testClassNames() {
+ (new MyObjCreator).Create();
+}
+
// Utility function for testing that the expected strings occur
// in the stack trace produced when running the given function.
function testTrace(name, fun, expected, unexpected) {
@@ -254,6 +266,8 @@ testTrace("testDefaultCustomError", testDefaultCustomError,
["collectStackTrace"]);
testTrace("testStrippedCustomError", testStrippedCustomError, ["hep-hey"],
["new CustomError", "collectStackTrace"]);
+testTrace("testClassNames", testClassNames,
+ ["new MyObj", "MyObjCreator.Create"], ["as Create"]);
testCallerCensorship();
testUnintendedCallerCensorship();
testErrorsDuringFormatting();