Chromium Code Reviews| Index: ios/web_view/internal/cwv_scroll_view.mm |
| diff --git a/ios/web_view/internal/cwv_scroll_view.mm b/ios/web_view/internal/cwv_scroll_view.mm |
| index ece683b339239a46d62b9baee10638a9cfe66b43..8774603d81f8bbf76a2acefbf2ebdb5f2240b277 100644 |
| --- a/ios/web_view/internal/cwv_scroll_view.mm |
| +++ b/ios/web_view/internal/cwv_scroll_view.mm |
| @@ -66,6 +66,14 @@ |
| _proxy.contentInset = contentInset; |
| } |
| +#pragma mark - NSObject |
| + |
| +- (void)dealloc { |
| + // Explicitly set |proxy| to nil to remove |self| from |proxy|'s observers. |
| + // Otherwise |proxy| will keep a dangling pointer to |self| and cause SEGV. |
| + self.proxy = nil; |
|
Eugene But (OOO till 7-30)
2017/04/28 07:06:23
_proxy = nil;
https://google.github.io/styleguide
Hiroshi Ichikawa
2017/04/28 08:47:41
The goal here is to call [_proxy removeObserver:se
Eugene But (OOO till 7-30)
2017/04/28 10:08:57
Thanks!
|
| +} |
| + |
| #pragma mark - CRWWebViewScrollViewObserver |
| - (void)webViewScrollViewWillBeginDragging: |