Bug 210711 - REGRESSION (r259610): Leak of RBSAssertionInvalidationCallbackType due to missing -dealloc
Summary: REGRESSION (r259610): Leak of RBSAssertionInvalidationCallbackType due to mis...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: David Kilzer (:ddkilzer)
URL:
Keywords: InRadar
Depends on: 210065
Blocks:
  Show dependency treegraph
 
Reported: 2020-04-18 19:42 PDT by David Kilzer (:ddkilzer)
Modified: 2020-04-20 00:11 PDT (History)
3 users (show)

See Also:


Attachments
Patch v1 (1.55 KB, patch)
2020-04-18 19:44 PDT, David Kilzer (:ddkilzer)
no flags Details | Formatted Diff | Diff
Patch for landing (2.79 KB, patch)
2020-04-19 18:58 PDT, David Kilzer (:ddkilzer)
no flags Details | Formatted Diff | Diff
Patch for landing v2 (1.51 KB, patch)
2020-04-19 19:01 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) 2020-04-18 19:42:13 PDT
Leak of RBSAssertionInvalidationCallbackType due to missing -dealloc.

Found by clang static analyzer:

'WKRBSAssertionDelegate' lacks a 'dealloc' instance method but must release '_invalidationCallback'

Regressed with the fix for Bug 210065 in r259610:

Bug 196659: [iOS] Transition most process assertions to RunningBoard
<https://bugs.webkit.org/show_bug.cgi?id=210065>
<rdar://problem/61354901>
<https://trac.webkit.org/r259610>
Comment 1 Radar WebKit Bug Importer 2020-04-18 19:43:32 PDT
<rdar://problem/61993361>
Comment 2 David Kilzer (:ddkilzer) 2020-04-18 19:44:56 PDT
Created attachment 396889 [details]
Patch v1
Comment 3 David Kilzer (:ddkilzer) 2020-04-18 19:45:26 PDT
Comment on attachment 396889 [details]
Patch v1

View in context: https://bugs.webkit.org/attachment.cgi?id=396889&action=review

> Source/WebKit/UIProcess/ios/ProcessAssertionIOS.mm:275
> +- (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 4 Geoffrey Garen 2020-04-19 17:45:30 PDT
Comment on attachment 396889 [details]
Patch v1

r=me
Comment 5 David Kilzer (:ddkilzer) 2020-04-19 18:58:11 PDT
Created attachment 396933 [details]
Patch for landing
Comment 6 David Kilzer (:ddkilzer) 2020-04-19 19:01:31 PDT
Created attachment 396934 [details]
Patch for landing v2
Comment 7 EWS 2020-04-19 20:54:31 PDT
Found 1 new test failure: fast/layoutformattingcontext/simple-absolute-positioned-replaced-inline-element-with-percentage-height.html
Comment 8 EWS 2020-04-20 00:11:33 PDT
Committed r260354: <https://trac.webkit.org/changeset/260354>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 396934 [details].