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

Unified Diff: test/mjsunit/regress/regress-4815.js

Issue 2110683007: Use toString tag to format receiver in stack traces (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@20160629-builtin-exit-receiver
Patch Set: Rebase on master Created 4 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/runtime/runtime-object.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/regress/regress-4815.js
diff --git a/test/mjsunit/regress/regress-4815.js b/test/mjsunit/regress/regress-4815.js
index a63d1b1834f15e07b06584e4e946bbcd49565436..f6adb0169cd2a56da8fcb793e635252ce52b5a55 100644
--- a/test/mjsunit/regress/regress-4815.js
+++ b/test/mjsunit/regress/regress-4815.js
@@ -47,4 +47,22 @@ testBuiltinInStackTrace("Date.prototype.getTime.call('')", "at String.getTime");
// C++ builtins.
testBuiltinInStackTrace("Boolean.prototype.toString.call(thrower);",
"at Object.toString");
+
+// Constructor builtins.
testBuiltinInStackTrace("new Date(thrower);", "at new Date");
+
+// Ensure we correctly pick up the receiver's string tag.
+testBuiltinInStackTrace("Math.max(thrower);", "at Math.max");
+testBuiltinInStackTrace("Math.min(thrower);", "at Math.min");
+testBuiltinInStackTrace("Math.acos(thrower);", "at Math.acos");
+testBuiltinInStackTrace("Math.asin(thrower);", "at Math.asin");
+testBuiltinInStackTrace("Math.fround(thrower);", "at Math.fround");
+testBuiltinInStackTrace("Math.imul(thrower);", "at Math.imul");
+
+// As above, but function passed as an argument and then called.
+testBuiltinInStackTrace("((f, x) => f(x))(Math.max, thrower);", "at max");
+testBuiltinInStackTrace("((f, x) => f(x))(Math.min, thrower);", "at min");
+testBuiltinInStackTrace("((f, x) => f(x))(Math.acos, thrower);", "at acos");
+testBuiltinInStackTrace("((f, x) => f(x))(Math.asin, thrower);", "at asin");
+testBuiltinInStackTrace("((f, x) => f(x))(Math.fround, thrower);", "at fround");
+testBuiltinInStackTrace("((f, x) => f(x))(Math.imul, thrower);", "at imul");
« no previous file with comments | « src/runtime/runtime-object.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698