summaryrefslogtreecommitdiffstats
path: root/V8Binding/v8/test/mjsunit/stack-traces.js
diff options
context:
space:
mode:
Diffstat (limited to 'V8Binding/v8/test/mjsunit/stack-traces.js')
-rw-r--r--V8Binding/v8/test/mjsunit/stack-traces.js17
1 files changed, 14 insertions, 3 deletions
diff --git a/V8Binding/v8/test/mjsunit/stack-traces.js b/V8Binding/v8/test/mjsunit/stack-traces.js
index 6ac8b0a..e457ece 100644
--- a/V8Binding/v8/test/mjsunit/stack-traces.js
+++ b/V8Binding/v8/test/mjsunit/stack-traces.js
@@ -25,8 +25,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-Error.captureStackTraces = true;
-
function testMethodNameInference() {
function Foo() { }
Foo.prototype.bar = function () { FAIL; };
@@ -75,6 +73,17 @@ function testConstructor() {
new Plonk();
}
+function testRenamedMethod() {
+ function a$b$c$d() { return FAIL; }
+ function Wookie() { }
+ Wookie.prototype.d = a$b$c$d;
+ (new Wookie).d();
+}
+
+function testAnonymousMethod() {
+ (function () { FAIL }).call([1, 2, 3]);
+}
+
// Utility function for testing that the expected strings occur
// in the stack trace produced when running the given function.
function testTrace(fun, expected) {
@@ -151,9 +160,11 @@ testTrace(testNested, ["at one", "at two", "at three"]);
testTrace(testMethodNameInference, ["at Foo.bar"]);
testTrace(testImplicitConversion, ["at Nirk.valueOf"]);
testTrace(testEval, ["at Doo (eval at testEval"]);
-testTrace(testNestedEval, ["at eval (eval at Inner (eval at Outer"]);
+testTrace(testNestedEval, ["eval at Inner (eval at Outer"]);
testTrace(testValue, ["at Number.causeError"]);
testTrace(testConstructor, ["new Plonk"]);
+testTrace(testRenamedMethod, ["Wookie.a$b$c$d [as d]"]);
+testTrace(testAnonymousMethod, ["Array.<anonymous>"]);
testCallerCensorship();
testUnintendedCallerCensorship();