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

Issue 2828743002: LabelObserver is no longer retained by the label (Closed)

Created:
3 years, 8 months ago by gambard
Modified:
3 years, 8 months ago
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

LabelObserver is no longer retained by the label Having the LabelObserver being retained by the label as associated object creates a crash when compiling with ARC. This CL prepares the LabelObserver to be converted to ARC by changing the associated link from strong to link. The LabelObserver now needs to be retained by an external object, and the observing needs to be started/stopped. BUG=713169 Review-Url: https://codereview.chromium.org/2828743002 Cr-Commit-Position: refs/heads/master@{#466283} Committed: https://chromium.googlesource.com/chromium/src/+/3a05731eee64a75591868d5dfb4baf4bf42bd3a1

Patch Set 1 #

Patch Set 2 : Update comment #

Total comments: 13

Patch Set 3 : Address comments #

Total comments: 3

Patch Set 4 : Address comment #

Patch Set 5 : Fix tests #

Patch Set 6 : Cleanup #

Total comments: 2

Patch Set 7 : Address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+130 lines, -50 lines) Patch
M ios/chrome/browser/ui/first_run/welcome_to_chrome_view.mm View 1 2 3 4 5 6 6 chunks +20 lines, -0 lines 0 comments Download
M ios/chrome/browser/ui/util/CRUILabel+AttributeUtils.h View 1 2 3 4 5 1 chunk +3 lines, -3 lines 0 comments Download
M ios/chrome/browser/ui/util/CRUILabel+AttributeUtils.mm View 1 2 3 4 5 1 chunk +0 lines, -17 lines 0 comments Download
M ios/chrome/browser/ui/util/CRUILabel+AttributeUtils_unittest.mm View 1 2 3 4 3 chunks +29 lines, -4 lines 0 comments Download
M ios/chrome/browser/ui/util/label_link_controller.h View 1 1 chunk +2 lines, -2 lines 0 comments Download
M ios/chrome/browser/ui/util/label_link_controller.mm View 7 chunks +9 lines, -6 lines 0 comments Download
M ios/chrome/browser/ui/util/label_observer.h View 1 chunk +10 lines, -2 lines 0 comments Download
M ios/chrome/browser/ui/util/label_observer.mm View 1 2 3 4 5 6 5 chunks +51 lines, -15 lines 0 comments Download
M ios/chrome/browser/ui/util/label_observer_unittest.mm View 1 2 3 4 1 chunk +6 lines, -1 line 0 comments Download

Messages

Total messages: 25 (14 generated)
gambard
PTAL.
3 years, 8 months ago (2017-04-19 14:27:30 UTC) #2
marq (ping after 24h)
https://codereview.chromium.org/2828743002/diff/20001/ios/chrome/browser/ui/first_run/welcome_to_chrome_view.mm File ios/chrome/browser/ui/first_run/welcome_to_chrome_view.mm (right): https://codereview.chromium.org/2828743002/diff/20001/ios/chrome/browser/ui/first_run/welcome_to_chrome_view.mm#newcode239 ios/chrome/browser/ui/first_run/welcome_to_chrome_view.mm:239: [self.TOSObserver startObserving]; What do these observers do? This CL ...
3 years, 8 months ago (2017-04-19 15:25:20 UTC) #3
gambard
Thanks, PTAL. https://codereview.chromium.org/2828743002/diff/20001/ios/chrome/browser/ui/first_run/welcome_to_chrome_view.mm File ios/chrome/browser/ui/first_run/welcome_to_chrome_view.mm (right): https://codereview.chromium.org/2828743002/diff/20001/ios/chrome/browser/ui/first_run/welcome_to_chrome_view.mm#newcode239 ios/chrome/browser/ui/first_run/welcome_to_chrome_view.mm:239: [self.TOSObserver startObserving]; On 2017/04/19 15:25:19, marq wrote: ...
3 years, 8 months ago (2017-04-19 15:48:18 UTC) #4
stkhapugin
Thank you very much for jumping in to do this, especially given that it's just ...
3 years, 8 months ago (2017-04-19 16:39:40 UTC) #5
pkl (ping after 24h if needed)
https://codereview.chromium.org/2828743002/diff/40001/ios/chrome/browser/ui/util/label_observer.mm File ios/chrome/browser/ui/util/label_observer.mm (right): https://codereview.chromium.org/2828743002/diff/40001/ios/chrome/browser/ui/util/label_observer.mm#newcode115 ios/chrome/browser/ui/util/label_observer.mm:115: if (self.observingCount++ == 0) { On 2017/04/19 16:39:40, stkhapugin ...
3 years, 8 months ago (2017-04-19 16:48:03 UTC) #7
gambard
Thanks, PTAL. https://codereview.chromium.org/2828743002/diff/40001/ios/chrome/browser/ui/util/label_observer.mm File ios/chrome/browser/ui/util/label_observer.mm (right): https://codereview.chromium.org/2828743002/diff/40001/ios/chrome/browser/ui/util/label_observer.mm#newcode115 ios/chrome/browser/ui/util/label_observer.mm:115: if (self.observingCount++ == 0) { On 2017/04/19 ...
3 years, 8 months ago (2017-04-20 08:30:19 UTC) #8
marq (ping after 24h)
LGTM, but please add comments to the welcome view to clarify why the observers are ...
3 years, 8 months ago (2017-04-20 11:52:01 UTC) #11
stkhapugin
lgtm with comment https://codereview.chromium.org/2828743002/diff/100001/ios/chrome/browser/ui/util/label_observer.mm File ios/chrome/browser/ui/util/label_observer.mm (right): https://codereview.chromium.org/2828743002/diff/100001/ios/chrome/browser/ui/util/label_observer.mm#newcode130 ios/chrome/browser/ui/util/label_observer.mm:130: if (self.observingCount-- == 1) { Please ...
3 years, 8 months ago (2017-04-20 15:51:34 UTC) #12
gambard
Thanks! https://codereview.chromium.org/2828743002/diff/20001/ios/chrome/browser/ui/util/label_observer.mm File ios/chrome/browser/ui/util/label_observer.mm (right): https://codereview.chromium.org/2828743002/diff/20001/ios/chrome/browser/ui/util/label_observer.mm#newcode43 ios/chrome/browser/ui/util/label_observer.mm:43: @property(nonatomic, assign) NSInteger observingCount; On 2017/04/20 11:52:00, marq ...
3 years, 8 months ago (2017-04-21 07:20:40 UTC) #13
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/2828743002/120001
3 years, 8 months ago (2017-04-21 07:32:07 UTC) #22
commit-bot: I haz the power
3 years, 8 months ago (2017-04-21 07:36:03 UTC) #25
Message was sent while issue was closed.
Committed patchset #7 (id:120001) as
https://chromium.googlesource.com/chromium/src/+/3a05731eee64a75591868d5dfb4b...

Powered by Google App Engine
This is Rietveld 408576698