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

Unified Diff: third_party/WebKit/Source/core/editing/spellcheck/SpellCheckRequester.cpp

Issue 2226833003: Make WebSpellCheckClient aware of leak detection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@SpellCheckerDebugInfo
Patch Set: Minor style fix Created 4 years, 4 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
« no previous file with comments | « components/test_runner/spell_check_client.cc ('k') | third_party/WebKit/Source/core/loader/EmptyClients.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/editing/spellcheck/SpellCheckRequester.cpp
diff --git a/third_party/WebKit/Source/core/editing/spellcheck/SpellCheckRequester.cpp b/third_party/WebKit/Source/core/editing/spellcheck/SpellCheckRequester.cpp
index b467afaaf9a5dce66073caab7635b909f2a04227..b8b43532f7a9d24b2ae0c488d48bfb1b5c6eca17 100644
--- a/third_party/WebKit/Source/core/editing/spellcheck/SpellCheckRequester.cpp
+++ b/third_party/WebKit/Source/core/editing/spellcheck/SpellCheckRequester.cpp
@@ -229,6 +229,10 @@ void SpellCheckRequester::prepareForLeakDetection()
// the leak detector, they're all cancelled to prevent flaky leaks being
// reported.
m_requestQueue.clear();
+ // WebSpellCheckClient stores a set of WebTextCheckingCompletion objects,
+ // which may store references to already invoked requests. We should clear
+ // these references to prevent them from being a leak source.
+ client().cancelAllPendingRequests();
}
void SpellCheckRequester::invokeRequest(SpellCheckRequest* request)
« no previous file with comments | « components/test_runner/spell_check_client.cc ('k') | third_party/WebKit/Source/core/loader/EmptyClients.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698