| Summary: | Fix Overrelease in makeFailureSetForAllTextManipulationItems | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Richard Houle <rhoule> | ||||||
| Component: | WebKit2 | Assignee: | Nobody <webkit-unassigned> | ||||||
| Status: | RESOLVED FIXED | ||||||||
| Severity: | Critical | CC: | darin, rniwa, webkit-bug-importer, wenson_hsieh | ||||||
| Priority: | P2 | Keywords: | InRadar | ||||||
| Version: | WebKit Nightly Build | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Attachments: |
|
||||||||
Created attachment 401838 [details]
Proposed fix V1
Comment on attachment 401838 [details]
Proposed fix V1
Good catch!
Comment on attachment 401838 [details] Proposed fix V1 View in context: https://bugs.webkit.org/attachment.cgi?id=401838&action=review > Source/WebKit/ChangeLog:3 > + https://bugs.webkit.org/show_bug.cgi?id=213165 The fix looks good to me, but please add the bug title here as well. Created attachment 401846 [details]
Proposed Fix V2
Committed r263004: <https://trac.webkit.org/changeset/263004> All reviewed patches have been landed. Closing bug and clearing flags on attachment 401846 [details]. Someone should grep "adopt.+autorelease" across the whole source tree to see if we made the identical mistake in the exact same way elsewhere. I’d do myself if I had source checked out on a readily accessible computer, but that might not happen for a few days. I did grep the entire tree. This was the only problematic entry. (In reply to Richard Houle from comment #8) > I did grep the entire tree. Great. Thanks! |
The following line of code in Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm: RetainPtr<NSMutableArray> wkFailures = adoptNS([[[NSMutableArray alloc] initWithCapacity:items.count] autorelease]); causes an overrelease when the autorelease pool is drained.