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

Unified Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 2688473005: Replace Document::postTask with WebTaskRunner::postTask (Closed)
Patch Set: Created 3 years, 10 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 | « no previous file | third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/Document.cpp
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
index cc8eabdcd805decf74ec1cb685438bd916a27082..db06c23e29c4a192146a366054f7c1c6c557f008 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -5718,10 +5718,12 @@ static void runAddConsoleMessageTask(MessageSource source,
void Document::addConsoleMessage(ConsoleMessage* consoleMessage) {
if (!isContextThread()) {
- postTask(TaskType::Unthrottled, BLINK_FROM_HERE,
- createCrossThreadTask(
- &runAddConsoleMessageTask, consoleMessage->source(),
- consoleMessage->level(), consoleMessage->message()));
+ TaskRunnerHelper::get(TaskType::Unthrottled, this)
+ ->postTask(
+ BLINK_FROM_HERE,
+ crossThreadBind(&runAddConsoleMessageTask, consoleMessage->source(),
+ consoleMessage->level(), consoleMessage->message(),
+ wrapCrossThreadWeakPersistent(this)));
return;
}
@@ -6308,8 +6310,9 @@ void Document::setAutofocusElement(Element* element) {
m_hasAutofocused = true;
DCHECK(!m_autofocusElement);
m_autofocusElement = element;
- postTask(TaskType::UserInteraction, BLINK_FROM_HERE,
- createSameThreadTask(&runAutofocusTask));
+ TaskRunnerHelper::get(TaskType::UserInteraction, this)
+ ->postTask(BLINK_FROM_HERE,
+ WTF::bind(&runAutofocusTask, wrapWeakPersistent(this)));
}
Element* Document::activeElement() const {
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698