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

Unified Diff: third_party/WebKit/Source/web/WebLeakDetector.cpp

Issue 2580773002: Let IdleSpellCheckCallback take full control over SpellCheckRequester (Closed)
Patch Set: Add CORE_EXPORT to IdleRequestCallback Created 4 years 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 | « third_party/WebKit/Source/core/testing/Internals.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/WebLeakDetector.cpp
diff --git a/third_party/WebKit/Source/web/WebLeakDetector.cpp b/third_party/WebKit/Source/web/WebLeakDetector.cpp
index b1814febd41ec89eefefbfa03c55d288edb41055..755a7640a1b2c40cd5ce1c2bb3662bf0d8f06fcf 100644
--- a/third_party/WebKit/Source/web/WebLeakDetector.cpp
+++ b/third_party/WebKit/Source/web/WebLeakDetector.cpp
@@ -31,6 +31,7 @@
#include "public/web/WebLeakDetector.h"
#include "bindings/core/v8/V8GCController.h"
+#include "core/editing/spellcheck/IdleSpellCheckCallback.h"
#include "core/editing/spellcheck/SpellChecker.h"
#include "core/fetch/MemoryCache.h"
#include "core/workers/InProcessWorkerMessagingProxy.h"
@@ -94,8 +95,10 @@ void WebLeakDetectorImpl::prepareForLeakDetection(WebFrame* frame) {
// Stop the spellchecker to prevent this.
if (frame->isWebLocalFrame()) {
WebLocalFrameImpl* localFrame = toWebLocalFrameImpl(frame);
- SpellChecker& spellChecker = localFrame->frame()->spellChecker();
- spellChecker.prepareForLeakDetection();
+ if (RuntimeEnabledFeatures::idleTimeSpellCheckingEnabled())
+ localFrame->frame()->idleSpellCheckCallback().prepareForLeakDetection();
+ else
+ localFrame->frame()->spellChecker().prepareForLeakDetection();
}
// FIXME: HTML5 Notification should be closed because notification affects the
« no previous file with comments | « third_party/WebKit/Source/core/testing/Internals.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698