RESOLVED FIXED 171485
[Cocoa] Replace uses of [get…() alloc] with alloc…Instance()
https://bugs.webkit.org/show_bug.cgi?id=171485
Summary [Cocoa] Replace uses of [get…() alloc] with alloc…Instance()
mitz
Reported 2017-04-30 13:14:15 PDT
[get…() alloc] returns an id, which can lead to ambiguity, whereas alloc…Instance() returns the instance type.
Attachments
Use the safer idiom (16.43 KB, patch)
2017-04-30 13:15 PDT, mitz
no flags
mitz
Comment 1 2017-04-30 13:15:51 PDT
Created attachment 308699 [details] Use the safer idiom
Build Bot
Comment 2 2017-04-30 13:18:32 PDT
Attachment 308699 [details] did not pass style-queue: ERROR: Source/WebCore/platform/network/ios/PreviewConverter.mm:51: Missing spaces around : [whitespace/init] [4] ERROR: Source/WebCore/platform/network/ios/PreviewConverter.mm:56: Missing spaces around : [whitespace/init] [4] Total errors found: 2 in 13 files If any of these errors are false positives, please file a bug against check-webkit-style.
Geoffrey Garen
Comment 3 2017-04-30 13:26:02 PDT
Comment on attachment 308699 [details] Use the safer idiom View in context: https://bugs.webkit.org/attachment.cgi?id=308699&action=review r=me > Source/WebCore/ChangeLog:3 > + [Cocoa] Replaces uses of [getâ¦() alloc] with allocâ¦Instance() I think you meant "get...Class()".
mitz
Comment 4 2017-04-30 13:31:13 PDT
(In reply to Geoffrey Garen from comment #3) > Comment on attachment 308699 [details] > Use the safer idiom > > View in context: > https://bugs.webkit.org/attachment.cgi?id=308699&action=review > > r=me Thanks! > > > Source/WebCore/ChangeLog:3 > > + [Cocoa] Replaces uses of [getâ¦() alloc] with allocâ¦Instance() > > I think you meant "get...Class()". I think you meant to comment in bug 75394 :)
WebKit Commit Bot
Comment 5 2017-04-30 13:47:25 PDT
Comment on attachment 308699 [details] Use the safer idiom Clearing flags on attachment: 308699 Committed r215992: <http://trac.webkit.org/changeset/215992>
WebKit Commit Bot
Comment 6 2017-04-30 13:47:26 PDT
All reviewed patches have been landed. Closing bug.
mitz
Comment 7 2017-04-30 13:53:29 PDT
(In reply to WebKit Commit Bot from comment #5) > Comment on attachment 308699 [details] > Use the safer idiom > > Clearing flags on attachment: 308699 > > Committed r215992: <http://trac.webkit.org/changeset/215992> Tried to fix the iOS build in <https://trac.webkit.org/r215993>.
mitz
Comment 8 2017-04-30 14:05:17 PDT
(In reply to mitz from comment #7) > (In reply to WebKit Commit Bot from comment #5) > > Comment on attachment 308699 [details] > > Use the safer idiom > > > > Clearing flags on attachment: 308699 > > > > Committed r215992: <http://trac.webkit.org/changeset/215992> > > Tried to fix the iOS build in <https://trac.webkit.org/r215993>. And again in <https://trac.webkit.org/r215995>.
Geoffrey Garen
Comment 9 2017-04-30 15:33:16 PDT
> > > Source/WebCore/ChangeLog:3 > > > + [Cocoa] Replaces uses of [getâ¦() alloc] with allocâ¦Instance() > > > > I think you meant "get...Class()". > > I think you meant to comment in bug 75394 :) Heh, I was trying to call attention to the missing word "Class" rather than the rendering of "...".
mitz
Comment 10 2017-04-30 15:40:51 PDT
(In reply to Geoffrey Garen from comment #9) > > > > Source/WebCore/ChangeLog:3 > > > > + [Cocoa] Replaces uses of [getâ¦() alloc] with allocâ¦Instance() > > > > > > I think you meant "get...Class()". > > > > I think you meant to comment in bug 75394 :) > > Heh, I was trying to call attention to the missing word "Class" rather than > the rendering of "...". 😮
Note You need to log in before you can comment on or make changes to this bug.