Leak of TaskStateChangedCallbackType due to missing -dealloc. Found by clang static analyzer: 'WKProcessTaskStateObserverDelegate' lacks a 'dealloc' instance method but must release '_taskStateChangedCallback' Regressed with the fix for Bug 196659 in r244091: Bug 196659: [Cocoa] Awaken UIProcess if WebContent process is awakened from suspensions unexpectedly. <https://bugs.webkit.org/show_bug.cgi?id=196659> <rdar://problem/49745738> <https://trac.webkit.org/r244091>
<rdar://problem/61992856>
Created attachment 396887 [details] Patch v1
Comment on attachment 396887 [details] Patch v1 View in context: https://bugs.webkit.org/attachment.cgi?id=396887&action=review > Source/WebKit/Shared/Cocoa/ProcessTaskStateObserver.mm:46 > +- (void)dealloc I chose to implement dealloc because using RetainPtr<> would require an instance variable and a custom getter (and maybe a setter). When switching to ARC, we simply delete the -dealloc method and the @property will work as expected.
Comment on attachment 396887 [details] Patch v1 View in context: https://bugs.webkit.org/attachment.cgi?id=396887&action=review > Source/WebKit/Shared/Cocoa/ProcessTaskStateObserver.mm:49 > + _taskStateChangedCallback = nil; Seems unnecessary to set things to nil in dealloc.
Created attachment 396935 [details] Patch for landing
Committed r260348: <https://trac.webkit.org/changeset/260348> All reviewed patches have been landed. Closing bug and clearing flags on attachment 396935 [details].