Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Issue 2846233002: [ios] ARCMigrate ios/chrome/browser/tabs/tab.mm to ARC. (Closed)

Created:
3 years, 7 months ago by sdefresne
Modified:
3 years, 7 months ago
CC:
chromium-reviews, marq+watch_chromium.org, ios-reviews+chrome_chromium.org, noyau+watch_chromium.org, ios-reviews_chromium.org, pkl (ping after 24h if needed)
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

[ios] ARCMigrate ios/chrome/browser/tabs/tab.mm to ARC. Semi-automatic conversion of ios/chrome/browser/tabs/tab.mm to ARC (Automatic Reference Counting). Manual changes: - audit raw Objective-C pointers and mark them as __weak if needed (were all correctly annotated with weak comments); - convert base::scoped_nsobject<> & base::WeakNSObject<> to annotations for the compiler (e.g. __weak); - remove setter/getter for properties that can be synthesized; - remove [[... retain] autorelease] as the CRWWebController has been converted to ARC already and thus the object will be autorelease and the hack is no longer required. BUG=None Review-Url: https://codereview.chromium.org/2846233002 Cr-Commit-Position: refs/heads/master@{#468660} Committed: https://chromium.googlesource.com/chromium/src/+/376186504c93feac078435f1620005d15609974f

Patch Set 1 #

Total comments: 10

Patch Set 2 : Rebase. #

Patch Set 3 : Address comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+196 lines, -238 lines) Patch
M ios/chrome/browser/tabs/BUILD.gn View 3 chunks +51 lines, -4 lines 0 comments Download
M ios/chrome/browser/tabs/tab.h View 2 chunks +9 lines, -9 lines 0 comments Download
M ios/chrome/browser/tabs/tab.mm View 1 2 48 chunks +136 lines, -225 lines 0 comments Download

Messages

Total messages: 25 (13 generated)
sdefresne
stkhapugin: please take a look. rohitrao: FYI
3 years, 7 months ago (2017-04-28 13:34:20 UTC) #4
rohitrao (ping after 24h)
Will take a look on Monday morning.
3 years, 7 months ago (2017-04-28 13:43:57 UTC) #5
sdefresne
rohitrao: ping
3 years, 7 months ago (2017-05-02 07:50:41 UTC) #8
rohitrao (ping after 24h)
https://codereview.chromium.org/2846233002/diff/1/ios/chrome/browser/tabs/BUILD.gn File ios/chrome/browser/tabs/BUILD.gn (right): https://codereview.chromium.org/2846233002/diff/1/ios/chrome/browser/tabs/BUILD.gn#newcode40 ios/chrome/browser/tabs/BUILD.gn:40: deps = [ Can any of these deps be ...
3 years, 7 months ago (2017-05-02 11:42:54 UTC) #10
stkhapugin
LGTM with Rohit's comments. Special thanks for MakeUnique. Optional follow-up - rename trailing_underscore_ to _leading_underscore ...
3 years, 7 months ago (2017-05-02 12:09:12 UTC) #11
sdefresne
rohitrao: PTAL https://codereview.chromium.org/2846233002/diff/1/ios/chrome/browser/tabs/BUILD.gn File ios/chrome/browser/tabs/BUILD.gn (right): https://codereview.chromium.org/2846233002/diff/1/ios/chrome/browser/tabs/BUILD.gn#newcode40 ios/chrome/browser/tabs/BUILD.gn:40: deps = [ On 2017/05/02 11:42:53, rohitrao ...
3 years, 7 months ago (2017-05-02 15:08:51 UTC) #14
rohitrao (ping after 24h)
lgtm
3 years, 7 months ago (2017-05-02 15:10:25 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2846233002/40001
3 years, 7 months ago (2017-05-02 15:53:38 UTC) #19
commit-bot: I haz the power
Committed patchset #3 (id:40001) as https://chromium.googlesource.com/chromium/src/+/376186504c93feac078435f1620005d15609974f
3 years, 7 months ago (2017-05-02 16:11:21 UTC) #22
michaeldo
A revert of this CL (patchset #3 id:40001) has been created in https://codereview.chromium.org/2859663002/ by michaeldo@chromium.org. ...
3 years, 7 months ago (2017-05-02 21:22:49 UTC) #23
sdefresne
On 2017/05/02 21:22:49, michaeldo wrote: > A revert of this CL (patchset #3 id:40001) has ...
3 years, 7 months ago (2017-05-03 08:25:51 UTC) #24
sdefresne
3 years, 7 months ago (2017-05-03 08:45:17 UTC) #25
Message was sent while issue was closed.
On 2017/05/03 08:25:51, sdefresne wrote:
> On 2017/05/02 21:22:49, michaeldo wrote:
> > A revert of this CL (patchset #3 id:40001) has been created in
> > https://codereview.chromium.org/2859663002/ by
mailto:michaeldo@chromium.org.
> > 
> > The reason for reverting is: causes failure of ios_chrome_ui_egtests on ipad
> air
> > 2 ios 10.
> > 
> > Ref:
> > https://build.chromium.org/p/chromium.fyi/builders/EarlGreyiOS/builds/27116.
> 
> It looks like the crash happens because StaticHtmlViewController is using KVO
to
> observe the WebView and unregister itself in its -dealloc method. Since some
> objects are now autoreleased instead of being released, the -dealloc is
invoked
> later, and by this time, CRWWebController's NavigationManager pointer is null,
> thus crash.

Could be due to https://bugs.chromium.org/p/chromium/issues/detail?id=503297
(which the migration to ARC exacerbates).

Powered by Google App Engine
This is Rietveld 408576698