[webkit-reviews] review requested: [Bug 26001] Change callers of String::adopt() to String::createUninitialized() : [Attachment 30642] Fx

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun May 24 23:47:20 PDT 2009


Dave Moore <davemoore at google.com> has asked  for review:
Bug 26001: Change callers of String::adopt() to String::createUninitialized()
https://bugs.webkit.org/show_bug.cgi?id=26001

Attachment 30642: Fx
https://bugs.webkit.org/attachment.cgi?id=30642&action=review

------- Additional Comments from Dave Moore <davemoore at google.com>
This patch changes many of the uses of adopt() to createUninitialized(). Most
are just straight-forward wins. A couple are places where we walk through a
list of nodes and extract the strings from them. These used to build up the
string incrementally, appending to a buffer. Now I walk through the list twice,

the first to discover the total length and the second to write the string into
the inline buffer. I think it's worth the second navigation to keep everything
in one malloc node.

In places where the logic was somewhat complicated as to the creation of the to

be adopted buffer I left it as it was.


More information about the webkit-reviews mailing list