New issue
Advanced search Search tips

Issue 713169 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: May 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: iOS
Pri: 3
Type: Bug



Sign in to add a comment

Associated objects are deallocated later in ARC

Project Member Reported by gambard@chromium.org, Apr 19 2017

Issue description

The LabelObserver is observing a label. The observed label retain the observer as an associated object.
Pre-ARC the associated object is deallocated before the object retaining it (here, the label). This does not hold true with ARC.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Apr 21 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3a05731eee64a75591868d5dfb4baf4bf42bd3a1

commit 3a05731eee64a75591868d5dfb4baf4bf42bd3a1
Author: gambard <gambard@chromium.org>
Date: Fri Apr 21 07:35:51 2017

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}

[modify] https://crrev.com/3a05731eee64a75591868d5dfb4baf4bf42bd3a1/ios/chrome/browser/ui/first_run/welcome_to_chrome_view.mm
[modify] https://crrev.com/3a05731eee64a75591868d5dfb4baf4bf42bd3a1/ios/chrome/browser/ui/util/CRUILabel+AttributeUtils.h
[modify] https://crrev.com/3a05731eee64a75591868d5dfb4baf4bf42bd3a1/ios/chrome/browser/ui/util/CRUILabel+AttributeUtils.mm
[modify] https://crrev.com/3a05731eee64a75591868d5dfb4baf4bf42bd3a1/ios/chrome/browser/ui/util/CRUILabel+AttributeUtils_unittest.mm
[modify] https://crrev.com/3a05731eee64a75591868d5dfb4baf4bf42bd3a1/ios/chrome/browser/ui/util/label_link_controller.h
[modify] https://crrev.com/3a05731eee64a75591868d5dfb4baf4bf42bd3a1/ios/chrome/browser/ui/util/label_link_controller.mm
[modify] https://crrev.com/3a05731eee64a75591868d5dfb4baf4bf42bd3a1/ios/chrome/browser/ui/util/label_observer.h
[modify] https://crrev.com/3a05731eee64a75591868d5dfb4baf4bf42bd3a1/ios/chrome/browser/ui/util/label_observer.mm
[modify] https://crrev.com/3a05731eee64a75591868d5dfb4baf4bf42bd3a1/ios/chrome/browser/ui/util/label_observer_unittest.mm

Status: Fixed (was: Assigned)

Sign in to add a comment