WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
24046
Misc improvements to CString
https://bugs.webkit.org/show_bug.cgi?id=24046
Summary
Misc improvements to CString
Darin Fisher (:fishd, Google)
Reported
2009-02-19 16:35:29 PST
Misc improvements to CString 1- Make it possible to initialize a CString from a CStringBuffer 2- Make it possible to get a CStringBuffer from a CString 3- Change CStringBuffer::data() to return a const pointer to ward off mutation 4- Remove unused releaseBuffer() methods. 5- Make CStringBuffer::create() private to force consumers to get a CStringBuffer from a CString.
Attachments
v1 patch
(4.74 KB, patch)
2009-02-19 16:51 PST
,
Darin Fisher (:fishd, Google)
eric
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Darin Fisher (:fishd, Google)
Comment 1
2009-02-19 16:51:37 PST
Created
attachment 27816
[details]
v1 patch
Darin Fisher (:fishd, Google)
Comment 2
2009-02-19 16:52:53 PST
There is no consumer yet for CString::buffer() and the corresponding constructor, but I am brewing such a consumer that will live in the chromium WebKit layer.
Eric Seidel (no email)
Comment 3
2009-02-19 16:59:57 PST
Comment on
attachment 27816
[details]
v1 patch This looks fine. It's kinda sad how we're growing a parallel string class here, but that happened long ago, and was inevitable based on how many APIs outside of WebKit depend on char* strings. (And doesn't really relate to this patch.) releaseBuffer() was not used anywhere? I'm surprised. Looks fine.
Eric Seidel (no email)
Comment 4
2009-02-19 17:04:13 PST
I see releaseBuffer was added: 2008-03-25 Brady Eidson <
beidson@apple.com
> Reviewed by Anders Add the ability to transform a CString into a SharedBuffer to avoid copying data This is valuable to avoid copying a block of data for an upcoming patch * platform/SharedBuffer.cpp: (WebCore::SharedBuffer::adoptVector): * platform/SharedBuffer.h: * platform/text/CString.cpp: (WebCore::CString::releaseBuffer): * platform/text/CString.h: (WebCore::CStringBuffer::releaseBuffer): But I don't see the upcomming patch. :)
Darin Fisher (:fishd, Google)
Comment 5
2009-02-20 07:31:53 PST
Brady, please let me know if you want releaseBuffer added back. Landed as
http://trac.webkit.org/changeset/41105
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug