Bug 18989

Summary: sunspider regexp-dna is inaccurate on firefox
Product: WebKit Reporter: Felix <felix.1>
Component: Tools / TestsAssignee: Dave Hyatt <hyatt>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, barraclough, dmandelin, ggaren, mjs, oliver, sam, sayrer, sdwilsh
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.5   
Attachments:
Description Flags
Patch to update test mjs: review+

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.