RESOLVED FIXED 225732
Remove StringBuilder::appendNumber
https://bugs.webkit.org/show_bug.cgi?id=225732
Summary Remove StringBuilder::appendNumber
Darin Adler
Reported 2021-05-12 21:21:39 PDT
Remove StringBuilder::appendNumber
Attachments
Patch (103.76 KB, patch)
2021-05-12 21:41 PDT, Darin Adler
no flags
Darin Adler
Comment 1 2021-05-12 21:41:56 PDT
EWS Watchlist
Comment 2 2021-05-12 21:42:46 PDT
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See https://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Sam Weinig
Comment 3 2021-05-13 08:29:08 PDT
Comment on attachment 428458 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=428458&action=review > Source/WTF/ChangeLog:9 > + We originally added StringBuilder::appendNumber to resolve the ambiguity > + between UChar and uint16_t, but that problem was solved long ago and it I hadn't realized we had done this otherwise I would have totally done this myself. That's great! Next up should we remove appendLiteral? > Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp:277 > + String errorMessage = makeString("Failed to load resource: the server responded with a status of ", response.httpStatusCode(), " (", response.httpStatusText(), ')'); I would leave out the String and use auto here.
Darin Adler
Comment 4 2021-05-13 08:48:48 PDT
Comment on attachment 428458 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=428458&action=review >> Source/WTF/ChangeLog:9 >> + between UChar and uint16_t, but that problem was solved long ago and it > > I hadn't realized we had done this otherwise I would have totally done this myself. That's great! Next up should we remove appendLiteral? Yes I have been thinking about that. The appendLiteral function does optimization that is not very valuable; it may save some looping over characters to find the string length, and it may be optimizing memory use by using characters in place for the case where only a single literal ends up contributing the entries content of the result string. We could work to keep one or both of these optimizations using ASCIILiteral or a variant on it, for StringBuilder itself and for string concatenation. Or, more likely, we could just forgo both. I can’t remember why I thought it was worth adding.
Darin Adler
Comment 5 2021-05-13 08:56:10 PDT
entire content, not entries content
EWS
Comment 6 2021-05-13 09:18:42 PDT
Committed r277437 (237685@main): <https://commits.webkit.org/237685@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 428458 [details].
Radar WebKit Bug Importer
Comment 7 2021-05-13 09:19:14 PDT
Note You need to log in before you can comment on or make changes to this bug.