[Webkit-unassigned] [Bug 81570] Properly align members in WebInputEvent and subclasses to make Valgrind happy
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Mar 19 16:29:03 PDT 2012
https://bugs.webkit.org/show_bug.cgi?id=81570
Tony Chang <tony at chromium.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #132684|review? |review-
Flag| |
--- Comment #6 from Tony Chang <tony at chromium.org> 2012-03-19 16:29:03 PST ---
(From update of attachment 132684)
View in context: https://bugs.webkit.org/attachment.cgi?id=132684&action=review
You're right, memset won't work in this case. Reordering seems unavoidable considering how content/public/common/webkit_param_traits.h handles WebInputEvent*. It might still be worth packing to 4 bytes to avoid having padding ints.
> WebKit/chromium/public/WebInputEvent.h:225
> + sizeof(WebInputEvent) == (sizeof(WebInputEvent::timeStampSeconds) +
> + sizeof(WebInputEvent::size) +
We normally just make a reference struct and make sure the real object has the same size as the reference struct. See for example the SameSizeAsCSSValue class in WebKit/Source/WebCore/css/CSSValue.cpp. For your SameSizeAs* class, you can just put doubles in them.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list