Incorrect memory management for TabModel's WebStateListFastEnumerationHelper |
||
Issue descriptionThere have been several crashes that are occurring due to a DCHECK in the WebStateList observer list |-dealloc|, where the observer list expects to be emptied before deallocation. These failures haven't been tree closers because the issues are fixed when the tests are run individually. Here's a sample failure: https://uberchromegw.corp.google.com/i/internal.bling.main/builders/iphone10-simulator/builds/5042/steps/ios_chrome_integration_egtests%20%28iPhone%205%20iOS%2010.0%29%20on%20Mac I spent some time today digging into this and discovered that the WebStateListFastEnumerationHelper's WebStateListObserverBridge is being added as an observer from TabModel's initializer, and this is sometimes not removed. It is likely that the enumeration helper is being autoreleased, so we may be able to resolve this by wrapping some portion of the test in an autorelease pool.
,
Apr 19 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/4a0a4e85d2a8d23a9aeb528bec0dac702b43c5f6 commit 4a0a4e85d2a8d23a9aeb528bec0dac702b43c5f6 Author: sdefresne <sdefresne@chromium.org> Date: Wed Apr 19 13:16:14 2017 [ios] Fix WebStateListFastEnumerationHelper observer unregistration. Convert WebStateListFastEnumerationHelper to use RAII to automatically unregister the WebStateListObserver from the WebStateList observer list. BUG= 712391 Review-Url: https://codereview.chromium.org/2819373004 Cr-Commit-Position: refs/heads/master@{#465572} [modify] https://crrev.com/4a0a4e85d2a8d23a9aeb528bec0dac702b43c5f6/ios/chrome/browser/tabs/tab_model.mm [modify] https://crrev.com/4a0a4e85d2a8d23a9aeb528bec0dac702b43c5f6/ios/chrome/browser/web_state_list/web_state_list_fast_enumeration_helper.h [modify] https://crrev.com/4a0a4e85d2a8d23a9aeb528bec0dac702b43c5f6/ios/chrome/browser/web_state_list/web_state_list_fast_enumeration_helper.mm [modify] https://crrev.com/4a0a4e85d2a8d23a9aeb528bec0dac702b43c5f6/ios/chrome/browser/web_state_list/web_state_list_fast_enumeration_helper_unittest.mm
,
Apr 19 2017
|
||
►
Sign in to add a comment |
||
Comment 1 by sdefresne@chromium.org
, Apr 18 2017