Summary: | Add String::format variant that takes va_args | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Eric Carlson <eric.carlson> | ||||||
Component: | Web Template Framework | Assignee: | Eric Carlson <eric.carlson> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | benjamin, buildbot, cdumez, cmarcelo, commit-queue, darin, dbates, ggaren, jer.noble, webkit-bug-importer | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | Other | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=176035 | ||||||||
Attachments: |
|
Description
Eric Carlson
2017-08-25 10:32:58 PDT
Created attachment 319091 [details]
Proposed patch.
Comment on attachment 319091 [details] Proposed patch. Clearing flags on attachment: 319091 Committed r221203: <http://trac.webkit.org/changeset/221203> All reviewed patches have been landed. Closing bug. Comment on attachment 319091 [details] Proposed patch. View in context: https://bugs.webkit.org/attachment.cgi?id=319091&action=review > Source/WTF/wtf/text/WTFString.cpp:471 > + va_copy(argsCopy, args); This function calls "va_end(args);" in two places. It also passes "args" to some callees. I think all uses of "args" need to become uses of "argsCopy", no? (In reply to Geoffrey Garen from comment #5) > Comment on attachment 319091 [details] > Proposed patch. > > View in context: > https://bugs.webkit.org/attachment.cgi?id=319091&action=review > > > Source/WTF/wtf/text/WTFString.cpp:471 > > + va_copy(argsCopy, args); > > This function calls "va_end(args);" in two places. It also passes "args" to > some callees. I think all uses of "args" need to become uses of "argsCopy", > no? Oops, "va_end(args)" is definitely wrong, but AFAIK the other uses of "args" is correct. We should stop using String::format. And instead use something that is type safe. Like use makeString. Created attachment 319179 [details]
Address post-review feedback.
(In reply to Darin Adler from comment #8) > And instead use something that is type safe. Like use makeString. Filed bug 176035 for this suggestion. |