From 0a48a9926a8027e31c30df408049e29f1e800d7c Mon Sep 17 00:00:00 2001 From: Tooru Fujisawa Date: Sun, 1 Mar 2015 09:51:33 +0900 Subject: [PATCH] Bug 1108382 - Part 4: Do not use non-standard flag argument of String.prototype.replace in build/pgo/. r=jandem --- build/pgo/js-input/sunspider/regexp-dna.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/pgo/js-input/sunspider/regexp-dna.html b/build/pgo/js-input/sunspider/regexp-dna.html index a4902196736f..4a00399b8054 100644 --- a/build/pgo/js-input/sunspider/regexp-dna.html +++ b/build/pgo/js-input/sunspider/regexp-dna.html @@ -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