Summary: | Objective-C classes should be typedef-ed as structs (not void*) in C++ | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | David Kilzer (:ddkilzer) <ddkilzer> | ||||
Component: | WebGL | Assignee: | David Kilzer (:ddkilzer) <ddkilzer> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | andersca, cmarrin, simon.fraser, zwarich | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Other | ||||||
OS: | OS X 10.5 | ||||||
Attachments: |
|
Committed r81156: <http://trac.webkit.org/changeset/81156> (In reply to comment #1) > Committed r81156: <http://trac.webkit.org/changeset/81156> This broke building WebKit with clang. Anders is working on a fix. (In reply to comment #2) > (In reply to comment #1) > > Committed r81156: <http://trac.webkit.org/changeset/81156> > > This broke building WebKit with clang. Anders is working on a fix. Fixed in r81172. <http://trac.webkit.org/changeset/81172> (In reply to comment #3) > (In reply to comment #2) > > (In reply to comment #1) > > > Committed r81156: <http://trac.webkit.org/changeset/81156> > > > > This broke building WebKit with clang. Anders is working on a fix. > > Fixed in r81172. <http://trac.webkit.org/changeset/81172> Clean-up in r81242. <http://trac.webkit.org/changeset/81242> |
Created attachment 85816 [details] Patch Reviewed by NOBODY (OOPS!). Typedef-ing Objective-C classes as void* for pure C++ makes it easier for bugs to creep in because compilers can't do any type checking for void pointers. * platform/graphics/GraphicsContext3D.h: Changed typedef declarations for CALayer and WebGLLayer from void* to structs. (WebCore::GraphicsContext3D::platformLayer): Changed static_cast<CALayer*> to reinterpret_cast<CALayer*> now that CALayer and WebGLLayer are not void pointers. * platform/graphics/GraphicsLayer.h: Changed typedef declaration for PlatformLayer from void* to struct CALayer. * platform/graphics/ca/PlatformCAAnimation.h: Changed typedef declaration for CAPropertyAnimation from void* to a struct. Extracted typdef for PlatformAnimationRef. --- 4 files changed, 27 insertions(+), 7 deletions(-)