| 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 3671c2944d86fdaa7dd5394830b90020b3f45a14..b224719eb16f3b439cef35ff2972ed3a18f0a224 100644
|
| --- a/third_party/WebKit/Source/core/editing/spellcheck/SpellCheckRequester.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/spellcheck/SpellCheckRequester.cpp
|
| @@ -226,6 +226,19 @@ void SpellCheckRequester::cancelCheck()
|
| m_processingRequest->didCancel();
|
| }
|
|
|
| +void SpellCheckRequester::prepareForLeakDetection()
|
| +{
|
| + m_timerToProcessQueuedRequest.stop();
|
| + // Empty the queue of pending requests to prevent it being a leak source.
|
| + // Pending spell checker requests are cancellable requests not representing
|
| + // leaks, just async work items waiting to be processed.
|
| + //
|
| + // Rather than somehow wait for this async queue to drain before running
|
| + // the leak detector, they're all cancelled to prevent flaky leaks being
|
| + // reported.
|
| + m_requestQueue.clear();
|
| +}
|
| +
|
| void SpellCheckRequester::invokeRequest(PassRefPtrWillBeRawPtr<SpellCheckRequest> request)
|
| {
|
| ASSERT(!m_processingRequest);
|
|
|