[TTS] Fix crash with Ranker holding WebContents.
The native ContextualSearchRankerLoggerImpl was holding on to a WebContents pointer, which is somewhat dangerous. We're seeing crashes due to the WebContents going stale. This change just uses the WebContents to get the UKM SourceId and hangs on to it instead. The SourceId is all that's needed when we write the log. Now we also invalidate the SourceId when the log is written to ensure that we don't try to write more than once per SetupLoggingAndRanker call. BUG=795936 Change-Id: I4d1363ae709263bc76fc54f4c6316963c12f5018 Reviewed-on: https://chromium-review.googlesource.com/836127Reviewed-by:Theresa <twellington@chromium.org> Reviewed-by:
Roger McFarlane <rogerm@chromium.org> Commit-Queue: Donn Denman <donnd@chromium.org> Cr-Commit-Position: refs/heads/master@{#525339}
Showing
Please register or sign in to comment