|
|
Created:
3 years, 8 months ago by gambard Modified:
3 years, 8 months ago Reviewers:
jif CC:
chromium-reviews, ios-reviews+chrome_chromium.org, ios-reviews_chromium.org, pkl (ping after 24h if needed), noyau+watch_chromium.org, marq+watch_chromium.org, sdefresne+watch_chromium.org Target Ref:
refs/heads/master Project:
chromium Visibility:
Public. |
Description[ObjC ARC] Converts ios/chrome/browser/ui/infobars:infobars to ARC.
Automatically generated ARCMigrate commit
Notable issues:None
BUG=624363
TEST=None
Review-Url: https://codereview.chromium.org/2831213005
Cr-Commit-Position: refs/heads/master@{#466353}
Committed: https://chromium.googlesource.com/chromium/src/+/bedb9d4efb97106bed60b6db89b675928d1d6850
Patch Set 1 #Patch Set 2 : Fix weaks #
Total comments: 11
Patch Set 3 : Remove weak #
Depends on Patchset: Messages
Total messages: 21 (12 generated)
The CQ bit was checked by gambard@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/bui...)
The CQ bit was checked by gambard@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
gambard@chromium.org changed reviewers: + jif@chromium.org
PTAL.
https://codereview.chromium.org/2831213005/diff/20001/ios/chrome/browser/ui/i... File ios/chrome/browser/ui/infobars/infobar_view.mm (right): https://codereview.chromium.org/2831213005/diff/20001/ios/chrome/browser/ui/i... ios/chrome/browser/ui/infobars/infobar_view.mm:227: InfoBarViewDelegate* delegate_; // weak. __weak https://codereview.chromium.org/2831213005/diff/20001/ios/chrome/browser/ui/i... ios/chrome/browser/ui/infobars/infobar_view.mm:245: __weak UILabel* label_; Do you know why this is __weak? https://codereview.chromium.org/2831213005/diff/20001/ios/chrome/browser/ui/i... ios/chrome/browser/ui/infobars/infobar_view.mm:776: UILabel* label = [[UILabel alloc] initWithFrame:CGRectZero]; Why are we using an intermediary "label" variable?
https://codereview.chromium.org/2831213005/diff/20001/ios/chrome/browser/ui/i... File ios/chrome/browser/ui/infobars/infobar_view.mm (right): https://codereview.chromium.org/2831213005/diff/20001/ios/chrome/browser/ui/i... ios/chrome/browser/ui/infobars/infobar_view.mm:227: InfoBarViewDelegate* delegate_; // weak. On 2017/04/21 11:21:14, jif wrote: > __weak It is a C++ object. Or do you want me to update the comment from weak to __weak? https://codereview.chromium.org/2831213005/diff/20001/ios/chrome/browser/ui/i... ios/chrome/browser/ui/infobars/infobar_view.mm:245: __weak UILabel* label_; On 2017/04/21 11:21:13, jif wrote: > Do you know why this is __weak? No and I am not sure it makes sense :) I was hoping you would have some hindsight. https://codereview.chromium.org/2831213005/diff/20001/ios/chrome/browser/ui/i... ios/chrome/browser/ui/infobars/infobar_view.mm:776: UILabel* label = [[UILabel alloc] initWithFrame:CGRectZero]; On 2017/04/21 11:21:14, jif wrote: > Why are we using an intermediary "label" variable? Because with ARC the weak variable does not retain autorelease the objects, so the compiler is emitting a warning here.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
https://codereview.chromium.org/2831213005/diff/20001/ios/chrome/browser/ui/i... File ios/chrome/browser/ui/infobars/infobar_view.mm (right): https://codereview.chromium.org/2831213005/diff/20001/ios/chrome/browser/ui/i... ios/chrome/browser/ui/infobars/infobar_view.mm:245: __weak UILabel* label_; On 2017/04/21 11:38:18, gambard wrote: > On 2017/04/21 11:21:13, jif wrote: > > Do you know why this is __weak? > > No and I am not sure it makes sense :) > I was hoping you would have some hindsight. Did a little digging. Reason is: https://chromereviews.googleplex.com/494657013/diff/2/chrome/browser/ui/infob... Conclusion: remove the __weak and the |label| variable at line 776. https://codereview.chromium.org/2831213005/diff/20001/ios/chrome/browser/ui/i... ios/chrome/browser/ui/infobars/infobar_view.mm:776: UILabel* label = [[UILabel alloc] initWithFrame:CGRectZero]; On 2017/04/21 11:38:18, gambard wrote: > On 2017/04/21 11:21:14, jif wrote: > > Why are we using an intermediary "label" variable? > > Because with ARC the weak variable does not retain autorelease the objects, so > the compiler is emitting a warning here. Acknowledged.
Thanks, PTAL. https://codereview.chromium.org/2831213005/diff/20001/ios/chrome/browser/ui/i... File ios/chrome/browser/ui/infobars/infobar_view.mm (right): https://codereview.chromium.org/2831213005/diff/20001/ios/chrome/browser/ui/i... ios/chrome/browser/ui/infobars/infobar_view.mm:245: __weak UILabel* label_; On 2017/04/21 12:29:20, jif wrote: > On 2017/04/21 11:38:18, gambard wrote: > > On 2017/04/21 11:21:13, jif wrote: > > > Do you know why this is __weak? > > > > No and I am not sure it makes sense :) > > I was hoping you would have some hindsight. > > Did a little digging. Reason is: > https://chromereviews.googleplex.com/494657013/diff/2/chrome/browser/ui/infob... > > Conclusion: remove the __weak and the |label| variable at line 776. Oh. It was me all along! Done!
lgtm https://codereview.chromium.org/2831213005/diff/20001/ios/chrome/browser/ui/i... File ios/chrome/browser/ui/infobars/infobar_view.mm (right): https://codereview.chromium.org/2831213005/diff/20001/ios/chrome/browser/ui/i... ios/chrome/browser/ui/infobars/infobar_view.mm:227: InfoBarViewDelegate* delegate_; // weak. On 2017/04/21 11:38:18, gambard wrote: > On 2017/04/21 11:21:14, jif wrote: > > __weak > > It is a C++ object. Or do you want me to update the comment from weak to __weak? I hadn't realized it was a C++ object!
https://codereview.chromium.org/2831213005/diff/20001/ios/chrome/browser/ui/i... File ios/chrome/browser/ui/infobars/infobar_view.mm (right): https://codereview.chromium.org/2831213005/diff/20001/ios/chrome/browser/ui/i... ios/chrome/browser/ui/infobars/infobar_view.mm:227: InfoBarViewDelegate* delegate_; // weak. On 2017/04/21 14:13:56, jif wrote: > On 2017/04/21 11:38:18, gambard wrote: > > On 2017/04/21 11:21:14, jif wrote: > > > __weak > > > > It is a C++ object. Or do you want me to update the comment from weak to > __weak? > > I hadn't realized it was a C++ object! :)
The CQ bit was checked by gambard@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 40001, "attempt_start_ts": 1492786835626800, "parent_rev": "e0bb8b3085974f05fcb8c2a8f65a8585d749264f", "commit_rev": "bedb9d4efb97106bed60b6db89b675928d1d6850"}
Message was sent while issue was closed.
Description was changed from ========== [ObjC ARC] Converts ios/chrome/browser/ui/infobars:infobars to ARC. Automatically generated ARCMigrate commit Notable issues:None BUG=624363 TEST=None ========== to ========== [ObjC ARC] Converts ios/chrome/browser/ui/infobars:infobars to ARC. Automatically generated ARCMigrate commit Notable issues:None BUG=624363 TEST=None Review-Url: https://codereview.chromium.org/2831213005 Cr-Commit-Position: refs/heads/master@{#466353} Committed: https://chromium.googlesource.com/chromium/src/+/bedb9d4efb97106bed60b6db89b6... ==========
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as https://chromium.googlesource.com/chromium/src/+/bedb9d4efb97106bed60b6db89b6... |