• Jayson Adams's avatar
    [Mac] Fix NSColorPanel crasher on macOS 10.13. · 6bc9a079
    Jayson Adams authored
    The ColorPanelCocoa sets itself as the target and delegate of the
    NSColorPanel, and on dealloc it clears the NSColorPanel's target and
    delegate settings if it sees that it is the delegate. On 10.13 it
    appears that the NSColorPanel's delegate can get set to nil while
    leaving the target intact, preventing -dealloc from clearing the
    ColorPanelCocoa target and leading to a Zombie crash.
    
    This cl uses a private method to check the NSColorPanel's target in
    -dealloc and clear it if it's still the ColorPanelCocoa.
    
    R=rsesek@chromium.org,avi@chromium.org
    
    Bug: 767598
    Change-Id: I86557f3dadc65b8e0d455156457d960d8f45044e
    Reviewed-on: https://chromium-review.googlesource.com/685394
    Commit-Queue: Jayson Adams <shrike@chromium.org>
    Reviewed-by: default avatarAvi Drissman <avi@chromium.org>
    Reviewed-by: default avatarRobert Sesek <rsesek@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#517645}
    6bc9a079
BUILD.gn 162 KB