Bug 1108382 - Part 4: Do not use non-standard flag argument of String.prototype.replace in build/pgo/. r=jandem

This commit is contained in:
Tooru Fujisawa 2015-03-01 09:51:33 +09:00
Родитель c8a5e780ae
Коммит 0a48a9926a
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -1741,14 +1741,14 @@ ilen = dnaInput.length;
dnaInput = dnaInput.replace(/>.*\n|\n/g,"")
clen = dnaInput.length
var dnaOutputString;
var dnaOutputString = "";
for(i in seqs)
dnaOutputString += seqs[i].source + " " + (dnaInput.match(seqs[i]) || []).length + "\n";
// match returns null if no matches, so replace with empty
for(k in subs)
dnaInput = dnaInput.replace(k, subs[k], "g")
dnaInput = dnaInput.replace(k, subs[k]) // FIXME: Would like this to be a global substitution in a future version of SunSpider.
// search string, replacement string, flags