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

Unified Diff: third_party/WebKit/Source/core/workers/WorkerEventQueue.cpp

Issue 2831843002: Revert of Worker: Introduce per-global-scope task scheduler (Closed)
Patch Set: Created 3 years, 8 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
Index: third_party/WebKit/Source/core/workers/WorkerEventQueue.cpp
diff --git a/third_party/WebKit/Source/core/workers/WorkerEventQueue.cpp b/third_party/WebKit/Source/core/workers/WorkerEventQueue.cpp
index e6a3c08f4ceaa151016d0773ad7bd54ee2af3dea..1c33fed8ef20fc79c6eb776c4b6ee5b057994dd5 100644
--- a/third_party/WebKit/Source/core/workers/WorkerEventQueue.cpp
+++ b/third_party/WebKit/Source/core/workers/WorkerEventQueue.cpp
@@ -26,7 +26,6 @@
#include "core/workers/WorkerEventQueue.h"
-#include "core/dom/TaskRunnerHelper.h"
#include "core/events/Event.h"
#include "core/probe/CoreProbes.h"
#include "core/workers/WorkerGlobalScope.h"
@@ -58,16 +57,10 @@
probe::AsyncTaskScheduled(event->target()->GetExecutionContext(),
event->type(), event);
pending_events_.insert(event);
- // This queue is unthrottled because throttling event tasks may break existing
- // web pages. For example, throttling IndexedDB events may break scenarios
- // where several tabs, some of which are backgrounded, access the same
- // database concurrently. See also comments in the ctor of
- // DOMWindowEventQueueTimer.
- // TODO(nhiroki): Callers of enqueueEvent() should specify the task type.
- TaskRunnerHelper::Get(TaskType::kUnthrottled, worker_global_scope_.Get())
- ->PostTask(BLINK_FROM_HERE,
- WTF::Bind(&WorkerEventQueue::DispatchEvent,
- WrapPersistent(this), WrapWeakPersistent(event)));
+ worker_global_scope_->GetThread()->PostTask(
+ BLINK_FROM_HERE,
+ WTF::Bind(&WorkerEventQueue::DispatchEvent, WrapPersistent(this),
+ WrapWeakPersistent(event)));
return true;
}

Powered by Google App Engine
This is Rietveld 408576698