RESOLVED FIXED 139348
Introduce and deploy a function that allocates and returns an instance of a soft-linked class
https://bugs.webkit.org/show_bug.cgi?id=139348
Summary Introduce and deploy a function that allocates and returns an instance of a s...
mitz
Reported 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.
Attachments
Add and deploy alloc##className##Instance (44.50 KB, patch)
2014-12-06 15:27 PST, mitz
no flags
Add and deploy alloc##className##Instance (45.50 KB, patch)
2014-12-07 08:34 PST, mitz
andersca: review+
mitz
Comment 1 2014-12-06 15:27:20 PST
Created attachment 242727 [details] Add and deploy alloc##className##Instance
WebKit Commit Bot
Comment 2 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.
mitz
Comment 3 2014-12-07 08:34:59 PST
Created attachment 242746 [details] Add and deploy alloc##className##Instance
WebKit Commit Bot
Comment 4 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.
mitz
Comment 5 2014-12-07 09:27:41 PST
Note You need to log in before you can comment on or make changes to this bug.