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

Unified Diff: third_party/WebKit/Source/modules/websockets/DOMWebSocket.cpp

Issue 2647703007: Migrate Timer to TaskRunnerTimer in DOMWebSocket. (Closed)
Patch Set: Migrate Timer to TaskRunnerTimer in DOMWebSocket. Created 3 years, 11 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 | « third_party/WebKit/Source/modules/websockets/DOMWebSocket.h ('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/modules/websockets/DOMWebSocket.cpp
diff --git a/third_party/WebKit/Source/modules/websockets/DOMWebSocket.cpp b/third_party/WebKit/Source/modules/websockets/DOMWebSocket.cpp
index 2b175aa2fb9a5c73b062fc42382ad11ac66432be..d1702a21204e661d03f793f5a1b250f39c635c0f 100644
--- a/third_party/WebKit/Source/modules/websockets/DOMWebSocket.cpp
+++ b/third_party/WebKit/Source/modules/websockets/DOMWebSocket.cpp
@@ -40,6 +40,7 @@
#include "core/dom/ExceptionCode.h"
#include "core/dom/ExecutionContext.h"
#include "core/dom/SecurityContext.h"
+#include "core/dom/TaskRunnerHelper.h"
#include "core/events/MessageEvent.h"
#include "core/fileapi/Blob.h"
#include "core/frame/LocalDOMWindow.h"
@@ -70,7 +71,10 @@ namespace blink {
DOMWebSocket::EventQueue::EventQueue(EventTarget* target)
: m_state(Active),
m_target(target),
- m_resumeTimer(this, &EventQueue::resumeTimerFired) {}
+ m_resumeTimer(TaskRunnerHelper::get(TaskType::WebSocket,
+ target->getExecutionContext()),
+ this,
+ &EventQueue::resumeTimerFired) {}
DOMWebSocket::EventQueue::~EventQueue() {
contextDestroyed();
@@ -229,6 +233,7 @@ DOMWebSocket::DOMWebSocket(ExecutionContext* context)
m_extensions(""),
m_eventQueue(EventQueue::create(this)),
m_bufferedAmountConsumeTimer(
+ TaskRunnerHelper::get(TaskType::WebSocket, context),
this,
&DOMWebSocket::reflectBufferedAmountConsumption) {}
« no previous file with comments | « third_party/WebKit/Source/modules/websockets/DOMWebSocket.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698