Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(219)

Unified Diff: components/spellcheck/browser/spellcheck_message_filter_platform.h

Issue 2384613002: [Android] Fix spellcheck JNI crash when a tab is closed. (Closed)
Patch Set: more fixes Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/spellcheck/browser/spellcheck_message_filter_platform.h
diff --git a/components/spellcheck/browser/spellcheck_message_filter_platform.h b/components/spellcheck/browser/spellcheck_message_filter_platform.h
index b6edac377d88d5fca00b2dd59128bec4261a1f14..3acdcf059c4738a356f9cd52f519c4196e978662 100644
--- a/components/spellcheck/browser/spellcheck_message_filter_platform.h
+++ b/components/spellcheck/browser/spellcheck_message_filter_platform.h
@@ -57,14 +57,19 @@ class SpellCheckMessageFilterPlatform : public content::BrowserMessageFilter {
int render_process_id_;
#if defined(OS_ANDROID)
+ friend struct content::BrowserThread::DeleteOnThread<
+ content::BrowserThread::UI>;
+ friend class base::DeleteHelper<SpellCheckMessageFilterPlatform>;
+
void OnToggleSpellCheck(bool enabled, bool checked);
+ void OnDestruct() const override;
// Android-specific object used to query the Android spellchecker.
std::unique_ptr<SpellCheckerSessionBridge> impl_;
-#endif
-
+#else
// A JSON-RPC client that calls the Spelling service in the background.
std::unique_ptr<SpellingServiceClient> client_;
+#endif
DISALLOW_COPY_AND_ASSIGN(SpellCheckMessageFilterPlatform);
};

Powered by Google App Engine
This is Rietveld 408576698