| Summary: | [Cocoa] Update some JavaScriptCore code to be more ready for ARC | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Darin Adler <darin> | ||||||||
| Component: | JavaScriptCore | Assignee: | Darin Adler <darin> | ||||||||
| Status: | RESOLVED FIXED | ||||||||||
| Severity: | Normal | CC: | andersca, dbates, ews-watchlist, joepeck, keith_miller, mark.lam, mitz, msaboff, saam, webkit-bug-importer | ||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||
| Version: | WebKit Nightly Build | ||||||||||
| Hardware: | Unspecified | ||||||||||
| OS: | Unspecified | ||||||||||
| Bug Depends on: | |||||||||||
| Bug Blocks: | 221107 | ||||||||||
| Attachments: |
|
||||||||||
|
Description
Darin Adler
2018-06-04 22:51:09 PDT
Created attachment 341955 [details]
Patch
Comment on attachment 341955 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=341955&action=review > Source/JavaScriptCore/API/JSAPIWrapperObject.mm:95 > - m_wrappedObject = [static_cast<id>(wrappedObject) retain]; > + m_wrappedObject = (__bridge id)wrappedObject; Won't this lead to a memory leak when compiling without ARC now? Comment on attachment 341955 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=341955&action=review >> Source/JavaScriptCore/API/JSAPIWrapperObject.mm:95 >> + m_wrappedObject = (__bridge id)wrappedObject; > > Won't this lead to a memory leak when compiling without ARC now? Yes should have omitted this change; will remove it. I’ve been doing a verification pass on these “ARC prep” patches where I search for release and retain in the patch, which I think would have caught this. Created attachment 341969 [details]
Patch
New patch omits the incorrect change Anders pointed out, and also fixes another leak elsewhere in the patch. Created attachment 341970 [details]
Patch
This quite small patch should be straightforward and correct now. Committed r232513: <https://trac.webkit.org/changeset/232513> |