RESOLVED FIXED 100578
String::split(UChar, Vector<String>&) shouldn't create a temporary String
https://bugs.webkit.org/show_bug.cgi?id=100578
Summary String::split(UChar, Vector<String>&) shouldn't create a temporary String
Michael Saboff
Reported 2012-10-26 16:47:06 PDT
String::split(UChar separator, Vector<String>& result) creates a single character string from the first argument and then calls the String::split(const String&, bool, Vector<String>&). Instead it could call the (UChar, bool, Vector<String>&) version of String::split.
Attachments
Patch (1.21 KB, patch)
2012-10-26 17:35 PDT, Michael Saboff
andersca: review+
webkit.review.bot: commit-queue-
Patch with inlined versions of 2 arg split() (3.11 KB, patch)
2012-10-29 10:36 PDT, Michael Saboff
no flags
Michael Saboff
Comment 1 2012-10-26 17:35:29 PDT
WebKit Review Bot
Comment 2 2012-10-26 19:27:22 PDT
Comment on attachment 171061 [details] Patch Rejecting attachment 171061 [details] from commit-queue. Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 2 Last 500 characters of output: erge conflict in Source/WebCore/ChangeLog Failed to merge in the changes. Patch failed at 0002 Fix a operator ordering bug in SVGSMILElement::calculateAnimationPercentAndRepeat When you have resolved this problem run "git rebase --continue". If you would prefer to skip this patch, instead run "git rebase --skip". To restore the original branch and stop rebasing run "git rebase --abort". rebase refs/remotes/origin/master: command returned error: 1 Died at Tools/Scripts/update-webkit line 154. Full output: http://queues.webkit.org/results/14610261
Darin Adler
Comment 3 2012-10-27 14:01:39 PDT
Comment on attachment 171061 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=171061&action=review > Source/WTF/wtf/text/WTFString.cpp:691 > void String::split(UChar separator, Vector<String>& result) const > { > - split(String(&separator, 1), false, result); > + split(separator, false, result); > } This could also be inlined in the header.
Michael Saboff
Comment 4 2012-10-29 10:36:57 PDT
Created attachment 171279 [details] Patch with inlined versions of 2 arg split()
WebKit Review Bot
Comment 5 2012-10-29 11:19:13 PDT
Comment on attachment 171279 [details] Patch with inlined versions of 2 arg split() Clearing flags on attachment: 171279 Committed r132828: <http://trac.webkit.org/changeset/132828>
WebKit Review Bot
Comment 6 2012-10-29 11:19:17 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.