RESOLVED FIXED Bug 44600
REGRESSION: Splitting an empty string sometimes returns an empty array
https://bugs.webkit.org/show_bug.cgi?id=44600
Summary REGRESSION: Splitting an empty string sometimes returns an empty array
John Moe
Reported 2010-08-25 04:50:16 PDT
In the console: 'a'.split(/\s+/) ["a"] ''.split(/\s+/) [""] ''.split(/\s+/) [] Notice the last two are identical, but give different answers. Other browsers and older webkit give the [""]. This seems to break some pages of Google apps for your domain admin.
Attachments
Patch with new regression test for this issue. (2.50 KB, patch)
2010-08-25 14:58 PDT, Michael Saboff
no flags
Alexey Proskuryakov
Comment 1 2010-08-25 09:54:17 PDT
This is a regression from Safari 5.0.1.
Geoffrey Garen
Comment 2 2010-08-25 11:57:39 PDT
Michael Saboff
Comment 3 2010-08-25 12:55:30 PDT
This bug is due to the single entry regexp cache. That regexp cache has been removed in https://bugs.webkit.org/attachment.cgi?id=65336 as part of resolving https://bugs.webkit.org/show_bug.cgi?id=44555. A test for this corner case will be added.
Michael Saboff
Comment 4 2010-08-25 14:58:35 PDT
Created attachment 65478 [details] Patch with new regression test for this issue. The underlying problem was fixed in bug https://bugs.webkit.org/show_bug.cgi?id=44555.
WebKit Commit Bot
Comment 5 2010-08-25 20:10:08 PDT
Comment on attachment 65478 [details] Patch with new regression test for this issue. Clearing flags on attachment: 65478 Committed r66075: <http://trac.webkit.org/changeset/66075>
WebKit Commit Bot
Comment 6 2010-08-25 20:10:14 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.