Bug 171493 - [Cocoa] Replace uses of [get…Class() alloc] in TestWebKitAPI
Summary: [Cocoa] Replace uses of [get…Class() alloc] in TestWebKitAPI
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: David Kilzer (:ddkilzer)
URL:
Keywords:
Depends on: 171486
Blocks:
  Show dependency treegraph
 
Reported: 2017-05-01 06:26 PDT by David Kilzer (:ddkilzer)
Modified: 2017-05-01 16:00 PDT (History)
3 users (show)

See Also:


Attachments
Patch v1 (2.89 KB, patch)
2017-05-01 06:30 PDT, David Kilzer (:ddkilzer)
no flags Details | Formatted Diff | Diff
Patch v2 (2.87 KB, patch)
2017-05-01 13:35 PDT, David Kilzer (:ddkilzer)
no flags Details | Formatted Diff | Diff
Patch v3 (4.12 KB, patch)
2017-05-01 14:25 PDT, David Kilzer (:ddkilzer)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Kilzer (:ddkilzer) 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
Comment 1 David Kilzer (:ddkilzer) 2017-05-01 06:30:24 PDT
Created attachment 308717 [details]
Patch v1
Comment 2 David Kilzer (:ddkilzer) 2017-05-01 07:20:15 PDT
Comment on attachment 308717 [details]
Patch v1

Patch doesn't build on iOS.
Comment 3 David Kilzer (:ddkilzer) 2017-05-01 13:35:51 PDT
Created attachment 308760 [details]
Patch v2
Comment 4 David Kilzer (:ddkilzer) 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.
Comment 5 mitz 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.
Comment 6 David Kilzer (:ddkilzer) 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.
Comment 7 David Kilzer (:ddkilzer) 2017-05-01 14:25:16 PDT
Created attachment 308767 [details]
Patch v3
Comment 8 WebKit Commit Bot 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>
Comment 9 WebKit Commit Bot 2017-05-01 16:00:43 PDT
All reviewed patches have been landed.  Closing bug.