RESOLVED FIXED 18989
sunspider regexp-dna is inaccurate on firefox
https://bugs.webkit.org/show_bug.cgi?id=18989
Summary sunspider regexp-dna is inaccurate on firefox
Felix
Reported 2008-05-10 15:57:04 PDT
dnaInput = dnaInput.replace(k, subs[k], "g") the 3rd arg to String.replace is a js extension in firefox/spidermonkey. it's not supported by safari/webkit, opera, and IE. those browsers ignore the 'g' flag, so they only replace the first match. firefox is doing a lot more work on this test than other browsers.
Attachments
Patch to update test (426 bytes, patch)
2008-10-07 13:24 PDT, Dave Hyatt
mjs: review+
Felix
Comment 1 2008-05-10 15:59:10 PDT
forgot to mention. an easy way to confirm this is to add to the end of the test alert(dnaInput.length); and load it on different browsers.
Dave Hyatt
Comment 2 2008-10-07 13:24:13 PDT
Created attachment 24156 [details] Patch to update test
Maciej Stachowiak
Comment 3 2008-10-07 13:47:56 PDT
Comment on attachment 24156 [details] Patch to update test r=me Can you add a FIXME above this line indicating that it should really be doing a global substitution, not just a single one? We'll want to do that in a future SunSpider version.
Dave Hyatt
Comment 4 2008-10-07 14:22:15 PDT
Fixed in r37390.
Note You need to log in before you can comment on or make changes to this bug.