RESOLVED FIXED 171493
[Cocoa] Replace uses of [get…Class() alloc] in TestWebKitAPI
https://bugs.webkit.org/show_bug.cgi?id=171493
Summary [Cocoa] Replace uses of [get…Class() alloc] in TestWebKitAPI
David Kilzer (:ddkilzer)
Reported 2017-05-01 06:26:14 PDT
$ ./Tools/Scripts/check-webkit-style --filter=-,+runtime/soft-linked-alloc Tools/TestWebKitAPI ERROR: Tools/TestWebKitAPI/Tests/WebKit/ios/AudioSessionCategoryIOS.mm:69: Using +alloc with a soft-linked class. Use allocUIWindowInstance() instead. [runtime/soft-linked-alloc] [4] ERROR: Tools/TestWebKitAPI/Tests/WebKit/ios/AudioSessionCategoryIOS.mm:70: Using +alloc with a soft-linked class. Use allocUIWebViewInstance() instead. [runtime/soft-linked-alloc] [4] ERROR: Tools/TestWebKitAPI/Tests/WebKit2Cocoa/RequiresUserActionForPlayback.mm:76: Using +alloc with a soft-linked class. Use allocUIWindowInstance() instead. [runtime/soft-linked-alloc] [4] Total errors found: 3 in 755 files
Attachments
Patch v1 (2.89 KB, patch)
2017-05-01 06:30 PDT, David Kilzer (:ddkilzer)
no flags
Patch v2 (2.87 KB, patch)
2017-05-01 13:35 PDT, David Kilzer (:ddkilzer)
no flags
Patch v3 (4.12 KB, patch)
2017-05-01 14:25 PDT, David Kilzer (:ddkilzer)
no flags
David Kilzer (:ddkilzer)
Comment 1 2017-05-01 06:30:24 PDT
Created attachment 308717 [details] Patch v1
David Kilzer (:ddkilzer)
Comment 2 2017-05-01 07:20:15 PDT
Comment on attachment 308717 [details] Patch v1 Patch doesn't build on iOS.
David Kilzer (:ddkilzer)
Comment 3 2017-05-01 13:35:51 PDT
Created attachment 308760 [details] Patch v2
David Kilzer (:ddkilzer)
Comment 4 2017-05-01 13:37:01 PDT
(In reply to David Kilzer (:ddkilzer) from comment #2) > Comment on attachment 308717 [details] > Patch v1 > > Patch doesn't build on iOS. Because I'm dumb and didn't replace …Class() with …Instance()! Too early in the morning.
mitz
Comment 5 2017-05-01 14:04:25 PDT
Comment on attachment 308760 [details] Patch v2 Why not just use UIWindow and UIWebView directly? TestWebKitAPI links against UIKit.
David Kilzer (:ddkilzer)
Comment 6 2017-05-01 14:24:21 PDT
(In reply to mitz from comment #5) > Comment on attachment 308760 [details] > Patch v2 > > Why not just use UIWindow and UIWebView directly? TestWebKitAPI links > against UIKit. Forest vs. trees.
David Kilzer (:ddkilzer)
Comment 7 2017-05-01 14:25:16 PDT
Created attachment 308767 [details] Patch v3
WebKit Commit Bot
Comment 8 2017-05-01 16:00:42 PDT
Comment on attachment 308767 [details] Patch v3 Clearing flags on attachment: 308767 Committed r216041: <http://trac.webkit.org/changeset/216041>
WebKit Commit Bot
Comment 9 2017-05-01 16:00:43 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.