Bug 56381

Summary: Objective-C classes should be typedef-ed as structs (not void*) in C++
Product: WebKit Reporter: David Kilzer (:ddkilzer) <ddkilzer>
Component: WebGLAssignee: 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:
Description Flags
Patch simon.fraser: review+

David Kilzer (:ddkilzer)
Reported 2011-03-15 09:27:52 PDT
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(-)
Attachments
Patch (3.76 KB, patch)
2011-03-15 09:27 PDT, David Kilzer (:ddkilzer)
simon.fraser: review+
David Kilzer (:ddkilzer)
Comment 1 2011-03-15 11:24:49 PDT
David Kilzer (:ddkilzer)
Comment 2 2011-03-15 14:35:30 PDT
(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.
David Kilzer (:ddkilzer)
Comment 3 2011-03-15 14:38:13 PDT
(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>
David Kilzer (:ddkilzer)
Comment 4 2011-03-16 08:01:59 PDT
(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>
Note You need to log in before you can comment on or make changes to this bug.