Chromium Code Reviews
DescriptionEnable ARC for //ios/web_view/internal/translate/*.m.
This CL also (hopefully) fixes occasional SEGV of ios_web_view_shell, by marking WebViewTranslateClient::delegete_ as __weak and also initializing it with nil.
I believe the SEGV happened because:
- Actually web_view_translate_client.h has been already built with ARC *enabled* because it's included by cwv_web_view.mm.
- With ARC enabled, WebViewTranslateClient::delegete_ was a strong reference.
- WebViewTranslateClient::delegete_ was not initialized, so it held an uninitialized pointer initially.
- So call to WebViewTranslateClient::set_translate_delegate() tries to free an uninitialized pointer, causing SEGV.
BUG=703564
Review-Url: https://codereview.chromium.org/2762023003
Cr-Commit-Position: refs/heads/master@{#458688}
Committed: https://chromium.googlesource.com/chromium/src/+/d78e66457cf8aa8a82f0cfc8a387eb8a71655bb7
Patch Set 1 #
Total comments: 5
Patch Set 2 : Apply review comments. #
Messages
Total messages: 17 (8 generated)
|
||||||||||||||||||||||||||||||||||||||||||||||