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

Unified Diff: LayoutTests/fast/js/script-tests/regexp-match-exception.js

Issue 300103002: ScriptRegexp::match(): gracefully fail if regexp.exec() throws. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 7 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: LayoutTests/fast/js/script-tests/regexp-match-exception.js
diff --git a/LayoutTests/fast/js/script-tests/regexp-match-exception.js b/LayoutTests/fast/js/script-tests/regexp-match-exception.js
new file mode 100644
index 0000000000000000000000000000000000000000..75cd22dd83c73a70c3f4ae8dd9f67da06df48140
--- /dev/null
+++ b/LayoutTests/fast/js/script-tests/regexp-match-exception.js
@@ -0,0 +1,14 @@
+description("This tests that ScriptRegexp matching fails when running into an exceptional condition (stack overflow) without crashing.");
+
+function runTest() {
+ var input = document.createElement("input");
+ input.type = "email";
+
+ function repeatedlySet(r) {
+ // Consume stack until failure.
+ input.value = r;
+ repeatedlySet(r);
+ }
+ repeatedlySet("an@example.com");
+}
+shouldThrow("runTest()");
« no previous file with comments | « LayoutTests/fast/js/regexp-match-exception-no-crash-expected.txt ('k') | Source/bindings/v8/ScriptRegexp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698