Bug 139348

Summary: Introduce and deploy a function that allocates and returns an instance of a soft-linked class
Product: WebKit Reporter: mitz
Component: PlatformAssignee: mitz
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Add and deploy alloc##className##Instance
none
Add and deploy alloc##className##Instance andersca: review+

Description mitz 2014-12-06 15:22:55 PST
In [[getFooClass() alloc] init*], the type of the result of +alloc is id, so the compiler picks an arbitrary declaration of init*, not necessarily the Foo one. This can then lead to warnings or errors if the types or attributes don’t match, or to runtime errors if Foo doesn’t even have the expected initializer.
Comment 1 mitz 2014-12-06 15:27:20 PST
Created attachment 242727 [details]
Add and deploy alloc##className##Instance
Comment 2 WebKit Commit Bot 2014-12-06 15:29:28 PST
Attachment 242727 [details] did not pass style-queue:


ERROR: Source/WebCore/platform/mac/SoftLinking.h:168:  Extra space before [  [whitespace/braces] [5]
ERROR: Source/WebCore/platform/mac/SoftLinking.h:194:  Extra space before [  [whitespace/braces] [5]
Total errors found: 2 in 33 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 mitz 2014-12-07 08:34:59 PST
Created attachment 242746 [details]
Add and deploy alloc##className##Instance
Comment 4 WebKit Commit Bot 2014-12-07 08:36:59 PST
Attachment 242746 [details] did not pass style-queue:


ERROR: Source/WebCore/platform/mac/SoftLinking.h:168:  Extra space before [  [whitespace/braces] [5]
ERROR: Source/WebCore/platform/mac/SoftLinking.h:194:  Extra space before [  [whitespace/braces] [5]
Total errors found: 2 in 34 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 mitz 2014-12-07 09:27:41 PST
Committed <http://trac.webkit.org/r176924>.