New issue
Advanced search Search tips

Issue 807397 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Feb 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Verify if it's safe to use base::Unretained in spellchecker code

Project Member Reported by xiaoche...@chromium.org, Jan 30 2018

Issue description

Some spellchecker code binds base::Unretained(this) into callback functions. We need to verify if this is safe.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Feb 1 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/319c21425612cd9d1f4f28dd01d845fa1dd97ffe

commit 319c21425612cd9d1f4f28dd01d845fa1dd97ffe
Author: Xiaocheng Hu <xiaochengh@chromium.org>
Date: Thu Feb 01 04:44:53 2018

Use WeakPtr in spellchecker code when creating callbacks

In spellchecker code, some callbacks are created by binding unretained
ptrs, which is not necessarily safe. This patch changes them to use
weak ptrs instead.

Bug:  807397 
Change-Id: I948da2c17f6d693ebf56d82f9300854b638a8826
Reviewed-on: https://chromium-review.googlesource.com/894475
Reviewed-by: Rachel Blum <groby@chromium.org>
Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#533563}
[modify] https://crrev.com/319c21425612cd9d1f4f28dd01d845fa1dd97ffe/chrome/browser/spellchecker/spell_check_host_chrome_impl.cc
[modify] https://crrev.com/319c21425612cd9d1f4f28dd01d845fa1dd97ffe/chrome/browser/spellchecker/spell_check_host_chrome_impl.h
[modify] https://crrev.com/319c21425612cd9d1f4f28dd01d845fa1dd97ffe/components/spellcheck/renderer/spellcheck_provider.cc
[modify] https://crrev.com/319c21425612cd9d1f4f28dd01d845fa1dd97ffe/components/spellcheck/renderer/spellcheck_provider.h

Status: Fixed (was: Assigned)

Sign in to add a comment