Commit 96746cc7 authored by adamk's avatar adamk Committed by Commit bot

Avoid infinite loop in RegExp.prototype[Symbol.split]

Our implementation of the spec got one comparison wrong, at
step 19.d.iii (we were comparing against 'q' instead of 'p').

R=littledan@chromium.org
BUG=chromium:607566
LOG=n

Review-Url: https://codereview.chromium.org/1940643002
Cr-Commit-Position: refs/heads/master@{#35947}
parent eda8ea16
......@@ -513,7 +513,7 @@ function RegExpSubclassSplit(string, limit) {
stringIndex += AdvanceStringIndex(string, stringIndex, unicode);
} else {
var end = MinSimple(TO_LENGTH(splitter.lastIndex), size);
if (end === stringIndex) {
if (end === prevStringIndex) {
stringIndex += AdvanceStringIndex(string, stringIndex, unicode);
} else {
%AddElement(
......
......@@ -119,11 +119,7 @@
'built-ins/RegExp/prototype/exec/get-sticky-err': [FAIL],
'built-ins/RegExp/prototype/test/get-sticky-err': [FAIL],
# Missing lastIndex support
'built-ins/RegExp/prototype/Symbol.split/str-result-coerce-length-err': [FAIL],
# Times out
'built-ins/RegExp/prototype/Symbol.split/str-coerce-lastindex': [SKIP],
'built-ins/RegExp/prototype/Symbol.match/coerce-global': [SKIP],
'built-ins/RegExp/prototype/Symbol.match/builtin-coerce-global': [SKIP],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment