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

Unified Diff: LayoutTests/fast/dom/shadow/focus-controller-recursion-crash.html

Issue 1204213002: Avoid tail recursion to mitigate stack exhaustion (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: lower the loop threshold from 100000 to 50000 Created 5 years, 6 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 | « no previous file | LayoutTests/fast/dom/shadow/focus-controller-recursion-crash-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/dom/shadow/focus-controller-recursion-crash.html
diff --git a/LayoutTests/fast/dom/shadow/focus-controller-recursion-crash.html b/LayoutTests/fast/dom/shadow/focus-controller-recursion-crash.html
new file mode 100644
index 0000000000000000000000000000000000000000..a5a47e5a6c7a5e2b13ca2290e69a5c765cb03c58
--- /dev/null
+++ b/LayoutTests/fast/dom/shadow/focus-controller-recursion-crash.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<script src="../../../resources/js-test.js"></script>
+<div>This test passes if it does not crash.</div>
+<input id="first">
+<select></select>
+<input>
+<script>
+var sel = document.querySelector('select');
+for (var i = 0; i < 50000; ++i) {
+ var o = document.createElement('option');
+ sel.appendChild(o);
+}
+
+document.getElementById('first').focus();
+
+eventSender.keyDown('\t');
+eventSender.keyDown('\t');
+eventSender.keyDown('\t', ['shiftKey']);
+eventSender.keyDown('\t', ['shiftKey']);
+
+shouldBeEqualToString('document.activeElement.id', 'first');
+</script>
« no previous file with comments | « no previous file | LayoutTests/fast/dom/shadow/focus-controller-recursion-crash-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698