Bug 120040

Summary: Save three bytes per CStringBuffer object
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: Web Template FrameworkAssignee: Benjamin Poulain <benjamin>
Status: RESOLVED FIXED    
Severity: Normal CC: barraclough, benjamin, cmarcelo, commit-queue, gtk-ews, kling, koivisto, rego+ews, xan.lopez
Priority: P2 Keywords: BlinkMergeCandidate
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch darin: review+, gtk-ews: commit-queue-

Description Ryosuke Niwa 2013-08-19 17:27:12 PDT
Merge https://chromium.googlesource.com/chromium/blink/+/894ae8eafdb64912aefd8f9c809f4ccda84f3b89

sizeof(CStringBuffer) was rounded up to 8 on account of struct size and
alignment rules. This is clearly not what was intended.

Also tidy up includes.
Comment 1 Benjamin Poulain 2013-08-23 13:45:48 PDT
Created attachment 209506 [details]
Patch
Comment 2 Darin Adler 2013-08-23 13:47:40 PDT
Comment on attachment 209506 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=209506&action=review

> Source/WTF/wtf/text/CString.h:49
> +    char* mutableData() { return reinterpret_cast<char*>(this + 1); }

Might need to use reinterpret_cast_ptr for the benefit of some ARM-based platforms.
Comment 3 kov's GTK+ EWS bot 2013-08-23 15:13:40 PDT
Comment on attachment 209506 [details]
Patch

Attachment 209506 [details] did not pass gtk-wk2-ews (gtk-wk2):
Output: http://webkit-queues.appspot.com/results/1543435
Comment 4 Benjamin Poulain 2013-08-24 21:38:24 PDT
Committed r154565: <http://trac.webkit.org/changeset/154565>