| Summary: | Remove StringBuilder::appendNumber | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Darin Adler <darin> | ||||
| Component: | Web Template Framework | Assignee: | Darin Adler <darin> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | alecflett, andersca, beidson, benjamin, berto, cdumez, cgarcia, changseok, cmarcelo, dino, eric.carlson, esprehn+autocc, ews-watchlist, fmalita, glenn, gustavo, gyuyoung.kim, japhet, jer.noble, jsbell, kangil.han, keith_miller, kondapallykalyan, macpherson, mark.lam, menard, mifenton, msaboff, pdr, philipj, saam, sabouhallawa, sam, schenney, sergio, simon.fraser, toyoshim, tzagallo, webkit-bug-importer, yutak | ||||
| Priority: | P3 | Keywords: | InRadar | ||||
| Version: | WebKit Nightly Build | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Attachments: |
|
||||||
|
Description
Darin Adler
2021-05-12 21:21:39 PDT
Created attachment 428458 [details]
Patch
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 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. 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. entire content, not entries content 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]. |