| Index: components/spellcheck/browser/spellcheck_message_filter_platform_android.cc
|
| diff --git a/components/spellcheck/browser/spellcheck_message_filter_platform_android.cc b/components/spellcheck/browser/spellcheck_message_filter_platform_android.cc
|
| index 50a0e5a2d9b7b750ba7639e915a6a7847687b18c..0e25c864657bf5ce258f50d05dc01f18f075159b 100644
|
| --- a/components/spellcheck/browser/spellcheck_message_filter_platform_android.cc
|
| +++ b/components/spellcheck/browser/spellcheck_message_filter_platform_android.cc
|
| @@ -91,3 +91,9 @@ void SpellCheckMessageFilterPlatform::OnToggleSpellCheck(
|
| if (!enabled)
|
| impl_->DisconnectSession();
|
| }
|
| +
|
| +void SpellCheckMessageFilterPlatform::OnDestruct() const {
|
| + // Needs to be destroyed on the UI thread, to avoid race conditions
|
| + // on the java side during clean-up.
|
| + BrowserThread::DeleteOnUIThread::Destruct(this);
|
| +}
|
|
|