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

Unified Diff: test/mjsunit/harmony/regexp-change-exec.js

Issue 1596483005: Add ES2015 RegExp full subclassing semantics behind a flag (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: camelCase Created 4 years, 9 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
Index: test/mjsunit/harmony/regexp-change-exec.js
diff --git a/test/message/regress/regress-4829-1.js b/test/mjsunit/harmony/regexp-change-exec.js
similarity index 50%
copy from test/message/regress/regress-4829-1.js
copy to test/mjsunit/harmony/regexp-change-exec.js
index 1ad5feda8cb96cd24e4c47f7407c9699d150c327..4c9757e3d50094d116123e8d14855775b497e679 100644
--- a/test/message/regress/regress-4829-1.js
+++ b/test/mjsunit/harmony/regexp-change-exec.js
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-function tag() {}
+// Flags: --harmony-regexp-exec
-tag(tag`\xyy`);
+class MyError extends Error { }
+RegExp.prototype.exec = () => { throw new MyError() };
+assertThrows(() => "foo".match(/bar/), MyError);
« no previous file with comments | « test/cctest/interpreter/bytecode_expectations/ForOf.golden ('k') | test/mjsunit/harmony/regexp-no-change-exec.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698