Summary: | Review usage of adoptNS() | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Chris Dumez <cdumez> | ||||
Component: | WebCore Misc. | Assignee: | Chris Dumez <cdumez> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | achristensen, ddkilzer, eric.carlson, ews-watchlist, ggaren, glenn, jer.noble, philipj, sergio, simon.fraser, webkit-bug-importer | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | WebKit Nightly Build | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
Chris Dumez
2021-02-11 14:06:44 PST
Created attachment 420042 [details]
Patch
Comment on attachment 420042 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=420042&action=review > Source/WebCore/platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:510 > [webAnimationDelegate setOwner:this]; If you use [m_delegate setOwner:this] instead, this can only be two lines. Comment on attachment 420042 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=420042&action=review >> Source/WebCore/platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:510 >> [webAnimationDelegate setOwner:this]; > > If you use [m_delegate setOwner:this] instead, this can only be two lines. The issue is that the type of m_delegate is NSObject, not WebAnimationDelegate. Maybe that still works in ObjC? (In reply to Chris Dumez from comment #3) > Comment on attachment 420042 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=420042&action=review > > >> Source/WebCore/platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:510 > >> [webAnimationDelegate setOwner:this]; > > > > If you use [m_delegate setOwner:this] instead, this can only be two lines. > > The issue is that the type of m_delegate is NSObject, not > WebAnimationDelegate. Maybe that still works in ObjC? As I thought, this does not work: ./platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:510:21: error: 'NSObject' may not respond to 'setOwner:' [-Werror] Committed r272760: <https://commits.webkit.org/r272760> All reviewed patches have been landed. Closing bug and clearing flags on attachment 420042 [details]. |