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

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

Issue 2175603003: Omit frames up to new target in Error constructor (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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/messages.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-5216.js
diff --git a/test/mjsunit/harmony/regexp-change-exec.js b/test/mjsunit/regress/regress-5216.js
similarity index 60%
copy from test/mjsunit/harmony/regexp-change-exec.js
copy to test/mjsunit/regress/regress-5216.js
index ff84506d894ba9a4cb6e9b3127812a9e74642f93..9097310fc2ce20542e7d979cb7612576327d94e4 100644
--- a/test/mjsunit/harmony/regexp-change-exec.js
+++ b/test/mjsunit/regress/regress-5216.js
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+// Ensure that custom error constructors don't show up in stack traces.
+
class MyError extends Error { }
-RegExp.prototype.exec = () => { throw new MyError() };
-assertThrows(() => "foo".match(/bar/), MyError);
+assertFalse(new MyError().stack.includes("at MyError"));
« no previous file with comments | « src/messages.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698